diff --git a/lib/services/websiteManagement2/lib/LICENSE.txt b/lib/services/websiteManagement2/lib/LICENSE.txt
new file mode 100644
index 0000000000..5431ba98b9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lib/services/websiteManagement2/lib/lib/models/abnormalTimePeriod.js b/lib/services/websiteManagement2/lib/lib/models/abnormalTimePeriod.js
new file mode 100644
index 0000000000..2a371f061c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/abnormalTimePeriod.js
@@ -0,0 +1,94 @@
+/*
+ * 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 Abnormal Time Period identified in diagnosis
+ *
+ */
+class AbnormalTimePeriod {
+ /**
+ * Create a AbnormalTimePeriod.
+ * @member {date} [startTime] Start time of the downtime
+ * @member {date} [endTime] End time of the downtime
+ * @member {array} [events] List of Possible Cause of downtime
+ * @member {array} [solutions] List of proposed solutions
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AbnormalTimePeriod
+ *
+ * @returns {object} metadata of AbnormalTimePeriod
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AbnormalTimePeriod',
+ type: {
+ name: 'Composite',
+ className: 'AbnormalTimePeriod',
+ modelProperties: {
+ startTime: {
+ required: false,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ events: {
+ required: false,
+ serializedName: 'events',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DetectorAbnormalTimePeriodElementType',
+ type: {
+ name: 'Composite',
+ className: 'DetectorAbnormalTimePeriod'
+ }
+ }
+ }
+ },
+ solutions: {
+ required: false,
+ serializedName: 'solutions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SolutionElementType',
+ type: {
+ name: 'Composite',
+ className: 'Solution'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AbnormalTimePeriod;
diff --git a/lib/services/websiteManagement2/lib/lib/models/address.js b/lib/services/websiteManagement2/lib/lib/models/address.js
new file mode 100644
index 0000000000..31450935e3
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/address.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';
+
+/**
+ * Address information for domain registration.
+ *
+ */
+class Address {
+ /**
+ * Create a Address.
+ * @member {string} address1 First line of an Address.
+ * @member {string} [address2] The second line of the Address. Optional.
+ * @member {string} city The city for the address.
+ * @member {string} country The country for the address.
+ * @member {string} postalCode The postal code for the address.
+ * @member {string} state The state or province for the address.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Address
+ *
+ * @returns {object} metadata of Address
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Address',
+ type: {
+ name: 'Composite',
+ className: 'Address',
+ modelProperties: {
+ address1: {
+ required: true,
+ serializedName: 'address1',
+ type: {
+ name: 'String'
+ }
+ },
+ address2: {
+ required: false,
+ serializedName: 'address2',
+ type: {
+ name: 'String'
+ }
+ },
+ city: {
+ required: true,
+ serializedName: 'city',
+ type: {
+ name: 'String'
+ }
+ },
+ country: {
+ required: true,
+ serializedName: 'country',
+ type: {
+ name: 'String'
+ }
+ },
+ postalCode: {
+ required: true,
+ serializedName: 'postalCode',
+ type: {
+ name: 'String'
+ }
+ },
+ state: {
+ required: true,
+ serializedName: 'state',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Address;
diff --git a/lib/services/websiteManagement2/lib/lib/models/addressResponse.js b/lib/services/websiteManagement2/lib/lib/models/addressResponse.js
new file mode 100644
index 0000000000..e8d64bc744
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/addressResponse.js
@@ -0,0 +1,95 @@
+/*
+ * 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');
+
+/**
+ * Describes main public IP address and any extra virtual IPs.
+ *
+ */
+class AddressResponse {
+ /**
+ * Create a AddressResponse.
+ * @member {string} [serviceIpAddress] Main public virtual IP.
+ * @member {string} [internalIpAddress] Virtual Network internal IP address
+ * of the App Service Environment if it is in internal load-balancing mode.
+ * @member {array} [outboundIpAddresses] IP addresses appearing on outbound
+ * connections.
+ * @member {array} [vipMappings] Additional virtual IPs.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AddressResponse
+ *
+ * @returns {object} metadata of AddressResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AddressResponse',
+ type: {
+ name: 'Composite',
+ className: 'AddressResponse',
+ modelProperties: {
+ serviceIpAddress: {
+ required: false,
+ serializedName: 'serviceIpAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ internalIpAddress: {
+ required: false,
+ serializedName: 'internalIpAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ outboundIpAddresses: {
+ required: false,
+ serializedName: 'outboundIpAddresses',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ vipMappings: {
+ required: false,
+ serializedName: 'vipMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualIPMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualIPMapping'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AddressResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/analysisData.js b/lib/services/websiteManagement2/lib/lib/models/analysisData.js
new file mode 100644
index 0000000000..244cbfcee4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/analysisData.js
@@ -0,0 +1,123 @@
+/*
+ * 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 Detector Evidence used for analysis
+ *
+ */
+class AnalysisData {
+ /**
+ * Create a AnalysisData.
+ * @member {string} [source] Name of the Detector
+ * @member {object} [detectorDefinition] Detector Definition
+ * @member {string} [detectorDefinition.displayName] Display name of the
+ * detector
+ * @member {string} [detectorDefinition.description] Description of the
+ * detector
+ * @member {number} [detectorDefinition.rank] Detector Rank
+ * @member {boolean} [detectorDefinition.isEnabled] Flag representing whether
+ * detector is enabled or not.
+ * @member {array} [metrics] Source Metrics
+ * @member {array} [data] Additional Source Data
+ * @member {object} [detectorMetaData] Detector Meta Data
+ * @member {object} [detectorMetaData.dataSource] Source of the Data
+ * @member {array} [detectorMetaData.dataSource.instructions] Instrunctions
+ * if any for the data source
+ * @member {array} [detectorMetaData.dataSource.dataSourceUri] Datasource Uri
+ * Links
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AnalysisData
+ *
+ * @returns {object} metadata of AnalysisData
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AnalysisData',
+ type: {
+ name: 'Composite',
+ className: 'AnalysisData',
+ modelProperties: {
+ source: {
+ required: false,
+ serializedName: 'source',
+ type: {
+ name: 'String'
+ }
+ },
+ detectorDefinition: {
+ required: false,
+ serializedName: 'detectorDefinition',
+ type: {
+ name: 'Composite',
+ className: 'DetectorDefinition'
+ }
+ },
+ metrics: {
+ required: false,
+ serializedName: 'metrics',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DiagnosticMetricSetElementType',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticMetricSet'
+ }
+ }
+ }
+ },
+ data: {
+ required: false,
+ serializedName: 'data',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ArrayElementType',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ },
+ detectorMetaData: {
+ required: false,
+ serializedName: 'detectorMetaData',
+ type: {
+ name: 'Composite',
+ className: 'ResponseMetaData'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AnalysisData;
diff --git a/lib/services/websiteManagement2/lib/lib/models/analysisDefinition.js b/lib/services/websiteManagement2/lib/lib/models/analysisDefinition.js
new file mode 100644
index 0000000000..66545279fd
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/analysisDefinition.js
@@ -0,0 +1,88 @@
+/*
+ * 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');
+
+/**
+ * Definition of Analysis
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class AnalysisDefinition extends models['ProxyOnlyResource'] {
+ /**
+ * Create a AnalysisDefinition.
+ * @member {string} [description] Description of the Analysis
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AnalysisDefinition
+ *
+ * @returns {object} metadata of AnalysisDefinition
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AnalysisDefinition',
+ type: {
+ name: 'Composite',
+ className: 'AnalysisDefinition',
+ 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'
+ }
+ },
+ description: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AnalysisDefinition;
diff --git a/lib/services/websiteManagement2/lib/lib/models/apiDefinitionInfo.js b/lib/services/websiteManagement2/lib/lib/models/apiDefinitionInfo.js
new file mode 100644
index 0000000000..c7bc43edc4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/apiDefinitionInfo.js
@@ -0,0 +1,52 @@
+/*
+ * 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';
+
+/**
+ * Information about the formal API definition for the app.
+ *
+ */
+class ApiDefinitionInfo {
+ /**
+ * Create a ApiDefinitionInfo.
+ * @member {string} [url] The URL of the API definition.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ApiDefinitionInfo
+ *
+ * @returns {object} metadata of ApiDefinitionInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ApiDefinitionInfo',
+ type: {
+ name: 'Composite',
+ className: 'ApiDefinitionInfo',
+ modelProperties: {
+ url: {
+ required: false,
+ serializedName: 'url',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ApiDefinitionInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificate.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificate.js
new file mode 100644
index 0000000000..299b1210d7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificate.js
@@ -0,0 +1,75 @@
+/*
+ * 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';
+
+/**
+ * Key Vault container for a certificate that is purchased through Azure.
+ *
+ */
+class AppServiceCertificate {
+ /**
+ * Create a AppServiceCertificate.
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificate
+ *
+ * @returns {object} metadata of AppServiceCertificate
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificate',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificate',
+ modelProperties: {
+ keyVaultId: {
+ required: false,
+ serializedName: 'keyVaultId',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretName: {
+ required: false,
+ serializedName: 'keyVaultSecretName',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificate;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateCollection.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateCollection.js
new file mode 100644
index 0000000000..5ca5f99e91
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateCollection.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 certitificateorder certificates.
+ */
+class AppServiceCertificateCollection extends Array {
+ /**
+ * Create a AppServiceCertificateCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificateCollection
+ *
+ * @returns {object} metadata of AppServiceCertificateCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificateCollection',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AppServiceCertificateResourceElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateResource'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificateCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrder.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrder.js
new file mode 100644
index 0000000000..4adc193a58
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrder.js
@@ -0,0 +1,337 @@
+/*
+ * 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');
+
+/**
+ * SSL certificate purchase order.
+ *
+ * @extends models['Resource']
+ */
+class AppServiceCertificateOrder extends models['Resource'] {
+ /**
+ * Create a AppServiceCertificateOrder.
+ * @member {object} [certificates] State of the Key Vault secret.
+ * @member {string} [distinguishedName] Certificate distinguished name.
+ * @member {string} [domainVerificationToken] Domain verification token.
+ * @member {number} [validityInYears] Duration in years (must be between 1
+ * and 3). Default value: 1 .
+ * @member {number} [keySize] Certificate key size. Default value: 2048 .
+ * @member {string} productType Certificate product type. Possible values
+ * include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ * @member {boolean} [autoRenew] true if the certificate should
+ * be automatically renewed when it expires; otherwise, false.
+ * Default value: true .
+ * @member {string} [provisioningState] Status of certificate order. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress',
+ * 'Deleting'
+ * @member {string} [status] Current order status. Possible values include:
+ * 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied',
+ * 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
+ * @member {object} [signedCertificate] Signed certificate.
+ * @member {number} [signedCertificate.version] Certificate Version.
+ * @member {string} [signedCertificate.serialNumber] Certificate Serial
+ * Number.
+ * @member {string} [signedCertificate.thumbprint] Certificate Thumbprint.
+ * @member {string} [signedCertificate.subject] Certificate Subject.
+ * @member {date} [signedCertificate.notBefore] Date Certificate is valid
+ * from.
+ * @member {date} [signedCertificate.notAfter] Date Certificate is valid to.
+ * @member {string} [signedCertificate.signatureAlgorithm] Certificate
+ * Signature algorithm.
+ * @member {string} [signedCertificate.issuer] Certificate Issuer.
+ * @member {string} [signedCertificate.rawData] Raw certificate data.
+ * @member {string} [csr] Last CSR that was created for this order.
+ * @member {object} [intermediate] Intermediate certificate.
+ * @member {number} [intermediate.version] Certificate Version.
+ * @member {string} [intermediate.serialNumber] Certificate Serial Number.
+ * @member {string} [intermediate.thumbprint] Certificate Thumbprint.
+ * @member {string} [intermediate.subject] Certificate Subject.
+ * @member {date} [intermediate.notBefore] Date Certificate is valid from.
+ * @member {date} [intermediate.notAfter] Date Certificate is valid to.
+ * @member {string} [intermediate.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [intermediate.issuer] Certificate Issuer.
+ * @member {string} [intermediate.rawData] Raw certificate data.
+ * @member {object} [root] Root certificate.
+ * @member {number} [root.version] Certificate Version.
+ * @member {string} [root.serialNumber] Certificate Serial Number.
+ * @member {string} [root.thumbprint] Certificate Thumbprint.
+ * @member {string} [root.subject] Certificate Subject.
+ * @member {date} [root.notBefore] Date Certificate is valid from.
+ * @member {date} [root.notAfter] Date Certificate is valid to.
+ * @member {string} [root.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [root.issuer] Certificate Issuer.
+ * @member {string} [root.rawData] Raw certificate data.
+ * @member {string} [serialNumber] Current serial number of the certificate.
+ * @member {date} [lastCertificateIssuanceTime] Certificate last issuance
+ * time.
+ * @member {date} [expirationTime] Certificate expiration time.
+ * @member {boolean} [isPrivateKeyExternal] true if private key
+ * is external; otherwise, false.
+ * @member {array} [appServiceCertificateNotRenewableReasons] Reasons why App
+ * Service Certificate is not renewable at the current moment.
+ * @member {date} [nextAutoRenewalTimeStamp] Time stamp when the certificate
+ * would be auto renewed next
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificateOrder
+ *
+ * @returns {object} metadata of AppServiceCertificateOrder
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificateOrder',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateOrder',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ certificates: {
+ required: false,
+ serializedName: 'properties.certificates',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'AppServiceCertificateElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificate'
+ }
+ }
+ }
+ },
+ distinguishedName: {
+ required: false,
+ serializedName: 'properties.distinguishedName',
+ type: {
+ name: 'String'
+ }
+ },
+ domainVerificationToken: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.domainVerificationToken',
+ type: {
+ name: 'String'
+ }
+ },
+ validityInYears: {
+ required: false,
+ serializedName: 'properties.validityInYears',
+ defaultValue: 1,
+ constraints: {
+ InclusiveMaximum: 3,
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: 'Number'
+ }
+ },
+ keySize: {
+ required: false,
+ serializedName: 'properties.keySize',
+ defaultValue: 2048,
+ type: {
+ name: 'Number'
+ }
+ },
+ productType: {
+ required: true,
+ serializedName: 'properties.productType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' ]
+ }
+ },
+ autoRenew: {
+ required: false,
+ serializedName: 'properties.autoRenew',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' ]
+ }
+ },
+ signedCertificate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.signedCertificate',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ csr: {
+ required: false,
+ serializedName: 'properties.csr',
+ type: {
+ name: 'String'
+ }
+ },
+ intermediate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.intermediate',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ root: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.root',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ serialNumber: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.serialNumber',
+ type: {
+ name: 'String'
+ }
+ },
+ lastCertificateIssuanceTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastCertificateIssuanceTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ isPrivateKeyExternal: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isPrivateKeyExternal',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ appServiceCertificateNotRenewableReasons: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.appServiceCertificateNotRenewableReasons',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ nextAutoRenewalTimeStamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.nextAutoRenewalTimeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificateOrder;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderCollection.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderCollection.js
new file mode 100644
index 0000000000..6f45eabab2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderCollection.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 certitificate orders.
+ */
+class AppServiceCertificateOrderCollection extends Array {
+ /**
+ * Create a AppServiceCertificateOrderCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificateOrderCollection
+ *
+ * @returns {object} metadata of AppServiceCertificateOrderCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificateOrderCollection',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateOrderCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AppServiceCertificateOrderElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateOrder'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificateOrderCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderPatchResource.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderPatchResource.js
new file mode 100644
index 0000000000..2601b56004
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateOrderPatchResource.js
@@ -0,0 +1,316 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a certificate order that is purchased through Azure.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class AppServiceCertificateOrderPatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a AppServiceCertificateOrderPatchResource.
+ * @member {object} [certificates] State of the Key Vault secret.
+ * @member {string} [distinguishedName] Certificate distinguished name.
+ * @member {string} [domainVerificationToken] Domain verification token.
+ * @member {number} [validityInYears] Duration in years (must be between 1
+ * and 3). Default value: 1 .
+ * @member {number} [keySize] Certificate key size. Default value: 2048 .
+ * @member {string} productType Certificate product type. Possible values
+ * include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ * @member {boolean} [autoRenew] true if the certificate should
+ * be automatically renewed when it expires; otherwise, false.
+ * Default value: true .
+ * @member {string} [provisioningState] Status of certificate order. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress',
+ * 'Deleting'
+ * @member {string} [status] Current order status. Possible values include:
+ * 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied',
+ * 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
+ * @member {object} [signedCertificate] Signed certificate.
+ * @member {number} [signedCertificate.version] Certificate Version.
+ * @member {string} [signedCertificate.serialNumber] Certificate Serial
+ * Number.
+ * @member {string} [signedCertificate.thumbprint] Certificate Thumbprint.
+ * @member {string} [signedCertificate.subject] Certificate Subject.
+ * @member {date} [signedCertificate.notBefore] Date Certificate is valid
+ * from.
+ * @member {date} [signedCertificate.notAfter] Date Certificate is valid to.
+ * @member {string} [signedCertificate.signatureAlgorithm] Certificate
+ * Signature algorithm.
+ * @member {string} [signedCertificate.issuer] Certificate Issuer.
+ * @member {string} [signedCertificate.rawData] Raw certificate data.
+ * @member {string} [csr] Last CSR that was created for this order.
+ * @member {object} [intermediate] Intermediate certificate.
+ * @member {number} [intermediate.version] Certificate Version.
+ * @member {string} [intermediate.serialNumber] Certificate Serial Number.
+ * @member {string} [intermediate.thumbprint] Certificate Thumbprint.
+ * @member {string} [intermediate.subject] Certificate Subject.
+ * @member {date} [intermediate.notBefore] Date Certificate is valid from.
+ * @member {date} [intermediate.notAfter] Date Certificate is valid to.
+ * @member {string} [intermediate.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [intermediate.issuer] Certificate Issuer.
+ * @member {string} [intermediate.rawData] Raw certificate data.
+ * @member {object} [root] Root certificate.
+ * @member {number} [root.version] Certificate Version.
+ * @member {string} [root.serialNumber] Certificate Serial Number.
+ * @member {string} [root.thumbprint] Certificate Thumbprint.
+ * @member {string} [root.subject] Certificate Subject.
+ * @member {date} [root.notBefore] Date Certificate is valid from.
+ * @member {date} [root.notAfter] Date Certificate is valid to.
+ * @member {string} [root.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [root.issuer] Certificate Issuer.
+ * @member {string} [root.rawData] Raw certificate data.
+ * @member {string} [serialNumber] Current serial number of the certificate.
+ * @member {date} [lastCertificateIssuanceTime] Certificate last issuance
+ * time.
+ * @member {date} [expirationTime] Certificate expiration time.
+ * @member {boolean} [isPrivateKeyExternal] true if private key
+ * is external; otherwise, false.
+ * @member {array} [appServiceCertificateNotRenewableReasons] Reasons why App
+ * Service Certificate is not renewable at the current moment.
+ * @member {date} [nextAutoRenewalTimeStamp] Time stamp when the certificate
+ * would be auto renewed next
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificateOrderPatchResource
+ *
+ * @returns {object} metadata of AppServiceCertificateOrderPatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificateOrderPatchResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateOrderPatchResource',
+ 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'
+ }
+ },
+ certificates: {
+ required: false,
+ serializedName: 'properties.certificates',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'AppServiceCertificateElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificate'
+ }
+ }
+ }
+ },
+ distinguishedName: {
+ required: false,
+ serializedName: 'properties.distinguishedName',
+ type: {
+ name: 'String'
+ }
+ },
+ domainVerificationToken: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.domainVerificationToken',
+ type: {
+ name: 'String'
+ }
+ },
+ validityInYears: {
+ required: false,
+ serializedName: 'properties.validityInYears',
+ defaultValue: 1,
+ constraints: {
+ InclusiveMaximum: 3,
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: 'Number'
+ }
+ },
+ keySize: {
+ required: false,
+ serializedName: 'properties.keySize',
+ defaultValue: 2048,
+ type: {
+ name: 'Number'
+ }
+ },
+ productType: {
+ required: true,
+ serializedName: 'properties.productType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' ]
+ }
+ },
+ autoRenew: {
+ required: false,
+ serializedName: 'properties.autoRenew',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' ]
+ }
+ },
+ signedCertificate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.signedCertificate',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ csr: {
+ required: false,
+ serializedName: 'properties.csr',
+ type: {
+ name: 'String'
+ }
+ },
+ intermediate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.intermediate',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ root: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.root',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails'
+ }
+ },
+ serialNumber: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.serialNumber',
+ type: {
+ name: 'String'
+ }
+ },
+ lastCertificateIssuanceTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastCertificateIssuanceTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ isPrivateKeyExternal: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isPrivateKeyExternal',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ appServiceCertificateNotRenewableReasons: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.appServiceCertificateNotRenewableReasons',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ nextAutoRenewalTimeStamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.nextAutoRenewalTimeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificateOrderPatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificatePatchResource.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificatePatchResource.js
new file mode 100644
index 0000000000..6abc5ec0e5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificatePatchResource.js
@@ -0,0 +1,111 @@
+/*
+ * 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');
+
+/**
+ * Key Vault container ARM resource for a certificate that is purchased through
+ * Azure.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class AppServiceCertificatePatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a AppServiceCertificatePatchResource.
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificatePatchResource
+ *
+ * @returns {object} metadata of AppServiceCertificatePatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificatePatchResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificatePatchResource',
+ 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'
+ }
+ },
+ keyVaultId: {
+ required: false,
+ serializedName: 'properties.keyVaultId',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretName: {
+ required: false,
+ serializedName: 'properties.keyVaultSecretName',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificatePatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateResource.js b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateResource.js
new file mode 100644
index 0000000000..b55a592086
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceCertificateResource.js
@@ -0,0 +1,132 @@
+/*
+ * 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');
+
+/**
+ * Key Vault container ARM resource for a certificate that is purchased through
+ * Azure.
+ *
+ * @extends models['Resource']
+ */
+class AppServiceCertificateResource extends models['Resource'] {
+ /**
+ * Create a AppServiceCertificateResource.
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceCertificateResource
+ *
+ * @returns {object} metadata of AppServiceCertificateResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceCertificateResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceCertificateResource',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ keyVaultId: {
+ required: false,
+ serializedName: 'properties.keyVaultId',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretName: {
+ required: false,
+ serializedName: 'properties.keyVaultSecretName',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceCertificateResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironment.js b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironment.js
new file mode 100644
index 0000000000..af47066e3f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironment.js
@@ -0,0 +1,444 @@
+/*
+ * 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');
+
+/**
+ * Description of an App Service Environment.
+ *
+ */
+class AppServiceEnvironment {
+ /**
+ * Create a AppServiceEnvironment.
+ * @member {string} name Name of the App Service Environment.
+ * @member {string} location Location of the App Service Environment, e.g.
+ * "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App
+ * Service Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual
+ * Network (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual
+ * Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved
+ * for the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for
+ * the App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action
+ * on the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the
+ * App Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results
+ * of the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account
+ * associated with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment
+ * can be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended
+ * e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the
+ * behavior of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to
+ * whitelist on ASE db
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AppServiceEnvironment
+ *
+ * @returns {object} metadata of AppServiceEnvironment
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceEnvironment',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironment',
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Preparing', 'Ready', 'Scaling', 'Deleting' ]
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetResourceGroupName: {
+ required: false,
+ serializedName: 'vnetResourceGroupName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetSubnetName: {
+ required: false,
+ serializedName: 'vnetSubnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ virtualNetwork: {
+ required: true,
+ serializedName: 'virtualNetwork',
+ type: {
+ name: 'Composite',
+ className: 'VirtualNetworkProfile'
+ }
+ },
+ internalLoadBalancingMode: {
+ required: false,
+ serializedName: 'internalLoadBalancingMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'None', 'Web', 'Publishing' ]
+ }
+ },
+ multiSize: {
+ required: false,
+ serializedName: 'multiSize',
+ type: {
+ name: 'String'
+ }
+ },
+ multiRoleCount: {
+ required: false,
+ serializedName: 'multiRoleCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ workerPools: {
+ required: true,
+ serializedName: 'workerPools',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'WorkerPoolElementType',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPool'
+ }
+ }
+ }
+ },
+ ipsslAddressCount: {
+ required: false,
+ serializedName: 'ipsslAddressCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ databaseEdition: {
+ required: false,
+ readOnly: true,
+ serializedName: 'databaseEdition',
+ type: {
+ name: 'String'
+ }
+ },
+ databaseServiceObjective: {
+ required: false,
+ readOnly: true,
+ serializedName: 'databaseServiceObjective',
+ type: {
+ name: 'String'
+ }
+ },
+ upgradeDomains: {
+ required: false,
+ readOnly: true,
+ serializedName: 'upgradeDomains',
+ type: {
+ name: 'Number'
+ }
+ },
+ subscriptionId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'subscriptionId',
+ type: {
+ name: 'String'
+ }
+ },
+ dnsSuffix: {
+ required: false,
+ serializedName: 'dnsSuffix',
+ type: {
+ name: 'String'
+ }
+ },
+ lastAction: {
+ required: false,
+ readOnly: true,
+ serializedName: 'lastAction',
+ type: {
+ name: 'String'
+ }
+ },
+ lastActionResult: {
+ required: false,
+ readOnly: true,
+ serializedName: 'lastActionResult',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedMultiSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'allowedMultiSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedWorkerSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'allowedWorkerSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ maximumNumberOfMachines: {
+ required: false,
+ readOnly: true,
+ serializedName: 'maximumNumberOfMachines',
+ type: {
+ name: 'Number'
+ }
+ },
+ vipMappings: {
+ required: false,
+ readOnly: true,
+ serializedName: 'vipMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualIPMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualIPMapping'
+ }
+ }
+ }
+ },
+ environmentCapacities: {
+ required: false,
+ readOnly: true,
+ serializedName: 'environmentCapacities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StampCapacityElementType',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacity'
+ }
+ }
+ }
+ },
+ networkAccessControlList: {
+ required: false,
+ serializedName: 'networkAccessControlList',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NetworkAccessControlEntryElementType',
+ type: {
+ name: 'Composite',
+ className: 'NetworkAccessControlEntry'
+ }
+ }
+ }
+ },
+ environmentIsHealthy: {
+ required: false,
+ readOnly: true,
+ serializedName: 'environmentIsHealthy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ environmentStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'environmentStatus',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ frontEndScaleFactor: {
+ required: false,
+ serializedName: 'frontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ defaultFrontEndScaleFactor: {
+ required: false,
+ readOnly: true,
+ serializedName: 'defaultFrontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ apiManagementAccountId: {
+ required: false,
+ serializedName: 'apiManagementAccountId',
+ type: {
+ name: 'String'
+ }
+ },
+ suspended: {
+ required: false,
+ serializedName: 'suspended',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ dynamicCacheEnabled: {
+ required: false,
+ serializedName: 'dynamicCacheEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ clusterSettings: {
+ required: false,
+ serializedName: 'clusterSettings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ },
+ userWhitelistedIpRanges: {
+ required: false,
+ serializedName: 'userWhitelistedIpRanges',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceEnvironment;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentCollection.js b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentCollection.js
new file mode 100644
index 0000000000..7c44f399b6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentCollection.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 App Service Environments.
+ */
+class AppServiceEnvironmentCollection extends Array {
+ /**
+ * Create a AppServiceEnvironmentCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceEnvironmentCollection
+ *
+ * @returns {object} metadata of AppServiceEnvironmentCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceEnvironmentCollection',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironmentCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AppServiceEnvironmentResourceElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironmentResource'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceEnvironmentCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentPatchResource.js b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentPatchResource.js
new file mode 100644
index 0000000000..990549c0b2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentPatchResource.js
@@ -0,0 +1,478 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a app service enviroment.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class AppServiceEnvironmentPatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a AppServiceEnvironmentPatchResource.
+ * @member {string} appServiceEnvironmentPatchResourceName Name of the App
+ * Service Environment.
+ * @member {string} location Location of the App Service Environment, e.g.
+ * "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App
+ * Service Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual
+ * Network (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual
+ * Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved
+ * for the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for
+ * the App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action
+ * on the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the
+ * App Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results
+ * of the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account
+ * associated with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment
+ * can be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended
+ * e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the
+ * behavior of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to
+ * whitelist on ASE db
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceEnvironmentPatchResource
+ *
+ * @returns {object} metadata of AppServiceEnvironmentPatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceEnvironmentPatchResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironmentPatchResource',
+ 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'
+ }
+ },
+ appServiceEnvironmentPatchResourceName: {
+ required: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'properties.location',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Preparing', 'Ready', 'Scaling', 'Deleting' ]
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'properties.vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetResourceGroupName: {
+ required: false,
+ serializedName: 'properties.vnetResourceGroupName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetSubnetName: {
+ required: false,
+ serializedName: 'properties.vnetSubnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ virtualNetwork: {
+ required: true,
+ serializedName: 'properties.virtualNetwork',
+ type: {
+ name: 'Composite',
+ className: 'VirtualNetworkProfile'
+ }
+ },
+ internalLoadBalancingMode: {
+ required: false,
+ serializedName: 'properties.internalLoadBalancingMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'None', 'Web', 'Publishing' ]
+ }
+ },
+ multiSize: {
+ required: false,
+ serializedName: 'properties.multiSize',
+ type: {
+ name: 'String'
+ }
+ },
+ multiRoleCount: {
+ required: false,
+ serializedName: 'properties.multiRoleCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ workerPools: {
+ required: true,
+ serializedName: 'properties.workerPools',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'WorkerPoolElementType',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPool'
+ }
+ }
+ }
+ },
+ ipsslAddressCount: {
+ required: false,
+ serializedName: 'properties.ipsslAddressCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ databaseEdition: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.databaseEdition',
+ type: {
+ name: 'String'
+ }
+ },
+ databaseServiceObjective: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.databaseServiceObjective',
+ type: {
+ name: 'String'
+ }
+ },
+ upgradeDomains: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.upgradeDomains',
+ type: {
+ name: 'Number'
+ }
+ },
+ subscriptionId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subscriptionId',
+ type: {
+ name: 'String'
+ }
+ },
+ dnsSuffix: {
+ required: false,
+ serializedName: 'properties.dnsSuffix',
+ type: {
+ name: 'String'
+ }
+ },
+ lastAction: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastAction',
+ type: {
+ name: 'String'
+ }
+ },
+ lastActionResult: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastActionResult',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedMultiSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.allowedMultiSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedWorkerSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.allowedWorkerSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ maximumNumberOfMachines: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maximumNumberOfMachines',
+ type: {
+ name: 'Number'
+ }
+ },
+ vipMappings: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.vipMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualIPMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualIPMapping'
+ }
+ }
+ }
+ },
+ environmentCapacities: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentCapacities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StampCapacityElementType',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacity'
+ }
+ }
+ }
+ },
+ networkAccessControlList: {
+ required: false,
+ serializedName: 'properties.networkAccessControlList',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NetworkAccessControlEntryElementType',
+ type: {
+ name: 'Composite',
+ className: 'NetworkAccessControlEntry'
+ }
+ }
+ }
+ },
+ environmentIsHealthy: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentIsHealthy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ environmentStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentStatus',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ frontEndScaleFactor: {
+ required: false,
+ serializedName: 'properties.frontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ defaultFrontEndScaleFactor: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.defaultFrontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ apiManagementAccountId: {
+ required: false,
+ serializedName: 'properties.apiManagementAccountId',
+ type: {
+ name: 'String'
+ }
+ },
+ suspended: {
+ required: false,
+ serializedName: 'properties.suspended',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ dynamicCacheEnabled: {
+ required: false,
+ serializedName: 'properties.dynamicCacheEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ clusterSettings: {
+ required: false,
+ serializedName: 'properties.clusterSettings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ },
+ userWhitelistedIpRanges: {
+ required: false,
+ serializedName: 'properties.userWhitelistedIpRanges',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceEnvironmentPatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentResource.js b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentResource.js
new file mode 100644
index 0000000000..458a7a0309
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServiceEnvironmentResource.js
@@ -0,0 +1,499 @@
+/*
+ * 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');
+
+/**
+ * App Service Environment ARM resource.
+ *
+ * @extends models['Resource']
+ */
+class AppServiceEnvironmentResource extends models['Resource'] {
+ /**
+ * Create a AppServiceEnvironmentResource.
+ * @member {string} appServiceEnvironmentResourceName Name of the App Service
+ * Environment.
+ * @member {string} appServiceEnvironmentResourceLocation Location of the App
+ * Service Environment, e.g. "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App
+ * Service Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual
+ * Network (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual
+ * Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved
+ * for the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for
+ * the App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action
+ * on the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the
+ * App Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results
+ * of the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account
+ * associated with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment
+ * can be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended
+ * e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the
+ * behavior of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to
+ * whitelist on ASE db
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServiceEnvironmentResource
+ *
+ * @returns {object} metadata of AppServiceEnvironmentResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServiceEnvironmentResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironmentResource',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ appServiceEnvironmentResourceName: {
+ required: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ appServiceEnvironmentResourceLocation: {
+ required: true,
+ serializedName: 'properties.location',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Preparing', 'Ready', 'Scaling', 'Deleting' ]
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'properties.vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetResourceGroupName: {
+ required: false,
+ serializedName: 'properties.vnetResourceGroupName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetSubnetName: {
+ required: false,
+ serializedName: 'properties.vnetSubnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ virtualNetwork: {
+ required: true,
+ serializedName: 'properties.virtualNetwork',
+ type: {
+ name: 'Composite',
+ className: 'VirtualNetworkProfile'
+ }
+ },
+ internalLoadBalancingMode: {
+ required: false,
+ serializedName: 'properties.internalLoadBalancingMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'None', 'Web', 'Publishing' ]
+ }
+ },
+ multiSize: {
+ required: false,
+ serializedName: 'properties.multiSize',
+ type: {
+ name: 'String'
+ }
+ },
+ multiRoleCount: {
+ required: false,
+ serializedName: 'properties.multiRoleCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ workerPools: {
+ required: true,
+ serializedName: 'properties.workerPools',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'WorkerPoolElementType',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPool'
+ }
+ }
+ }
+ },
+ ipsslAddressCount: {
+ required: false,
+ serializedName: 'properties.ipsslAddressCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ databaseEdition: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.databaseEdition',
+ type: {
+ name: 'String'
+ }
+ },
+ databaseServiceObjective: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.databaseServiceObjective',
+ type: {
+ name: 'String'
+ }
+ },
+ upgradeDomains: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.upgradeDomains',
+ type: {
+ name: 'Number'
+ }
+ },
+ subscriptionId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subscriptionId',
+ type: {
+ name: 'String'
+ }
+ },
+ dnsSuffix: {
+ required: false,
+ serializedName: 'properties.dnsSuffix',
+ type: {
+ name: 'String'
+ }
+ },
+ lastAction: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastAction',
+ type: {
+ name: 'String'
+ }
+ },
+ lastActionResult: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastActionResult',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedMultiSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.allowedMultiSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedWorkerSizes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.allowedWorkerSizes',
+ type: {
+ name: 'String'
+ }
+ },
+ maximumNumberOfMachines: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maximumNumberOfMachines',
+ type: {
+ name: 'Number'
+ }
+ },
+ vipMappings: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.vipMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualIPMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualIPMapping'
+ }
+ }
+ }
+ },
+ environmentCapacities: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentCapacities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StampCapacityElementType',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacity'
+ }
+ }
+ }
+ },
+ networkAccessControlList: {
+ required: false,
+ serializedName: 'properties.networkAccessControlList',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NetworkAccessControlEntryElementType',
+ type: {
+ name: 'Composite',
+ className: 'NetworkAccessControlEntry'
+ }
+ }
+ }
+ },
+ environmentIsHealthy: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentIsHealthy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ environmentStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.environmentStatus',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ frontEndScaleFactor: {
+ required: false,
+ serializedName: 'properties.frontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ defaultFrontEndScaleFactor: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.defaultFrontEndScaleFactor',
+ type: {
+ name: 'Number'
+ }
+ },
+ apiManagementAccountId: {
+ required: false,
+ serializedName: 'properties.apiManagementAccountId',
+ type: {
+ name: 'String'
+ }
+ },
+ suspended: {
+ required: false,
+ serializedName: 'properties.suspended',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ dynamicCacheEnabled: {
+ required: false,
+ serializedName: 'properties.dynamicCacheEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ clusterSettings: {
+ required: false,
+ serializedName: 'properties.clusterSettings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ },
+ userWhitelistedIpRanges: {
+ required: false,
+ serializedName: 'properties.userWhitelistedIpRanges',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServiceEnvironmentResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServicePlan.js b/lib/services/websiteManagement2/lib/lib/models/appServicePlan.js
new file mode 100644
index 0000000000..b8ecc0f0b9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServicePlan.js
@@ -0,0 +1,296 @@
+/*
+ * 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');
+
+/**
+ * App Service plan.
+ *
+ * @extends models['Resource']
+ */
+class AppServicePlan extends models['Resource'] {
+ /**
+ * Create a AppServicePlan.
+ * @member {string} appServicePlanName Name for the App Service plan.
+ * @member {string} [workerTierName] Target worker tier assigned to the App
+ * Service plan.
+ * @member {string} [status] App Service plan status. Possible values
+ * include: 'Ready', 'Pending', 'Creating'
+ * @member {string} [subscription] App Service plan subscription.
+ * @member {string} [adminSiteName] App Service plan administration site.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the App Service plan.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {number} [maximumNumberOfWorkers] Maximum number of instances that
+ * can be assigned to this App Service plan.
+ * @member {string} [geoRegion] Geographical location for the App Service
+ * plan.
+ * @member {boolean} [perSiteScaling] If true, apps assigned to
+ * this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale
+ * to all instances of the plan. Default value: false .
+ * @member {number} [numberOfSites] Number of apps assigned to this App
+ * Service plan.
+ * @member {boolean} [isSpot] If true, this App Service Plan
+ * owns spot instances.
+ * @member {date} [spotExpirationTime] The time when the server farm expires.
+ * Valid only if it is a spot server farm.
+ * @member {string} [resourceGroup] Resource group of the App Service plan.
+ * @member {boolean} [reserved] If Linux app service plan true,
+ * false otherwise. Default value: false .
+ * @member {number} [targetWorkerCount] Scaling worker count.
+ * @member {number} [targetWorkerSizeId] Scaling worker size ID.
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {object} [sku]
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to
+ * the resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of
+ * the SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is
+ * traffic manager enabled?
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServicePlan
+ *
+ * @returns {object} metadata of AppServicePlan
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServicePlan',
+ type: {
+ name: 'Composite',
+ className: 'AppServicePlan',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ appServicePlanName: {
+ required: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ workerTierName: {
+ required: false,
+ serializedName: 'properties.workerTierName',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Ready', 'Pending', 'Creating' ]
+ }
+ },
+ subscription: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subscription',
+ type: {
+ name: 'String'
+ }
+ },
+ adminSiteName: {
+ required: false,
+ serializedName: 'properties.adminSiteName',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ maximumNumberOfWorkers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maximumNumberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ geoRegion: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.geoRegion',
+ type: {
+ name: 'String'
+ }
+ },
+ perSiteScaling: {
+ required: false,
+ serializedName: 'properties.perSiteScaling',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ numberOfSites: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.numberOfSites',
+ type: {
+ name: 'Number'
+ }
+ },
+ isSpot: {
+ required: false,
+ serializedName: 'properties.isSpot',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ spotExpirationTime: {
+ required: false,
+ serializedName: 'properties.spotExpirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ reserved: {
+ required: false,
+ serializedName: 'properties.reserved',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ targetWorkerCount: {
+ required: false,
+ serializedName: 'properties.targetWorkerCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ targetWorkerSizeId: {
+ required: false,
+ serializedName: 'properties.targetWorkerSizeId',
+ type: {
+ name: 'Number'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ sku: {
+ required: false,
+ serializedName: 'sku',
+ type: {
+ name: 'Composite',
+ className: 'SkuDescription'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServicePlan;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServicePlanCollection.js b/lib/services/websiteManagement2/lib/lib/models/appServicePlanCollection.js
new file mode 100644
index 0000000000..620bda3ea5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServicePlanCollection.js
@@ -0,0 +1,67 @@
+/*
+ * 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 App Service plans.
+ */
+class AppServicePlanCollection extends Array {
+ /**
+ * Create a AppServicePlanCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServicePlanCollection
+ *
+ * @returns {object} metadata of AppServicePlanCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServicePlanCollection',
+ type: {
+ name: 'Composite',
+ className: 'AppServicePlanCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AppServicePlanElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServicePlan'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServicePlanCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/appServicePlanPatchResource.js b/lib/services/websiteManagement2/lib/lib/models/appServicePlanPatchResource.js
new file mode 100644
index 0000000000..e08905aeec
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/appServicePlanPatchResource.js
@@ -0,0 +1,248 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a app service plan.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class AppServicePlanPatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a AppServicePlanPatchResource.
+ * @member {string} appServicePlanPatchResourceName Name for the App Service
+ * plan.
+ * @member {string} [workerTierName] Target worker tier assigned to the App
+ * Service plan.
+ * @member {string} [status] App Service plan status. Possible values
+ * include: 'Ready', 'Pending', 'Creating'
+ * @member {string} [subscription] App Service plan subscription.
+ * @member {string} [adminSiteName] App Service plan administration site.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the App Service plan.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {number} [maximumNumberOfWorkers] Maximum number of instances that
+ * can be assigned to this App Service plan.
+ * @member {string} [geoRegion] Geographical location for the App Service
+ * plan.
+ * @member {boolean} [perSiteScaling] If true, apps assigned to
+ * this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale
+ * to all instances of the plan. Default value: false .
+ * @member {number} [numberOfSites] Number of apps assigned to this App
+ * Service plan.
+ * @member {boolean} [isSpot] If true, this App Service Plan
+ * owns spot instances.
+ * @member {date} [spotExpirationTime] The time when the server farm expires.
+ * Valid only if it is a spot server farm.
+ * @member {string} [resourceGroup] Resource group of the App Service plan.
+ * @member {boolean} [reserved] If Linux app service plan true,
+ * false otherwise. Default value: false .
+ * @member {number} [targetWorkerCount] Scaling worker count.
+ * @member {number} [targetWorkerSizeId] Scaling worker size ID.
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of AppServicePlanPatchResource
+ *
+ * @returns {object} metadata of AppServicePlanPatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AppServicePlanPatchResource',
+ type: {
+ name: 'Composite',
+ className: 'AppServicePlanPatchResource',
+ 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'
+ }
+ },
+ appServicePlanPatchResourceName: {
+ required: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ workerTierName: {
+ required: false,
+ serializedName: 'properties.workerTierName',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Ready', 'Pending', 'Creating' ]
+ }
+ },
+ subscription: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subscription',
+ type: {
+ name: 'String'
+ }
+ },
+ adminSiteName: {
+ required: false,
+ serializedName: 'properties.adminSiteName',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ maximumNumberOfWorkers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maximumNumberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ geoRegion: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.geoRegion',
+ type: {
+ name: 'String'
+ }
+ },
+ perSiteScaling: {
+ required: false,
+ serializedName: 'properties.perSiteScaling',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ numberOfSites: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.numberOfSites',
+ type: {
+ name: 'Number'
+ }
+ },
+ isSpot: {
+ required: false,
+ serializedName: 'properties.isSpot',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ spotExpirationTime: {
+ required: false,
+ serializedName: 'properties.spotExpirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ reserved: {
+ required: false,
+ serializedName: 'properties.reserved',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ targetWorkerCount: {
+ required: false,
+ serializedName: 'properties.targetWorkerCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ targetWorkerSizeId: {
+ required: false,
+ serializedName: 'properties.targetWorkerSizeId',
+ type: {
+ name: 'Number'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AppServicePlanPatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/applicationLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/applicationLogsConfig.js
new file mode 100644
index 0000000000..f807ba5142
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/applicationLogsConfig.js
@@ -0,0 +1,89 @@
+/*
+ * 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');
+
+/**
+ * Application logs configuration.
+ *
+ */
+class ApplicationLogsConfig {
+ /**
+ * Create a ApplicationLogsConfig.
+ * @member {object} [fileSystem] Application logs to file system
+ * configuration.
+ * @member {string} [fileSystem.level] Log level. Possible values include:
+ * 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {object} [azureTableStorage] Application logs to azure table
+ * storage configuration.
+ * @member {string} [azureTableStorage.level] Log level. Possible values
+ * include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [azureTableStorage.sasUrl] SAS URL to an Azure table with
+ * add/query/delete permissions.
+ * @member {object} [azureBlobStorage] Application logs to blob storage
+ * configuration.
+ * @member {string} [azureBlobStorage.level] Log level. Possible values
+ * include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [azureBlobStorage.sasUrl] SAS url to a azure blob
+ * container with read/write/list/delete permissions.
+ * @member {number} [azureBlobStorage.retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ApplicationLogsConfig
+ *
+ * @returns {object} metadata of ApplicationLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ApplicationLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationLogsConfig',
+ modelProperties: {
+ fileSystem: {
+ required: false,
+ serializedName: 'fileSystem',
+ type: {
+ name: 'Composite',
+ className: 'FileSystemApplicationLogsConfig'
+ }
+ },
+ azureTableStorage: {
+ required: false,
+ serializedName: 'azureTableStorage',
+ type: {
+ name: 'Composite',
+ className: 'AzureTableStorageApplicationLogsConfig'
+ }
+ },
+ azureBlobStorage: {
+ required: false,
+ serializedName: 'azureBlobStorage',
+ type: {
+ name: 'Composite',
+ className: 'AzureBlobStorageApplicationLogsConfig'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ApplicationLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/applicationStack.js b/lib/services/websiteManagement2/lib/lib/models/applicationStack.js
new file mode 100644
index 0000000000..0a52694422
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/applicationStack.js
@@ -0,0 +1,103 @@
+/*
+ * 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');
+
+/**
+ * Application stack.
+ *
+ */
+class ApplicationStack {
+ /**
+ * Create a ApplicationStack.
+ * @member {string} [name] Application stack name.
+ * @member {string} [display] Application stack display name.
+ * @member {string} [dependency] Application stack dependency.
+ * @member {array} [majorVersions] List of major versions available.
+ * @member {array} [frameworks] List of frameworks associated with
+ * application stack.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ApplicationStack
+ *
+ * @returns {object} metadata of ApplicationStack
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ApplicationStack',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationStack',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ display: {
+ required: false,
+ serializedName: 'display',
+ type: {
+ name: 'String'
+ }
+ },
+ dependency: {
+ required: false,
+ serializedName: 'dependency',
+ type: {
+ name: 'String'
+ }
+ },
+ majorVersions: {
+ required: false,
+ serializedName: 'majorVersions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StackMajorVersionElementType',
+ type: {
+ name: 'Composite',
+ className: 'StackMajorVersion'
+ }
+ }
+ }
+ },
+ frameworks: {
+ required: false,
+ serializedName: 'frameworks',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ApplicationStackElementType',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationStack'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ApplicationStack;
diff --git a/lib/services/websiteManagement2/lib/lib/models/applicationStackCollection.js b/lib/services/websiteManagement2/lib/lib/models/applicationStackCollection.js
new file mode 100644
index 0000000000..03e5ff0ee5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/applicationStackCollection.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 Application Stacks
+ */
+class ApplicationStackCollection extends Array {
+ /**
+ * Create a ApplicationStackCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ApplicationStackCollection
+ *
+ * @returns {object} metadata of ApplicationStackCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ApplicationStackCollection',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationStackCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ApplicationStackElementType',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationStack'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ApplicationStackCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/autoHealActions.js b/lib/services/websiteManagement2/lib/lib/models/autoHealActions.js
new file mode 100644
index 0000000000..c88cabffef
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/autoHealActions.js
@@ -0,0 +1,77 @@
+/*
+ * 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');
+
+/**
+ * Actions which to take by the auto-heal module when a rule is triggered.
+ *
+ */
+class AutoHealActions {
+ /**
+ * Create a AutoHealActions.
+ * @member {string} [actionType] Predefined action to be taken. Possible
+ * values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [customAction] Custom action to be taken.
+ * @member {string} [customAction.exe] Executable to be run.
+ * @member {string} [customAction.parameters] Parameters for the executable.
+ * @member {string} [minProcessExecutionTime] Minimum time the process must
+ * execute
+ * before taking the action
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AutoHealActions
+ *
+ * @returns {object} metadata of AutoHealActions
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AutoHealActions',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealActions',
+ modelProperties: {
+ actionType: {
+ required: false,
+ serializedName: 'actionType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Recycle', 'LogEvent', 'CustomAction' ]
+ }
+ },
+ customAction: {
+ required: false,
+ serializedName: 'customAction',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealCustomAction'
+ }
+ },
+ minProcessExecutionTime: {
+ required: false,
+ serializedName: 'minProcessExecutionTime',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AutoHealActions;
diff --git a/lib/services/websiteManagement2/lib/lib/models/autoHealCustomAction.js b/lib/services/websiteManagement2/lib/lib/models/autoHealCustomAction.js
new file mode 100644
index 0000000000..d60d7dc348
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/autoHealCustomAction.js
@@ -0,0 +1,61 @@
+/*
+ * 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';
+
+/**
+ * Custom action to be executed
+ * when an auto heal rule is triggered.
+ *
+ */
+class AutoHealCustomAction {
+ /**
+ * Create a AutoHealCustomAction.
+ * @member {string} [exe] Executable to be run.
+ * @member {string} [parameters] Parameters for the executable.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AutoHealCustomAction
+ *
+ * @returns {object} metadata of AutoHealCustomAction
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AutoHealCustomAction',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealCustomAction',
+ modelProperties: {
+ exe: {
+ required: false,
+ serializedName: 'exe',
+ type: {
+ name: 'String'
+ }
+ },
+ parameters: {
+ required: false,
+ serializedName: 'parameters',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AutoHealCustomAction;
diff --git a/lib/services/websiteManagement2/lib/lib/models/autoHealRules.js b/lib/services/websiteManagement2/lib/lib/models/autoHealRules.js
new file mode 100644
index 0000000000..345b953e39
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/autoHealRules.js
@@ -0,0 +1,86 @@
+/*
+ * 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');
+
+/**
+ * Rules that can be defined for auto-heal.
+ *
+ */
+class AutoHealRules {
+ /**
+ * Create a AutoHealRules.
+ * @member {object} [triggers] Conditions that describe when to execute the
+ * auto-heal actions.
+ * @member {object} [triggers.requests] A rule based on total requests.
+ * @member {number} [triggers.requests.count] Request Count.
+ * @member {string} [triggers.requests.timeInterval] Time interval.
+ * @member {number} [triggers.privateBytesInKB] A rule based on private
+ * bytes.
+ * @member {array} [triggers.statusCodes] A rule based on status codes.
+ * @member {object} [triggers.slowRequests] A rule based on request execution
+ * time.
+ * @member {string} [triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [triggers.slowRequests.count] Request Count.
+ * @member {string} [triggers.slowRequests.timeInterval] Time interval.
+ * @member {object} [actions] Actions to be executed when a rule is
+ * triggered.
+ * @member {string} [actions.actionType] Predefined action to be taken.
+ * Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [actions.customAction] Custom action to be taken.
+ * @member {string} [actions.customAction.exe] Executable to be run.
+ * @member {string} [actions.customAction.parameters] Parameters for the
+ * executable.
+ * @member {string} [actions.minProcessExecutionTime] Minimum time the
+ * process must execute
+ * before taking the action
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AutoHealRules
+ *
+ * @returns {object} metadata of AutoHealRules
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AutoHealRules',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealRules',
+ modelProperties: {
+ triggers: {
+ required: false,
+ serializedName: 'triggers',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealTriggers'
+ }
+ },
+ actions: {
+ required: false,
+ serializedName: 'actions',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealActions'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AutoHealRules;
diff --git a/lib/services/websiteManagement2/lib/lib/models/autoHealTriggers.js b/lib/services/websiteManagement2/lib/lib/models/autoHealTriggers.js
new file mode 100644
index 0000000000..7d60dca06e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/autoHealTriggers.js
@@ -0,0 +1,93 @@
+/*
+ * 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');
+
+/**
+ * Triggers for auto-heal.
+ *
+ */
+class AutoHealTriggers {
+ /**
+ * Create a AutoHealTriggers.
+ * @member {object} [requests] A rule based on total requests.
+ * @member {number} [requests.count] Request Count.
+ * @member {string} [requests.timeInterval] Time interval.
+ * @member {number} [privateBytesInKB] A rule based on private bytes.
+ * @member {array} [statusCodes] A rule based on status codes.
+ * @member {object} [slowRequests] A rule based on request execution time.
+ * @member {string} [slowRequests.timeTaken] Time taken.
+ * @member {number} [slowRequests.count] Request Count.
+ * @member {string} [slowRequests.timeInterval] Time interval.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AutoHealTriggers
+ *
+ * @returns {object} metadata of AutoHealTriggers
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AutoHealTriggers',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealTriggers',
+ modelProperties: {
+ requests: {
+ required: false,
+ serializedName: 'requests',
+ type: {
+ name: 'Composite',
+ className: 'RequestsBasedTrigger'
+ }
+ },
+ privateBytesInKB: {
+ required: false,
+ serializedName: 'privateBytesInKB',
+ type: {
+ name: 'Number'
+ }
+ },
+ statusCodes: {
+ required: false,
+ serializedName: 'statusCodes',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StatusCodesBasedTriggerElementType',
+ type: {
+ name: 'Composite',
+ className: 'StatusCodesBasedTrigger'
+ }
+ }
+ }
+ },
+ slowRequests: {
+ required: false,
+ serializedName: 'slowRequests',
+ type: {
+ name: 'Composite',
+ className: 'SlowRequestsBasedTrigger'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AutoHealTriggers;
diff --git a/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageApplicationLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageApplicationLogsConfig.js
new file mode 100644
index 0000000000..34571a8b2d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageApplicationLogsConfig.js
@@ -0,0 +1,73 @@
+/*
+ * 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';
+
+/**
+ * Application logs azure blob storage configuration.
+ *
+ */
+class AzureBlobStorageApplicationLogsConfig {
+ /**
+ * Create a AzureBlobStorageApplicationLogsConfig.
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [sasUrl] SAS url to a azure blob container with
+ * read/write/list/delete permissions.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AzureBlobStorageApplicationLogsConfig
+ *
+ * @returns {object} metadata of AzureBlobStorageApplicationLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AzureBlobStorageApplicationLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'AzureBlobStorageApplicationLogsConfig',
+ modelProperties: {
+ level: {
+ required: false,
+ serializedName: 'level',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Off', 'Verbose', 'Information', 'Warning', 'Error' ]
+ }
+ },
+ sasUrl: {
+ required: false,
+ serializedName: 'sasUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ retentionInDays: {
+ required: false,
+ serializedName: 'retentionInDays',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AzureBlobStorageApplicationLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageHttpLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageHttpLogsConfig.js
new file mode 100644
index 0000000000..e7d85bf50e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/azureBlobStorageHttpLogsConfig.js
@@ -0,0 +1,72 @@
+/*
+ * 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';
+
+/**
+ * Http logs to azure blob storage configuration.
+ *
+ */
+class AzureBlobStorageHttpLogsConfig {
+ /**
+ * Create a AzureBlobStorageHttpLogsConfig.
+ * @member {string} [sasUrl] SAS url to a azure blob container with
+ * read/write/list/delete permissions.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [enabled] True if configuration is enabled, false if it
+ * is disabled and null if configuration is not set.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AzureBlobStorageHttpLogsConfig
+ *
+ * @returns {object} metadata of AzureBlobStorageHttpLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AzureBlobStorageHttpLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'AzureBlobStorageHttpLogsConfig',
+ modelProperties: {
+ sasUrl: {
+ required: false,
+ serializedName: 'sasUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ retentionInDays: {
+ required: false,
+ serializedName: 'retentionInDays',
+ type: {
+ name: 'Number'
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'enabled',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AzureBlobStorageHttpLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/azureTableStorageApplicationLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/azureTableStorageApplicationLogsConfig.js
new file mode 100644
index 0000000000..ae109442ed
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/azureTableStorageApplicationLogsConfig.js
@@ -0,0 +1,63 @@
+/*
+ * 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';
+
+/**
+ * Application logs to Azure table storage configuration.
+ *
+ */
+class AzureTableStorageApplicationLogsConfig {
+ /**
+ * Create a AzureTableStorageApplicationLogsConfig.
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} sasUrl SAS URL to an Azure table with add/query/delete
+ * permissions.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of AzureTableStorageApplicationLogsConfig
+ *
+ * @returns {object} metadata of AzureTableStorageApplicationLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'AzureTableStorageApplicationLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'AzureTableStorageApplicationLogsConfig',
+ modelProperties: {
+ level: {
+ required: false,
+ serializedName: 'level',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Off', 'Verbose', 'Information', 'Warning', 'Error' ]
+ }
+ },
+ sasUrl: {
+ required: true,
+ serializedName: 'sasUrl',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = AzureTableStorageApplicationLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/backupItem.js b/lib/services/websiteManagement2/lib/lib/models/backupItem.js
new file mode 100644
index 0000000000..abff5af787
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/backupItem.js
@@ -0,0 +1,223 @@
+/*
+ * 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');
+
+/**
+ * Backup description.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class BackupItem extends models['ProxyOnlyResource'] {
+ /**
+ * Create a BackupItem.
+ * @member {number} [backupId] Id of the backup.
+ * @member {string} [storageAccountUrl] SAS URL for the storage account
+ * container which contains this backup.
+ * @member {string} [blobName] Name of the blob which contains data for this
+ * backup.
+ * @member {string} [backupItemName] Name of this backup.
+ * @member {string} [status] Backup status. Possible values include:
+ * 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped',
+ * 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted'
+ * @member {number} [sizeInBytes] Size of the backup in bytes.
+ * @member {date} [created] Timestamp of the backup creation.
+ * @member {string} [log] Details regarding this backup. Might contain an
+ * error message.
+ * @member {array} [databases] List of databases included in the backup.
+ * @member {boolean} [scheduled] True if this backup has been created due to
+ * a schedule being triggered.
+ * @member {date} [lastRestoreTimeStamp] Timestamp of a last restore
+ * operation which used this backup.
+ * @member {date} [finishedTimeStamp] Timestamp when this backup finished.
+ * @member {string} [correlationId] Unique correlation identifier. Please use
+ * this along with the timestamp while communicating with Azure support.
+ * @member {number} [websiteSizeInBytes] Size of the original web app which
+ * has been backed up.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of BackupItem
+ *
+ * @returns {object} metadata of BackupItem
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BackupItem',
+ type: {
+ name: 'Composite',
+ className: 'BackupItem',
+ 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'
+ }
+ },
+ backupId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.id',
+ type: {
+ name: 'Number'
+ }
+ },
+ storageAccountUrl: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.storageAccountUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ blobName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.blobName',
+ type: {
+ name: 'String'
+ }
+ },
+ backupItemName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted' ]
+ }
+ },
+ sizeInBytes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.sizeInBytes',
+ type: {
+ name: 'Number'
+ }
+ },
+ created: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.created',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ log: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.log',
+ type: {
+ name: 'String'
+ }
+ },
+ databases: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.databases',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DatabaseBackupSettingElementType',
+ type: {
+ name: 'Composite',
+ className: 'DatabaseBackupSetting'
+ }
+ }
+ }
+ },
+ scheduled: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.scheduled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ lastRestoreTimeStamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastRestoreTimeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ finishedTimeStamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.finishedTimeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ correlationId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.correlationId',
+ type: {
+ name: 'String'
+ }
+ },
+ websiteSizeInBytes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.websiteSizeInBytes',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BackupItem;
diff --git a/lib/services/websiteManagement2/lib/lib/models/backupItemCollection.js b/lib/services/websiteManagement2/lib/lib/models/backupItemCollection.js
new file mode 100644
index 0000000000..769f26fe98
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/backupItemCollection.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 backup items.
+ */
+class BackupItemCollection extends Array {
+ /**
+ * Create a BackupItemCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of BackupItemCollection
+ *
+ * @returns {object} metadata of BackupItemCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BackupItemCollection',
+ type: {
+ name: 'Composite',
+ className: 'BackupItemCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'BackupItemElementType',
+ type: {
+ name: 'Composite',
+ className: 'BackupItem'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BackupItemCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/backupRequest.js b/lib/services/websiteManagement2/lib/lib/models/backupRequest.js
new file mode 100644
index 0000000000..dba65bf110
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/backupRequest.js
@@ -0,0 +1,157 @@
+/*
+ * 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');
+
+/**
+ * Description of a backup which will be performed.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class BackupRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a BackupRequest.
+ * @member {string} backupRequestName Name of the backup.
+ * @member {boolean} [enabled] True if the backup schedule is enabled (must
+ * be included in that case), false if the backup schedule should be
+ * disabled.
+ * @member {string} storageAccountUrl SAS URL to the container.
+ * @member {object} [backupSchedule] Schedule for the backup if it is
+ * executed periodically.
+ * @member {number} [backupSchedule.frequencyInterval] How often the backup
+ * should be executed (e.g. for weekly backup, this should be set to 7 and
+ * FrequencyUnit should be set to Day)
+ * @member {string} [backupSchedule.frequencyUnit] The unit of time for how
+ * often the backup should be executed (e.g. for weekly backup, this should
+ * be set to Day and FrequencyInterval should be set to 7). Possible values
+ * include: 'Day', 'Hour'
+ * @member {boolean} [backupSchedule.keepAtLeastOneBackup] True if the
+ * retention policy should always keep at least one backup in the storage
+ * account, regardless how old it is; false otherwise.
+ * @member {number} [backupSchedule.retentionPeriodInDays] After how many
+ * days backups should be deleted.
+ * @member {date} [backupSchedule.startTime] When the schedule should start
+ * working.
+ * @member {date} [backupSchedule.lastExecutionTime] Last time when this
+ * schedule was triggered.
+ * @member {array} [databases] Databases included in the backup.
+ * @member {string} [backupRequestType] Type of the backup. Possible values
+ * include: 'Default', 'Clone', 'Relocation', 'Snapshot'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of BackupRequest
+ *
+ * @returns {object} metadata of BackupRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BackupRequest',
+ type: {
+ name: 'Composite',
+ className: 'BackupRequest',
+ 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'
+ }
+ },
+ backupRequestName: {
+ required: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'properties.enabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ storageAccountUrl: {
+ required: true,
+ serializedName: 'properties.storageAccountUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ backupSchedule: {
+ required: false,
+ serializedName: 'properties.backupSchedule',
+ type: {
+ name: 'Composite',
+ className: 'BackupSchedule'
+ }
+ },
+ databases: {
+ required: false,
+ serializedName: 'properties.databases',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DatabaseBackupSettingElementType',
+ type: {
+ name: 'Composite',
+ className: 'DatabaseBackupSetting'
+ }
+ }
+ }
+ },
+ backupRequestType: {
+ required: false,
+ serializedName: 'properties.type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Default', 'Clone', 'Relocation', 'Snapshot' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BackupRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/backupSchedule.js b/lib/services/websiteManagement2/lib/lib/models/backupSchedule.js
new file mode 100644
index 0000000000..b8d86ca61a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/backupSchedule.js
@@ -0,0 +1,108 @@
+/*
+ * 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';
+
+/**
+ * Description of a backup schedule. Describes how often should be the backup
+ * performed and what should be the retention policy.
+ *
+ */
+class BackupSchedule {
+ /**
+ * Create a BackupSchedule.
+ * @member {number} frequencyInterval How often the backup should be executed
+ * (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should
+ * be set to Day). Default value: 7 .
+ * @member {string} frequencyUnit The unit of time for how often the backup
+ * should be executed (e.g. for weekly backup, this should be set to Day and
+ * FrequencyInterval should be set to 7). Possible values include: 'Day',
+ * 'Hour'. Default value: 'Day' .
+ * @member {boolean} keepAtLeastOneBackup True if the retention policy should
+ * always keep at least one backup in the storage account, regardless how old
+ * it is; false otherwise. Default value: true .
+ * @member {number} retentionPeriodInDays After how many days backups should
+ * be deleted. Default value: 30 .
+ * @member {date} [startTime] When the schedule should start working.
+ * @member {date} [lastExecutionTime] Last time when this schedule was
+ * triggered.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of BackupSchedule
+ *
+ * @returns {object} metadata of BackupSchedule
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BackupSchedule',
+ type: {
+ name: 'Composite',
+ className: 'BackupSchedule',
+ modelProperties: {
+ frequencyInterval: {
+ required: true,
+ serializedName: 'frequencyInterval',
+ defaultValue: 7,
+ type: {
+ name: 'Number'
+ }
+ },
+ frequencyUnit: {
+ required: true,
+ serializedName: 'frequencyUnit',
+ defaultValue: 'Day',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Day', 'Hour' ]
+ }
+ },
+ keepAtLeastOneBackup: {
+ required: true,
+ serializedName: 'keepAtLeastOneBackup',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ retentionPeriodInDays: {
+ required: true,
+ serializedName: 'retentionPeriodInDays',
+ defaultValue: 30,
+ type: {
+ name: 'Number'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ lastExecutionTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'lastExecutionTime',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BackupSchedule;
diff --git a/lib/services/websiteManagement2/lib/lib/models/billingMeter.js b/lib/services/websiteManagement2/lib/lib/models/billingMeter.js
new file mode 100644
index 0000000000..14229378b7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/billingMeter.js
@@ -0,0 +1,121 @@
+/*
+ * 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');
+
+/**
+ * App Service billing entity that contains information about meter which the
+ * Azure billing system utilizes to charge users for services.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class BillingMeter extends models['ProxyOnlyResource'] {
+ /**
+ * Create a BillingMeter.
+ * @member {string} [meterId] Meter GUID onboarded in Commerce
+ * @member {string} [billingLocation] Azure Location of billable resource
+ * @member {string} [shortName] Short Name from App Service Azure pricing
+ * Page
+ * @member {string} [friendlyName] Friendly name of the meter
+ * @member {string} [resourceType] App Service resource type meter used for
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of BillingMeter
+ *
+ * @returns {object} metadata of BillingMeter
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BillingMeter',
+ type: {
+ name: 'Composite',
+ className: 'BillingMeter',
+ 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'
+ }
+ },
+ meterId: {
+ required: false,
+ serializedName: 'properties.meterId',
+ type: {
+ name: 'String'
+ }
+ },
+ billingLocation: {
+ required: false,
+ serializedName: 'properties.billingLocation',
+ type: {
+ name: 'String'
+ }
+ },
+ shortName: {
+ required: false,
+ serializedName: 'properties.shortName',
+ type: {
+ name: 'String'
+ }
+ },
+ friendlyName: {
+ required: false,
+ serializedName: 'properties.friendlyName',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceType: {
+ required: false,
+ serializedName: 'properties.resourceType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BillingMeter;
diff --git a/lib/services/websiteManagement2/lib/lib/models/billingMeterCollection.js b/lib/services/websiteManagement2/lib/lib/models/billingMeterCollection.js
new file mode 100644
index 0000000000..731a97562d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/billingMeterCollection.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 Billing Meters
+ */
+class BillingMeterCollection extends Array {
+ /**
+ * Create a BillingMeterCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of BillingMeterCollection
+ *
+ * @returns {object} metadata of BillingMeterCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'BillingMeterCollection',
+ type: {
+ name: 'Composite',
+ className: 'BillingMeterCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'BillingMeterElementType',
+ type: {
+ name: 'Composite',
+ className: 'BillingMeter'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = BillingMeterCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/capability.js b/lib/services/websiteManagement2/lib/lib/models/capability.js
new file mode 100644
index 0000000000..1d81f3149e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/capability.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';
+
+/**
+ * Describes the capabilities/features allowed for a specific SKU.
+ *
+ */
+class Capability {
+ /**
+ * Create a Capability.
+ * @member {string} [name] Name of the SKU capability.
+ * @member {string} [value] Value of the SKU capability.
+ * @member {string} [reason] Reason of the SKU capability.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Capability
+ *
+ * @returns {object} metadata of Capability
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Capability',
+ type: {
+ name: 'Composite',
+ className: 'Capability',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ value: {
+ required: false,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ },
+ reason: {
+ required: false,
+ serializedName: 'reason',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Capability;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificate.js b/lib/services/websiteManagement2/lib/lib/models/certificate.js
new file mode 100644
index 0000000000..200bd1eaf4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificate.js
@@ -0,0 +1,297 @@
+/*
+ * 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');
+
+/**
+ * SSL certificate for an app.
+ *
+ * @extends models['Resource']
+ */
+class Certificate extends models['Resource'] {
+ /**
+ * Create a Certificate.
+ * @member {string} [friendlyName] Friendly name of the certificate.
+ * @member {string} [subjectName] Subject name of the certificate.
+ * @member {array} [hostNames] Host names the certificate applies to.
+ * @member {buffer} [pfxBlob] Pfx blob.
+ * @member {string} [siteName] App name.
+ * @member {string} [selfLink] Self link.
+ * @member {string} [issuer] Certificate issuer.
+ * @member {date} [issueDate] Certificate issue Date.
+ * @member {date} [expirationDate] Certificate expriration date.
+ * @member {string} password Certificate password.
+ * @member {string} [thumbprint] Certificate thumbprint.
+ * @member {boolean} [valid] Is the certificate valid?.
+ * @member {buffer} [cerBlob] Raw bytes of .cer file
+ * @member {string} [publicKeyHash] Public key hash.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the certificate.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {string} [keyVaultId] Key Vault Csm resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [keyVaultSecretStatus] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ * @member {string} [geoRegion] Region of the certificate.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Certificate
+ *
+ * @returns {object} metadata of Certificate
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Certificate',
+ type: {
+ name: 'Composite',
+ className: 'Certificate',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ friendlyName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.friendlyName',
+ type: {
+ name: 'String'
+ }
+ },
+ subjectName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subjectName',
+ type: {
+ name: 'String'
+ }
+ },
+ hostNames: {
+ required: false,
+ serializedName: 'properties.hostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ pfxBlob: {
+ required: false,
+ serializedName: 'properties.pfxBlob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ siteName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.siteName',
+ type: {
+ name: 'String'
+ }
+ },
+ selfLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.selfLink',
+ type: {
+ name: 'String'
+ }
+ },
+ issuer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.issuer',
+ type: {
+ name: 'String'
+ }
+ },
+ issueDate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.issueDate',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationDate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationDate',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ password: {
+ required: true,
+ serializedName: 'properties.password',
+ type: {
+ name: 'String'
+ }
+ },
+ thumbprint: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.thumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ valid: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.valid',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ cerBlob: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.cerBlob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ publicKeyHash: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.publicKeyHash',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ keyVaultId: {
+ required: false,
+ serializedName: 'properties.keyVaultId',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretName: {
+ required: false,
+ serializedName: 'properties.keyVaultSecretName',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.keyVaultSecretStatus',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
+ }
+ },
+ geoRegion: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.geoRegion',
+ type: {
+ name: 'String'
+ }
+ },
+ serverFarmId: {
+ required: false,
+ serializedName: 'properties.serverFarmId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Certificate;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificateCollection.js b/lib/services/websiteManagement2/lib/lib/models/certificateCollection.js
new file mode 100644
index 0000000000..43f9fd446c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificateCollection.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 certificates.
+ */
+class CertificateCollection extends Array {
+ /**
+ * Create a CertificateCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CertificateCollection
+ *
+ * @returns {object} metadata of CertificateCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CertificateCollection',
+ type: {
+ name: 'Composite',
+ className: 'CertificateCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CertificateElementType',
+ type: {
+ name: 'Composite',
+ className: 'Certificate'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CertificateCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificateDetails.js b/lib/services/websiteManagement2/lib/lib/models/certificateDetails.js
new file mode 100644
index 0000000000..affae5c9fc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificateDetails.js
@@ -0,0 +1,125 @@
+/*
+ * 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';
+
+/**
+ * SSL certificate details.
+ *
+ */
+class CertificateDetails {
+ /**
+ * Create a CertificateDetails.
+ * @member {number} [version] Certificate Version.
+ * @member {string} [serialNumber] Certificate Serial Number.
+ * @member {string} [thumbprint] Certificate Thumbprint.
+ * @member {string} [subject] Certificate Subject.
+ * @member {date} [notBefore] Date Certificate is valid from.
+ * @member {date} [notAfter] Date Certificate is valid to.
+ * @member {string} [signatureAlgorithm] Certificate Signature algorithm.
+ * @member {string} [issuer] Certificate Issuer.
+ * @member {string} [rawData] Raw certificate data.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CertificateDetails
+ *
+ * @returns {object} metadata of CertificateDetails
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CertificateDetails',
+ type: {
+ name: 'Composite',
+ className: 'CertificateDetails',
+ modelProperties: {
+ version: {
+ required: false,
+ readOnly: true,
+ serializedName: 'version',
+ type: {
+ name: 'Number'
+ }
+ },
+ serialNumber: {
+ required: false,
+ readOnly: true,
+ serializedName: 'serialNumber',
+ type: {
+ name: 'String'
+ }
+ },
+ thumbprint: {
+ required: false,
+ readOnly: true,
+ serializedName: 'thumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ subject: {
+ required: false,
+ readOnly: true,
+ serializedName: 'subject',
+ type: {
+ name: 'String'
+ }
+ },
+ notBefore: {
+ required: false,
+ readOnly: true,
+ serializedName: 'notBefore',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ notAfter: {
+ required: false,
+ readOnly: true,
+ serializedName: 'notAfter',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ signatureAlgorithm: {
+ required: false,
+ readOnly: true,
+ serializedName: 'signatureAlgorithm',
+ type: {
+ name: 'String'
+ }
+ },
+ issuer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'issuer',
+ type: {
+ name: 'String'
+ }
+ },
+ rawData: {
+ required: false,
+ readOnly: true,
+ serializedName: 'rawData',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CertificateDetails;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificateEmail.js b/lib/services/websiteManagement2/lib/lib/models/certificateEmail.js
new file mode 100644
index 0000000000..5ffdc8fae5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificateEmail.js
@@ -0,0 +1,95 @@
+/*
+ * 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');
+
+/**
+ * SSL certificate email.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class CertificateEmail extends models['ProxyOnlyResource'] {
+ /**
+ * Create a CertificateEmail.
+ * @member {string} [emailId] Email id.
+ * @member {date} [timeStamp] Time stamp.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CertificateEmail
+ *
+ * @returns {object} metadata of CertificateEmail
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CertificateEmail',
+ type: {
+ name: 'Composite',
+ className: 'CertificateEmail',
+ 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'
+ }
+ },
+ emailId: {
+ required: false,
+ serializedName: 'properties.emailId',
+ type: {
+ name: 'String'
+ }
+ },
+ timeStamp: {
+ required: false,
+ serializedName: 'properties.timeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CertificateEmail;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificateOrderAction.js b/lib/services/websiteManagement2/lib/lib/models/certificateOrderAction.js
new file mode 100644
index 0000000000..fc3635e0c7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificateOrderAction.js
@@ -0,0 +1,102 @@
+/*
+ * 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');
+
+/**
+ * Certificate order action.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class CertificateOrderAction extends models['ProxyOnlyResource'] {
+ /**
+ * Create a CertificateOrderAction.
+ * @member {string} [certificateOrderActionType] Action type. Possible values
+ * include: 'CertificateIssued', 'CertificateOrderCanceled',
+ * 'CertificateOrderCreated', 'CertificateRevoked',
+ * 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange',
+ * 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired',
+ * 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown'
+ * @member {date} [createdAt] Time at which the certificate action was
+ * performed.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CertificateOrderAction
+ *
+ * @returns {object} metadata of CertificateOrderAction
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CertificateOrderAction',
+ type: {
+ name: 'Composite',
+ className: 'CertificateOrderAction',
+ 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'
+ }
+ },
+ certificateOrderActionType: {
+ required: false,
+ serializedName: 'properties.type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' ]
+ }
+ },
+ createdAt: {
+ required: false,
+ serializedName: 'properties.createdAt',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CertificateOrderAction;
diff --git a/lib/services/websiteManagement2/lib/lib/models/certificatePatchResource.js b/lib/services/websiteManagement2/lib/lib/models/certificatePatchResource.js
new file mode 100644
index 0000000000..e68d49ee1a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/certificatePatchResource.js
@@ -0,0 +1,276 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a certificate.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class CertificatePatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a CertificatePatchResource.
+ * @member {string} [friendlyName] Friendly name of the certificate.
+ * @member {string} [subjectName] Subject name of the certificate.
+ * @member {array} [hostNames] Host names the certificate applies to.
+ * @member {buffer} [pfxBlob] Pfx blob.
+ * @member {string} [siteName] App name.
+ * @member {string} [selfLink] Self link.
+ * @member {string} [issuer] Certificate issuer.
+ * @member {date} [issueDate] Certificate issue Date.
+ * @member {date} [expirationDate] Certificate expriration date.
+ * @member {string} password Certificate password.
+ * @member {string} [thumbprint] Certificate thumbprint.
+ * @member {boolean} [valid] Is the certificate valid?.
+ * @member {buffer} [cerBlob] Raw bytes of .cer file
+ * @member {string} [publicKeyHash] Public key hash.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the certificate.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {string} [keyVaultId] Key Vault Csm resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [keyVaultSecretStatus] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ * @member {string} [geoRegion] Region of the certificate.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CertificatePatchResource
+ *
+ * @returns {object} metadata of CertificatePatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CertificatePatchResource',
+ type: {
+ name: 'Composite',
+ className: 'CertificatePatchResource',
+ 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'
+ }
+ },
+ friendlyName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.friendlyName',
+ type: {
+ name: 'String'
+ }
+ },
+ subjectName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.subjectName',
+ type: {
+ name: 'String'
+ }
+ },
+ hostNames: {
+ required: false,
+ serializedName: 'properties.hostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ pfxBlob: {
+ required: false,
+ serializedName: 'properties.pfxBlob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ siteName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.siteName',
+ type: {
+ name: 'String'
+ }
+ },
+ selfLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.selfLink',
+ type: {
+ name: 'String'
+ }
+ },
+ issuer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.issuer',
+ type: {
+ name: 'String'
+ }
+ },
+ issueDate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.issueDate',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationDate: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationDate',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ password: {
+ required: true,
+ serializedName: 'properties.password',
+ type: {
+ name: 'String'
+ }
+ },
+ thumbprint: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.thumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ valid: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.valid',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ cerBlob: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.cerBlob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ publicKeyHash: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.publicKeyHash',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ keyVaultId: {
+ required: false,
+ serializedName: 'properties.keyVaultId',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretName: {
+ required: false,
+ serializedName: 'properties.keyVaultSecretName',
+ type: {
+ name: 'String'
+ }
+ },
+ keyVaultSecretStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.keyVaultSecretStatus',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
+ }
+ },
+ geoRegion: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.geoRegion',
+ type: {
+ name: 'String'
+ }
+ },
+ serverFarmId: {
+ required: false,
+ serializedName: 'properties.serverFarmId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CertificatePatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/cloningInfo.js b/lib/services/websiteManagement2/lib/lib/models/cloningInfo.js
new file mode 100644
index 0000000000..868a356c16
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/cloningInfo.js
@@ -0,0 +1,159 @@
+/*
+ * 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';
+
+/**
+ * Information needed for cloning operation.
+ *
+ */
+class CloningInfo {
+ /**
+ * Create a CloningInfo.
+ * @member {uuid} [correlationId] Correlation ID of cloning operation. This
+ * ID ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [overwrite] true to overwrite destination
+ * app; otherwise, false.
+ * @member {boolean} [cloneCustomHostNames] true to clone custom
+ * hostnames from source app; otherwise, false.
+ * @member {boolean} [cloneSourceControl] true to clone source
+ * control from source app; otherwise, false.
+ * @member {string} sourceWebAppId ARM resource ID of the source app. App
+ * resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [hostingEnvironment] App Service Environment.
+ * @member {object} [appSettingsOverrides] Application setting overrides for
+ * cloned app. If specified, these settings override the settings cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [configureLoadBalancing] true to configure
+ * load balancing for source and destination app.
+ * @member {string} [trafficManagerProfileId] ARM resource ID of the Traffic
+ * Manager profile to use, if it exists. Traffic Manager resource ID is of
+ * the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [trafficManagerProfileName] Name of Traffic Manager
+ * profile to create. This is only needed if Traffic Manager profile does not
+ * already exist.
+ * @member {boolean} [ignoreQuotas] true if quotas should be
+ * ignored; otherwise, false.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CloningInfo
+ *
+ * @returns {object} metadata of CloningInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CloningInfo',
+ type: {
+ name: 'Composite',
+ className: 'CloningInfo',
+ modelProperties: {
+ correlationId: {
+ required: false,
+ serializedName: 'correlationId',
+ type: {
+ name: 'String'
+ }
+ },
+ overwrite: {
+ required: false,
+ serializedName: 'overwrite',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ cloneCustomHostNames: {
+ required: false,
+ serializedName: 'cloneCustomHostNames',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ cloneSourceControl: {
+ required: false,
+ serializedName: 'cloneSourceControl',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ sourceWebAppId: {
+ required: true,
+ serializedName: 'sourceWebAppId',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironment: {
+ required: false,
+ serializedName: 'hostingEnvironment',
+ type: {
+ name: 'String'
+ }
+ },
+ appSettingsOverrides: {
+ required: false,
+ serializedName: 'appSettingsOverrides',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ configureLoadBalancing: {
+ required: false,
+ serializedName: 'configureLoadBalancing',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ trafficManagerProfileId: {
+ required: false,
+ serializedName: 'trafficManagerProfileId',
+ type: {
+ name: 'String'
+ }
+ },
+ trafficManagerProfileName: {
+ required: false,
+ serializedName: 'trafficManagerProfileName',
+ type: {
+ name: 'String'
+ }
+ },
+ ignoreQuotas: {
+ required: false,
+ serializedName: 'ignoreQuotas',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CloningInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/connStringInfo.js b/lib/services/websiteManagement2/lib/lib/models/connStringInfo.js
new file mode 100644
index 0000000000..e45a358633
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/connStringInfo.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';
+
+/**
+ * Database connection string information.
+ *
+ */
+class ConnStringInfo {
+ /**
+ * Create a ConnStringInfo.
+ * @member {string} [name] Name of connection string.
+ * @member {string} [connectionString] Connection string value.
+ * @member {string} [type] Type of database. Possible values include:
+ * 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub',
+ * 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ConnStringInfo
+ *
+ * @returns {object} metadata of ConnStringInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ConnStringInfo',
+ type: {
+ name: 'Composite',
+ className: 'ConnStringInfo',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ connectionString: {
+ required: false,
+ serializedName: 'connectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ serializedName: 'type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ConnStringInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/connStringValueTypePair.js b/lib/services/websiteManagement2/lib/lib/models/connStringValueTypePair.js
new file mode 100644
index 0000000000..b2d1bf7ca1
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/connStringValueTypePair.js
@@ -0,0 +1,63 @@
+/*
+ * 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';
+
+/**
+ * Database connection string value to type pair.
+ *
+ */
+class ConnStringValueTypePair {
+ /**
+ * Create a ConnStringValueTypePair.
+ * @member {string} value Value of pair.
+ * @member {string} type Type of database. Possible values include: 'MySql',
+ * 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus',
+ * 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ConnStringValueTypePair
+ *
+ * @returns {object} metadata of ConnStringValueTypePair
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ConnStringValueTypePair',
+ type: {
+ name: 'Composite',
+ className: 'ConnStringValueTypePair',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: true,
+ serializedName: 'type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ConnStringValueTypePair;
diff --git a/lib/services/websiteManagement2/lib/lib/models/connectionStringDictionary.js b/lib/services/websiteManagement2/lib/lib/models/connectionStringDictionary.js
new file mode 100644
index 0000000000..4166de86d0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/connectionStringDictionary.js
@@ -0,0 +1,95 @@
+/*
+ * 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');
+
+/**
+ * String dictionary resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ConnectionStringDictionary extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ConnectionStringDictionary.
+ * @member {object} [properties] Connection strings.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ConnectionStringDictionary
+ *
+ * @returns {object} metadata of ConnectionStringDictionary
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ConnectionStringDictionary',
+ type: {
+ name: 'Composite',
+ className: 'ConnectionStringDictionary',
+ 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'
+ }
+ },
+ properties: {
+ required: false,
+ serializedName: 'properties',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'ConnStringValueTypePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'ConnStringValueTypePair'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ConnectionStringDictionary;
diff --git a/lib/services/websiteManagement2/lib/lib/models/contact.js b/lib/services/websiteManagement2/lib/lib/models/contact.js
new file mode 100644
index 0000000000..c2d29b5130
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/contact.js
@@ -0,0 +1,131 @@
+/*
+ * 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');
+
+/**
+ * Contact information for domain registration. If 'Domain Privacy' option is
+ * not selected then the contact information is made publicly available through
+ * the Whois
+ * directories as per ICANN requirements.
+ *
+ */
+class Contact {
+ /**
+ * Create a Contact.
+ * @member {object} [addressMailing] Mailing address.
+ * @member {string} [addressMailing.address1] First line of an Address.
+ * @member {string} [addressMailing.address2] The second line of the Address.
+ * Optional.
+ * @member {string} [addressMailing.city] The city for the address.
+ * @member {string} [addressMailing.country] The country for the address.
+ * @member {string} [addressMailing.postalCode] The postal code for the
+ * address.
+ * @member {string} [addressMailing.state] The state or province for the
+ * address.
+ * @member {string} email Email address.
+ * @member {string} [fax] Fax number.
+ * @member {string} [jobTitle] Job title.
+ * @member {string} nameFirst First name.
+ * @member {string} nameLast Last name.
+ * @member {string} [nameMiddle] Middle name.
+ * @member {string} [organization] Organization contact belongs to.
+ * @member {string} phone Phone number.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Contact
+ *
+ * @returns {object} metadata of Contact
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Contact',
+ type: {
+ name: 'Composite',
+ className: 'Contact',
+ modelProperties: {
+ addressMailing: {
+ required: false,
+ serializedName: 'addressMailing',
+ type: {
+ name: 'Composite',
+ className: 'Address'
+ }
+ },
+ email: {
+ required: true,
+ serializedName: 'email',
+ type: {
+ name: 'String'
+ }
+ },
+ fax: {
+ required: false,
+ serializedName: 'fax',
+ type: {
+ name: 'String'
+ }
+ },
+ jobTitle: {
+ required: false,
+ serializedName: 'jobTitle',
+ type: {
+ name: 'String'
+ }
+ },
+ nameFirst: {
+ required: true,
+ serializedName: 'nameFirst',
+ type: {
+ name: 'String'
+ }
+ },
+ nameLast: {
+ required: true,
+ serializedName: 'nameLast',
+ type: {
+ name: 'String'
+ }
+ },
+ nameMiddle: {
+ required: false,
+ serializedName: 'nameMiddle',
+ type: {
+ name: 'String'
+ }
+ },
+ organization: {
+ required: false,
+ serializedName: 'organization',
+ type: {
+ name: 'String'
+ }
+ },
+ phone: {
+ required: true,
+ serializedName: 'phone',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Contact;
diff --git a/lib/services/websiteManagement2/lib/lib/models/continuousWebJob.js b/lib/services/websiteManagement2/lib/lib/models/continuousWebJob.js
new file mode 100644
index 0000000000..ffba08bca7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/continuousWebJob.js
@@ -0,0 +1,180 @@
+/*
+ * 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');
+
+/**
+ * Continuous Web Job Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ContinuousWebJob extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ContinuousWebJob.
+ * @member {string} [status] Job status. Possible values include:
+ * 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped'
+ * @member {string} [detailedStatus] Detailed status.
+ * @member {string} [logUrl] Log URL.
+ * @member {string} [continuousWebJobName] Job name. Used as job identifier
+ * in ARM resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include:
+ * 'Continuous', 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ContinuousWebJob
+ *
+ * @returns {object} metadata of ContinuousWebJob
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ContinuousWebJob',
+ type: {
+ name: 'Composite',
+ className: 'ContinuousWebJob',
+ 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'
+ }
+ },
+ status: {
+ required: false,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped' ]
+ }
+ },
+ detailedStatus: {
+ required: false,
+ serializedName: 'properties.detailedStatus',
+ type: {
+ name: 'String'
+ }
+ },
+ logUrl: {
+ required: false,
+ serializedName: 'properties.logUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ continuousWebJobName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ runCommand: {
+ required: false,
+ serializedName: 'properties.runCommand',
+ type: {
+ name: 'String'
+ }
+ },
+ url: {
+ required: false,
+ serializedName: 'properties.url',
+ type: {
+ name: 'String'
+ }
+ },
+ extraInfoUrl: {
+ required: false,
+ serializedName: 'properties.extraInfoUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ jobType: {
+ required: false,
+ serializedName: 'properties.jobType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Continuous', 'Triggered' ]
+ }
+ },
+ error: {
+ required: false,
+ serializedName: 'properties.error',
+ type: {
+ name: 'String'
+ }
+ },
+ usingSdk: {
+ required: false,
+ serializedName: 'properties.usingSdk',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ settings: {
+ required: false,
+ serializedName: 'properties.settings',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'ObjectElementType',
+ type: {
+ name: 'Object'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ContinuousWebJob;
diff --git a/lib/services/websiteManagement2/lib/lib/models/continuousWebJobCollection.js b/lib/services/websiteManagement2/lib/lib/models/continuousWebJobCollection.js
new file mode 100644
index 0000000000..99a440181a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/continuousWebJobCollection.js
@@ -0,0 +1,67 @@
+/*
+ * 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 Kudu continuous web job information elements.
+ */
+class ContinuousWebJobCollection extends Array {
+ /**
+ * Create a ContinuousWebJobCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ContinuousWebJobCollection
+ *
+ * @returns {object} metadata of ContinuousWebJobCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ContinuousWebJobCollection',
+ type: {
+ name: 'Composite',
+ className: 'ContinuousWebJobCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ContinuousWebJobElementType',
+ type: {
+ name: 'Composite',
+ className: 'ContinuousWebJob'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ContinuousWebJobCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/corsSettings.js b/lib/services/websiteManagement2/lib/lib/models/corsSettings.js
new file mode 100644
index 0000000000..888cff3aac
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/corsSettings.js
@@ -0,0 +1,61 @@
+/*
+ * 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';
+
+/**
+ * Cross-Origin Resource Sharing (CORS) settings for the app.
+ *
+ */
+class CorsSettings {
+ /**
+ * Create a CorsSettings.
+ * @member {array} [allowedOrigins] Gets or sets the list of origins that
+ * should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CorsSettings
+ *
+ * @returns {object} metadata of CorsSettings
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CorsSettings',
+ type: {
+ name: 'Composite',
+ className: 'CorsSettings',
+ modelProperties: {
+ allowedOrigins: {
+ required: false,
+ serializedName: 'allowedOrigins',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CorsSettings;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmMoveResourceEnvelope.js b/lib/services/websiteManagement2/lib/lib/models/csmMoveResourceEnvelope.js
new file mode 100644
index 0000000000..fef33a9910
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmMoveResourceEnvelope.js
@@ -0,0 +1,73 @@
+/*
+ * 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';
+
+/**
+ * Object with a list of the resources that need to be moved and the resource
+ * group they should be moved to.
+ *
+ */
+class CsmMoveResourceEnvelope {
+ /**
+ * Create a CsmMoveResourceEnvelope.
+ * @member {string} [targetResourceGroup]
+ * @member {array} [resources]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmMoveResourceEnvelope
+ *
+ * @returns {object} metadata of CsmMoveResourceEnvelope
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmMoveResourceEnvelope',
+ type: {
+ name: 'Composite',
+ className: 'CsmMoveResourceEnvelope',
+ modelProperties: {
+ targetResourceGroup: {
+ required: false,
+ serializedName: 'targetResourceGroup',
+ constraints: {
+ MaxLength: 90,
+ MinLength: 1,
+ Pattern: ' ^[-\w\._\(\)]+[^\.]$'
+ },
+ type: {
+ name: 'String'
+ }
+ },
+ resources: {
+ required: false,
+ serializedName: 'resources',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmMoveResourceEnvelope;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmOperationCollection.js b/lib/services/websiteManagement2/lib/lib/models/csmOperationCollection.js
new file mode 100644
index 0000000000..24c2e9b665
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmOperationCollection.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 Azure resource manager operation metadata.
+ */
+class CsmOperationCollection extends Array {
+ /**
+ * Create a CsmOperationCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CsmOperationCollection
+ *
+ * @returns {object} metadata of CsmOperationCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmOperationCollection',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CsmOperationDescriptionElementType',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDescription'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmOperationCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmOperationDescription.js b/lib/services/websiteManagement2/lib/lib/models/csmOperationDescription.js
new file mode 100644
index 0000000000..9375a0b953
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmOperationDescription.js
@@ -0,0 +1,86 @@
+/*
+ * 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');
+
+/**
+ * Description of an operation available for Microsoft.Web resource provider.
+ *
+ */
+class CsmOperationDescription {
+ /**
+ * Create a CsmOperationDescription.
+ * @member {string} [name]
+ * @member {object} [display]
+ * @member {string} [display.provider]
+ * @member {string} [display.resource]
+ * @member {string} [display.operation]
+ * @member {string} [display.description]
+ * @member {string} [origin]
+ * @member {object} [properties]
+ * @member {object} [properties.serviceSpecification]
+ * @member {array} [properties.serviceSpecification.metricSpecifications]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmOperationDescription
+ *
+ * @returns {object} metadata of CsmOperationDescription
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmOperationDescription',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDescription',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ display: {
+ required: false,
+ serializedName: 'display',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDisplay'
+ }
+ },
+ origin: {
+ required: false,
+ serializedName: 'origin',
+ type: {
+ name: 'String'
+ }
+ },
+ properties: {
+ required: false,
+ serializedName: 'properties',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDescriptionProperties'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmOperationDescription;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmOperationDescriptionProperties.js b/lib/services/websiteManagement2/lib/lib/models/csmOperationDescriptionProperties.js
new file mode 100644
index 0000000000..77631076bc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmOperationDescriptionProperties.js
@@ -0,0 +1,56 @@
+/*
+ * 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');
+
+/**
+ * Properties available for a Microsoft.Web resource provider operation.
+ *
+ */
+class CsmOperationDescriptionProperties {
+ /**
+ * Create a CsmOperationDescriptionProperties.
+ * @member {object} [serviceSpecification]
+ * @member {array} [serviceSpecification.metricSpecifications]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmOperationDescriptionProperties
+ *
+ * @returns {object} metadata of CsmOperationDescriptionProperties
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmOperationDescriptionProperties',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDescriptionProperties',
+ modelProperties: {
+ serviceSpecification: {
+ required: false,
+ serializedName: 'serviceSpecification',
+ type: {
+ name: 'Composite',
+ className: 'ServiceSpecification'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmOperationDescriptionProperties;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmOperationDisplay.js b/lib/services/websiteManagement2/lib/lib/models/csmOperationDisplay.js
new file mode 100644
index 0000000000..fa90f6c44d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmOperationDisplay.js
@@ -0,0 +1,76 @@
+/*
+ * 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';
+
+/**
+ * Meta data about operation used for display in portal.
+ *
+ */
+class CsmOperationDisplay {
+ /**
+ * Create a CsmOperationDisplay.
+ * @member {string} [provider]
+ * @member {string} [resource]
+ * @member {string} [operation]
+ * @member {string} [description]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmOperationDisplay
+ *
+ * @returns {object} metadata of CsmOperationDisplay
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmOperationDisplay',
+ type: {
+ name: 'Composite',
+ className: 'CsmOperationDisplay',
+ modelProperties: {
+ provider: {
+ required: false,
+ serializedName: 'provider',
+ type: {
+ name: 'String'
+ }
+ },
+ resource: {
+ required: false,
+ serializedName: 'resource',
+ type: {
+ name: 'String'
+ }
+ },
+ operation: {
+ required: false,
+ serializedName: 'operation',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmOperationDisplay;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmPublishingProfileOptions.js b/lib/services/websiteManagement2/lib/lib/models/csmPublishingProfileOptions.js
new file mode 100644
index 0000000000..1311235ff5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmPublishingProfileOptions.js
@@ -0,0 +1,55 @@
+/*
+ * 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';
+
+/**
+ * Publishing options for requested profile.
+ *
+ */
+class CsmPublishingProfileOptions {
+ /**
+ * Create a CsmPublishingProfileOptions.
+ * @member {string} [format] Name of the format. Valid values are:
+ * FileZilla3
+ * WebDeploy -- default
+ * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmPublishingProfileOptions
+ *
+ * @returns {object} metadata of CsmPublishingProfileOptions
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmPublishingProfileOptions',
+ type: {
+ name: 'Composite',
+ className: 'CsmPublishingProfileOptions',
+ modelProperties: {
+ format: {
+ required: false,
+ serializedName: 'format',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmPublishingProfileOptions;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmSlotEntity.js b/lib/services/websiteManagement2/lib/lib/models/csmSlotEntity.js
new file mode 100644
index 0000000000..286ea2fdd5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmSlotEntity.js
@@ -0,0 +1,62 @@
+/*
+ * 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';
+
+/**
+ * Deployment slot parameters.
+ *
+ */
+class CsmSlotEntity {
+ /**
+ * Create a CsmSlotEntity.
+ * @member {string} targetSlot Destination deployment slot during swap
+ * operation.
+ * @member {boolean} preserveVnet true to preserve Virtual
+ * Network to the slot during swap; otherwise, false.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmSlotEntity
+ *
+ * @returns {object} metadata of CsmSlotEntity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmSlotEntity',
+ type: {
+ name: 'Composite',
+ className: 'CsmSlotEntity',
+ modelProperties: {
+ targetSlot: {
+ required: true,
+ serializedName: 'targetSlot',
+ type: {
+ name: 'String'
+ }
+ },
+ preserveVnet: {
+ required: true,
+ serializedName: 'preserveVnet',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmSlotEntity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmUsageQuota.js b/lib/services/websiteManagement2/lib/lib/models/csmUsageQuota.js
new file mode 100644
index 0000000000..9d8687b3bc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmUsageQuota.js
@@ -0,0 +1,89 @@
+/*
+ * 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');
+
+/**
+ * Usage of the quota resource.
+ *
+ */
+class CsmUsageQuota {
+ /**
+ * Create a CsmUsageQuota.
+ * @member {string} [unit] Units of measurement for the quota resourse.
+ * @member {date} [nextResetTime] Next reset time for the resource counter.
+ * @member {number} [currentValue] The current value of the resource counter.
+ * @member {number} [limit] The resource limit.
+ * @member {object} [name] Quota name.
+ * @member {string} [name.value] Non-localized name.
+ * @member {string} [name.localizedValue] Localized name.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of CsmUsageQuota
+ *
+ * @returns {object} metadata of CsmUsageQuota
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmUsageQuota',
+ type: {
+ name: 'Composite',
+ className: 'CsmUsageQuota',
+ modelProperties: {
+ unit: {
+ required: false,
+ serializedName: 'unit',
+ type: {
+ name: 'String'
+ }
+ },
+ nextResetTime: {
+ required: false,
+ serializedName: 'nextResetTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ currentValue: {
+ required: false,
+ serializedName: 'currentValue',
+ type: {
+ name: 'Number'
+ }
+ },
+ limit: {
+ required: false,
+ serializedName: 'limit',
+ type: {
+ name: 'Number'
+ }
+ },
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'Composite',
+ className: 'LocalizableString'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmUsageQuota;
diff --git a/lib/services/websiteManagement2/lib/lib/models/csmUsageQuotaCollection.js b/lib/services/websiteManagement2/lib/lib/models/csmUsageQuotaCollection.js
new file mode 100644
index 0000000000..80459abab5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/csmUsageQuotaCollection.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 CSM usage quotas.
+ */
+class CsmUsageQuotaCollection extends Array {
+ /**
+ * Create a CsmUsageQuotaCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CsmUsageQuotaCollection
+ *
+ * @returns {object} metadata of CsmUsageQuotaCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CsmUsageQuotaCollection',
+ type: {
+ name: 'Composite',
+ className: 'CsmUsageQuotaCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CsmUsageQuotaElementType',
+ type: {
+ name: 'Composite',
+ className: 'CsmUsageQuota'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CsmUsageQuotaCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/customHostnameAnalysisResult.js b/lib/services/websiteManagement2/lib/lib/models/customHostnameAnalysisResult.js
new file mode 100644
index 0000000000..e141ca367e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/customHostnameAnalysisResult.js
@@ -0,0 +1,232 @@
+/*
+ * 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');
+
+/**
+ * Custom domain analysis.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class CustomHostnameAnalysisResult extends models['ProxyOnlyResource'] {
+ /**
+ * Create a CustomHostnameAnalysisResult.
+ * @member {boolean} [isHostnameAlreadyVerified] true if
+ * hostname is already verified; otherwise, false.
+ * @member {string} [customDomainVerificationTest] DNS verification test
+ * result. Possible values include: 'Passed', 'Failed', 'Skipped'
+ * @member {object} [customDomainVerificationFailureInfo] Raw failure
+ * information if DNS verification fails.
+ * @member {string} [customDomainVerificationFailureInfo.extendedCode] Type
+ * of error.
+ * @member {string} [customDomainVerificationFailureInfo.messageTemplate]
+ * Message template.
+ * @member {array} [customDomainVerificationFailureInfo.parameters]
+ * Parameters for the template.
+ * @member {array} [customDomainVerificationFailureInfo.innerErrors] Inner
+ * errors.
+ * @member {string} [customDomainVerificationFailureInfo.code] Basic error
+ * code.
+ * @member {string} [customDomainVerificationFailureInfo.message] Any details
+ * of the error.
+ * @member {boolean} [hasConflictOnScaleUnit] true if there is a
+ * conflict on a scale unit; otherwise, false.
+ * @member {boolean} [hasConflictAcrossSubscription] true if
+ * htere is a conflict across subscriptions; otherwise, false.
+ * @member {string} [conflictingAppResourceId] Name of the conflicting app on
+ * scale unit if it's within the same subscription.
+ * @member {array} [cNameRecords] CName records controller can see for this
+ * hostname.
+ * @member {array} [txtRecords] TXT records controller can see for this
+ * hostname.
+ * @member {array} [aRecords] A records controller can see for this hostname.
+ * @member {array} [alternateCNameRecords] Alternate CName records controller
+ * can see for this hostname.
+ * @member {array} [alternateTxtRecords] Alternate TXT records controller can
+ * see for this hostname.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of CustomHostnameAnalysisResult
+ *
+ * @returns {object} metadata of CustomHostnameAnalysisResult
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'CustomHostnameAnalysisResult',
+ type: {
+ name: 'Composite',
+ className: 'CustomHostnameAnalysisResult',
+ 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'
+ }
+ },
+ isHostnameAlreadyVerified: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isHostnameAlreadyVerified',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ customDomainVerificationTest: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.customDomainVerificationTest',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Passed', 'Failed', 'Skipped' ]
+ }
+ },
+ customDomainVerificationFailureInfo: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.customDomainVerificationFailureInfo',
+ type: {
+ name: 'Composite',
+ className: 'ErrorEntity'
+ }
+ },
+ hasConflictOnScaleUnit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hasConflictOnScaleUnit',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ hasConflictAcrossSubscription: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hasConflictAcrossSubscription',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ conflictingAppResourceId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.conflictingAppResourceId',
+ type: {
+ name: 'String'
+ }
+ },
+ cNameRecords: {
+ required: false,
+ serializedName: 'properties.cNameRecords',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ txtRecords: {
+ required: false,
+ serializedName: 'properties.txtRecords',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ aRecords: {
+ required: false,
+ serializedName: 'properties.aRecords',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ alternateCNameRecords: {
+ required: false,
+ serializedName: 'properties.alternateCNameRecords',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ alternateTxtRecords: {
+ required: false,
+ serializedName: 'properties.alternateTxtRecords',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = CustomHostnameAnalysisResult;
diff --git a/lib/services/websiteManagement2/lib/lib/models/dataSource.js b/lib/services/websiteManagement2/lib/lib/models/dataSource.js
new file mode 100644
index 0000000000..1e4d2a6438
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/dataSource.js
@@ -0,0 +1,77 @@
+/*
+ * 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 data source used by the detectors
+ *
+ */
+class DataSource {
+ /**
+ * Create a DataSource.
+ * @member {array} [instructions] Instrunctions if any for the data source
+ * @member {array} [dataSourceUri] Datasource Uri Links
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DataSource
+ *
+ * @returns {object} metadata of DataSource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DataSource',
+ type: {
+ name: 'Composite',
+ className: 'DataSource',
+ modelProperties: {
+ instructions: {
+ required: false,
+ serializedName: 'instructions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ dataSourceUri: {
+ required: false,
+ serializedName: 'dataSourceUri',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DataSource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/databaseBackupSetting.js b/lib/services/websiteManagement2/lib/lib/models/databaseBackupSetting.js
new file mode 100644
index 0000000000..09b9255796
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/databaseBackupSetting.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';
+
+/**
+ * Database backup settings.
+ *
+ */
+class DatabaseBackupSetting {
+ /**
+ * Create a DatabaseBackupSetting.
+ * @member {string} databaseType Database type (e.g. SqlAzure / MySql).
+ * Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'
+ * @member {string} [name]
+ * @member {string} [connectionStringName] Contains a connection string name
+ * that is linked to the SiteConfig.ConnectionStrings.
+ * This is used during restore with overwrite connection strings options.
+ * @member {string} [connectionString] Contains a connection string to a
+ * database which is being backed up or restored. If the restore should
+ * happen to a new database, the database name inside is the new one.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DatabaseBackupSetting
+ *
+ * @returns {object} metadata of DatabaseBackupSetting
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DatabaseBackupSetting',
+ type: {
+ name: 'Composite',
+ className: 'DatabaseBackupSetting',
+ modelProperties: {
+ databaseType: {
+ required: true,
+ serializedName: 'databaseType',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ connectionStringName: {
+ required: false,
+ serializedName: 'connectionStringName',
+ type: {
+ name: 'String'
+ }
+ },
+ connectionString: {
+ required: false,
+ serializedName: 'connectionString',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DatabaseBackupSetting;
diff --git a/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponse.js b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponse.js
new file mode 100644
index 0000000000..7626a48a16
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponse.js
@@ -0,0 +1,64 @@
+/*
+ * 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');
+
+/**
+ * App Service error response.
+ *
+ */
+class DefaultErrorResponse {
+ /**
+ * Create a DefaultErrorResponse.
+ * @member {object} [error] Error model.
+ * @member {string} [error.code] Standardized string to programmatically
+ * identify the error.
+ * @member {string} [error.message] Detailed error description and debugging
+ * information.
+ * @member {string} [error.target] Detailed error description and debugging
+ * information.
+ * @member {array} [error.details]
+ * @member {string} [error.innererror] More information to debug error.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DefaultErrorResponse
+ *
+ * @returns {object} metadata of DefaultErrorResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DefaultErrorResponse',
+ type: {
+ name: 'Composite',
+ className: 'DefaultErrorResponse',
+ modelProperties: {
+ error: {
+ required: false,
+ readOnly: true,
+ serializedName: 'error',
+ type: {
+ name: 'Composite',
+ className: 'DefaultErrorResponseError'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DefaultErrorResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseError.js b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseError.js
new file mode 100644
index 0000000000..678b354c64
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseError.js
@@ -0,0 +1,101 @@
+/*
+ * 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');
+
+/**
+ * Error model.
+ *
+ */
+class DefaultErrorResponseError {
+ /**
+ * Create a DefaultErrorResponseError.
+ * @member {string} code Standardized string to programmatically identify the
+ * error.
+ * @member {string} message Detailed error description and debugging
+ * information.
+ * @member {string} [target] Detailed error description and debugging
+ * information.
+ * @member {array} [details]
+ * @member {string} [innererror] More information to debug error.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DefaultErrorResponseError
+ *
+ * @returns {object} metadata of DefaultErrorResponseError
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DefaultErrorResponse_error',
+ type: {
+ name: 'Composite',
+ className: 'DefaultErrorResponseError',
+ modelProperties: {
+ code: {
+ required: true,
+ readOnly: true,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: true,
+ readOnly: true,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ },
+ target: {
+ required: false,
+ readOnly: true,
+ serializedName: 'target',
+ type: {
+ name: 'String'
+ }
+ },
+ details: {
+ required: false,
+ serializedName: 'details',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DefaultErrorResponseErrorDetailsItemElementType',
+ type: {
+ name: 'Composite',
+ className: 'DefaultErrorResponseErrorDetailsItem'
+ }
+ }
+ }
+ },
+ innererror: {
+ required: false,
+ readOnly: true,
+ serializedName: 'innererror',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DefaultErrorResponseError;
diff --git a/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseErrorDetailsItem.js b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseErrorDetailsItem.js
new file mode 100644
index 0000000000..f5f3609ef2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/defaultErrorResponseErrorDetailsItem.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';
+
+/**
+ * Detailed errors.
+ *
+ */
+class DefaultErrorResponseErrorDetailsItem {
+ /**
+ * Create a DefaultErrorResponseErrorDetailsItem.
+ * @member {string} code Standardized string to programmatically identify the
+ * error.
+ * @member {string} message Detailed error description and debugging
+ * information.
+ * @member {string} [target] Detailed error description and debugging
+ * information.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DefaultErrorResponseErrorDetailsItem
+ *
+ * @returns {object} metadata of DefaultErrorResponseErrorDetailsItem
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DefaultErrorResponse_error_detailsItem',
+ type: {
+ name: 'Composite',
+ className: 'DefaultErrorResponseErrorDetailsItem',
+ modelProperties: {
+ code: {
+ required: true,
+ readOnly: true,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: true,
+ readOnly: true,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ },
+ target: {
+ required: false,
+ readOnly: true,
+ serializedName: 'target',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DefaultErrorResponseErrorDetailsItem;
diff --git a/lib/services/websiteManagement2/lib/lib/models/deletedSite.js b/lib/services/websiteManagement2/lib/lib/models/deletedSite.js
new file mode 100644
index 0000000000..265245476b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/deletedSite.js
@@ -0,0 +1,98 @@
+/*
+ * 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';
+
+/**
+ * A deleted app.
+ *
+ */
+class DeletedSite {
+ /**
+ * Create a DeletedSite.
+ * @member {number} [id] Numeric id for the deleted site
+ * @member {string} [deletedTimestamp] Time in UTC when the app was deleted.
+ * @member {string} [subscription] Subscription containing the deleted site
+ * @member {string} [resourceGroup] ResourceGroup that contained the deleted
+ * site
+ * @member {string} [name] Name of the deleted site
+ * @member {string} [slot] Slot of the deleted site
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DeletedSite
+ *
+ * @returns {object} metadata of DeletedSite
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DeletedSite',
+ type: {
+ name: 'Composite',
+ className: 'DeletedSite',
+ modelProperties: {
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'Number'
+ }
+ },
+ deletedTimestamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'deletedTimestamp',
+ type: {
+ name: 'String'
+ }
+ },
+ subscription: {
+ required: false,
+ readOnly: true,
+ serializedName: 'subscription',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ readOnly: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ slot: {
+ required: false,
+ readOnly: true,
+ serializedName: 'slot',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DeletedSite;
diff --git a/lib/services/websiteManagement2/lib/lib/models/deletedWebAppCollection.js b/lib/services/websiteManagement2/lib/lib/models/deletedWebAppCollection.js
new file mode 100644
index 0000000000..e4e74927f6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/deletedWebAppCollection.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 deleted apps.
+ */
+class DeletedWebAppCollection extends Array {
+ /**
+ * Create a DeletedWebAppCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DeletedWebAppCollection
+ *
+ * @returns {object} metadata of DeletedWebAppCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DeletedWebAppCollection',
+ type: {
+ name: 'Composite',
+ className: 'DeletedWebAppCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DeletedSiteElementType',
+ type: {
+ name: 'Composite',
+ className: 'DeletedSite'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DeletedWebAppCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/deployment.js b/lib/services/websiteManagement2/lib/lib/models/deployment.js
new file mode 100644
index 0000000000..052aab349d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/deployment.js
@@ -0,0 +1,160 @@
+/*
+ * 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');
+
+/**
+ * User crendentials used for publishing activity.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class Deployment extends models['ProxyOnlyResource'] {
+ /**
+ * Create a Deployment.
+ * @member {string} [deploymentId] Identifier for deployment.
+ * @member {number} [status] Deployment status.
+ * @member {string} [message] Details about deployment status.
+ * @member {string} [author] Who authored the deployment.
+ * @member {string} [deployer] Who performed the deployment.
+ * @member {string} [authorEmail] Author email.
+ * @member {date} [startTime] Start time.
+ * @member {date} [endTime] End time.
+ * @member {boolean} [active] True if deployment is currently active, false
+ * if completed and null if not started.
+ * @member {string} [details] Details on deployment.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Deployment
+ *
+ * @returns {object} metadata of Deployment
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Deployment',
+ type: {
+ name: 'Composite',
+ className: 'Deployment',
+ 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'
+ }
+ },
+ deploymentId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Number'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'properties.message',
+ type: {
+ name: 'String'
+ }
+ },
+ author: {
+ required: false,
+ serializedName: 'properties.author',
+ type: {
+ name: 'String'
+ }
+ },
+ deployer: {
+ required: false,
+ serializedName: 'properties.deployer',
+ type: {
+ name: 'String'
+ }
+ },
+ authorEmail: {
+ required: false,
+ serializedName: 'properties.authorEmail',
+ type: {
+ name: 'String'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ active: {
+ required: false,
+ serializedName: 'properties.active',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ details: {
+ required: false,
+ serializedName: 'properties.details',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Deployment;
diff --git a/lib/services/websiteManagement2/lib/lib/models/deploymentCollection.js b/lib/services/websiteManagement2/lib/lib/models/deploymentCollection.js
new file mode 100644
index 0000000000..a8428276d9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/deploymentCollection.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 app deployments.
+ */
+class DeploymentCollection extends Array {
+ /**
+ * Create a DeploymentCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DeploymentCollection
+ *
+ * @returns {object} metadata of DeploymentCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DeploymentCollection',
+ type: {
+ name: 'Composite',
+ className: 'DeploymentCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DeploymentElementType',
+ type: {
+ name: 'Composite',
+ className: 'Deployment'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DeploymentCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/deploymentLocations.js b/lib/services/websiteManagement2/lib/lib/models/deploymentLocations.js
new file mode 100644
index 0000000000..ad15f8aec8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/deploymentLocations.js
@@ -0,0 +1,97 @@
+/*
+ * 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');
+
+/**
+ * List of available locations (regions or App Service Environments) for
+ * deployment of App Service resources.
+ *
+ */
+class DeploymentLocations {
+ /**
+ * Create a DeploymentLocations.
+ * @member {array} [locations] Available regions.
+ * @member {array} [hostingEnvironments] Available App Service Environments
+ * with full descriptions of the environments.
+ * @member {array} [hostingEnvironmentDeploymentInfos] Available App Service
+ * Environments with basic information.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DeploymentLocations
+ *
+ * @returns {object} metadata of DeploymentLocations
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DeploymentLocations',
+ type: {
+ name: 'Composite',
+ className: 'DeploymentLocations',
+ modelProperties: {
+ locations: {
+ required: false,
+ serializedName: 'locations',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'GeoRegionElementType',
+ type: {
+ name: 'Composite',
+ className: 'GeoRegion'
+ }
+ }
+ }
+ },
+ hostingEnvironments: {
+ required: false,
+ serializedName: 'hostingEnvironments',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AppServiceEnvironmentElementType',
+ type: {
+ name: 'Composite',
+ className: 'AppServiceEnvironment'
+ }
+ }
+ }
+ },
+ hostingEnvironmentDeploymentInfos: {
+ required: false,
+ serializedName: 'hostingEnvironmentDeploymentInfos',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostingEnvironmentDeploymentInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentDeploymentInfo'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DeploymentLocations;
diff --git a/lib/services/websiteManagement2/lib/lib/models/detectorAbnormalTimePeriod.js b/lib/services/websiteManagement2/lib/lib/models/detectorAbnormalTimePeriod.js
new file mode 100644
index 0000000000..4d97fd6c60
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/detectorAbnormalTimePeriod.js
@@ -0,0 +1,137 @@
+/*
+ * 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 Abnormal Time Period detected.
+ *
+ */
+class DetectorAbnormalTimePeriod {
+ /**
+ * Create a DetectorAbnormalTimePeriod.
+ * @member {date} [startTime] Start time of the corelated event
+ * @member {date} [endTime] End time of the corelated event
+ * @member {string} [message] Message describing the event
+ * @member {string} [source] Represents the name of the Detector
+ * @member {number} [priority] Represents the rank of the Detector
+ * @member {array} [metaData] Downtime metadata
+ * @member {string} [type] Represents the type of the Detector. Possible
+ * values include: 'ServiceIncident', 'AppDeployment', 'AppCrash',
+ * 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue',
+ * 'Other'
+ * @member {array} [solutions] List of proposed solutions
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DetectorAbnormalTimePeriod
+ *
+ * @returns {object} metadata of DetectorAbnormalTimePeriod
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DetectorAbnormalTimePeriod',
+ type: {
+ name: 'Composite',
+ className: 'DetectorAbnormalTimePeriod',
+ modelProperties: {
+ startTime: {
+ required: false,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ },
+ source: {
+ required: false,
+ serializedName: 'source',
+ type: {
+ name: 'String'
+ }
+ },
+ priority: {
+ required: false,
+ serializedName: 'priority',
+ type: {
+ name: 'Number'
+ }
+ },
+ metaData: {
+ required: false,
+ serializedName: 'metaData',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ArrayElementType',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ },
+ type: {
+ required: false,
+ serializedName: 'type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other' ]
+ }
+ },
+ solutions: {
+ required: false,
+ serializedName: 'solutions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SolutionElementType',
+ type: {
+ name: 'Composite',
+ className: 'Solution'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DetectorAbnormalTimePeriod;
diff --git a/lib/services/websiteManagement2/lib/lib/models/detectorDefinition.js b/lib/services/websiteManagement2/lib/lib/models/detectorDefinition.js
new file mode 100644
index 0000000000..0c4aa92814
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/detectorDefinition.js
@@ -0,0 +1,116 @@
+/*
+ * 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 detector definition
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DetectorDefinition extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DetectorDefinition.
+ * @member {string} [displayName] Display name of the detector
+ * @member {string} [description] Description of the detector
+ * @member {number} [rank] Detector Rank
+ * @member {boolean} [isEnabled] Flag representing whether detector is
+ * enabled or not.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DetectorDefinition
+ *
+ * @returns {object} metadata of DetectorDefinition
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DetectorDefinition',
+ type: {
+ name: 'Composite',
+ className: 'DetectorDefinition',
+ 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'
+ }
+ },
+ displayName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ },
+ rank: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.rank',
+ type: {
+ name: 'Number'
+ }
+ },
+ isEnabled: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DetectorDefinition;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysis.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysis.js
new file mode 100644
index 0000000000..350a897abb
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysis.js
@@ -0,0 +1,144 @@
+/*
+ * 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 a diagnostic analysis done on an application
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DiagnosticAnalysis extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DiagnosticAnalysis.
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {array} [abnormalTimePeriods] List of time periods.
+ * @member {array} [payload] Data by each detector
+ * @member {array} [nonCorrelatedDetectors] Data by each detector for
+ * detectors that did not corelate
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticAnalysis
+ *
+ * @returns {object} metadata of DiagnosticAnalysis
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticAnalysis',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticAnalysis',
+ 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'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ abnormalTimePeriods: {
+ required: false,
+ serializedName: 'properties.abnormalTimePeriods',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AbnormalTimePeriodElementType',
+ type: {
+ name: 'Composite',
+ className: 'AbnormalTimePeriod'
+ }
+ }
+ }
+ },
+ payload: {
+ required: false,
+ serializedName: 'properties.payload',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AnalysisDataElementType',
+ type: {
+ name: 'Composite',
+ className: 'AnalysisData'
+ }
+ }
+ }
+ },
+ nonCorrelatedDetectors: {
+ required: false,
+ serializedName: 'properties.nonCorrelatedDetectors',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DetectorDefinitionElementType',
+ type: {
+ name: 'Composite',
+ className: 'DetectorDefinition'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticAnalysis;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysisCollection.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysisCollection.js
new file mode 100644
index 0000000000..526e3d5542
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticAnalysisCollection.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 Diagnostic Analyses
+ */
+class DiagnosticAnalysisCollection extends Array {
+ /**
+ * Create a DiagnosticAnalysisCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticAnalysisCollection
+ *
+ * @returns {object} metadata of DiagnosticAnalysisCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticAnalysisCollection',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticAnalysisCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'AnalysisDefinitionElementType',
+ type: {
+ name: 'Composite',
+ className: 'AnalysisDefinition'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticAnalysisCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticCategory.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticCategory.js
new file mode 100644
index 0000000000..f36e3076cc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticCategory.js
@@ -0,0 +1,88 @@
+/*
+ * 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 detector definition
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DiagnosticCategory extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DiagnosticCategory.
+ * @member {string} [description] Description of the diagnostic category
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticCategory
+ *
+ * @returns {object} metadata of DiagnosticCategory
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticCategory',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticCategory',
+ 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'
+ }
+ },
+ description: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticCategory;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticCategoryCollection.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticCategoryCollection.js
new file mode 100644
index 0000000000..fc20ff19c1
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticCategoryCollection.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 Diagnostic Categories
+ */
+class DiagnosticCategoryCollection extends Array {
+ /**
+ * Create a DiagnosticCategoryCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticCategoryCollection
+ *
+ * @returns {object} metadata of DiagnosticCategoryCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticCategoryCollection',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticCategoryCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DiagnosticCategoryElementType',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticCategory'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticCategoryCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorCollection.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorCollection.js
new file mode 100644
index 0000000000..9b17e34ecb
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorCollection.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 Diagnostic Detectors
+ */
+class DiagnosticDetectorCollection extends Array {
+ /**
+ * Create a DiagnosticDetectorCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticDetectorCollection
+ *
+ * @returns {object} metadata of DiagnosticDetectorCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticDetectorCollection',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticDetectorCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DetectorDefinitionElementType',
+ type: {
+ name: 'Composite',
+ className: 'DetectorDefinition'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticDetectorCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorResponse.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorResponse.js
new file mode 100644
index 0000000000..880a1116cf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticDetectorResponse.js
@@ -0,0 +1,189 @@
+/*
+ * 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 Reponse from Diagnostic Detectors
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DiagnosticDetectorResponse extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DiagnosticDetectorResponse.
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {boolean} [issueDetected] Flag representing Issue was detected.
+ * @member {object} [detectorDefinition] Detector's definition
+ * @member {string} [detectorDefinition.displayName] Display name of the
+ * detector
+ * @member {string} [detectorDefinition.description] Description of the
+ * detector
+ * @member {number} [detectorDefinition.rank] Detector Rank
+ * @member {boolean} [detectorDefinition.isEnabled] Flag representing whether
+ * detector is enabled or not.
+ * @member {array} [metrics] Metrics provided by the detector
+ * @member {array} [abnormalTimePeriods] List of Correlated events found by
+ * the detector
+ * @member {array} [data] Additional Data that detector wants to send.
+ * @member {object} [responseMetaData] Meta Data
+ * @member {object} [responseMetaData.dataSource] Source of the Data
+ * @member {array} [responseMetaData.dataSource.instructions] Instrunctions
+ * if any for the data source
+ * @member {array} [responseMetaData.dataSource.dataSourceUri] Datasource Uri
+ * Links
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DiagnosticDetectorResponse
+ *
+ * @returns {object} metadata of DiagnosticDetectorResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticDetectorResponse',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticDetectorResponse',
+ 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'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ issueDetected: {
+ required: false,
+ serializedName: 'properties.issueDetected',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ detectorDefinition: {
+ required: false,
+ serializedName: 'properties.detectorDefinition',
+ type: {
+ name: 'Composite',
+ className: 'DetectorDefinition'
+ }
+ },
+ metrics: {
+ required: false,
+ serializedName: 'properties.metrics',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DiagnosticMetricSetElementType',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticMetricSet'
+ }
+ }
+ }
+ },
+ abnormalTimePeriods: {
+ required: false,
+ serializedName: 'properties.abnormalTimePeriods',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DetectorAbnormalTimePeriodElementType',
+ type: {
+ name: 'Composite',
+ className: 'DetectorAbnormalTimePeriod'
+ }
+ }
+ }
+ },
+ data: {
+ required: false,
+ serializedName: 'properties.data',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ArrayElementType',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ },
+ responseMetaData: {
+ required: false,
+ serializedName: 'properties.responseMetaData',
+ type: {
+ name: 'Composite',
+ className: 'ResponseMetaData'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticDetectorResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSample.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSample.js
new file mode 100644
index 0000000000..334dc95c9f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSample.js
@@ -0,0 +1,102 @@
+/*
+ * 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';
+
+/**
+ * Class representing Diagnostic Metric
+ *
+ */
+class DiagnosticMetricSample {
+ /**
+ * Create a DiagnosticMetricSample.
+ * @member {date} [timestamp] Time at which metric is measured
+ * @member {string} [roleInstance] Role Instance. Null if this counter is not
+ * per instance
+ * This is returned and should be whichever instance name we desire to be
+ * returned
+ * i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0)
+ * where RDWORKERNAME is Machine name below and RoleInstance name in
+ * parenthesis
+ * @member {number} [total] Total value of the metric. If multiple
+ * measurements are made this will have sum of all.
+ * @member {number} [maximum] Maximum of the metric sampled during the time
+ * period
+ * @member {number} [minimum] Minimum of the metric sampled during the time
+ * period
+ * @member {boolean} [isAggregated] Whether the values are aggregates across
+ * all workers or not
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DiagnosticMetricSample
+ *
+ * @returns {object} metadata of DiagnosticMetricSample
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticMetricSample',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticMetricSample',
+ modelProperties: {
+ timestamp: {
+ required: false,
+ serializedName: 'timestamp',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ roleInstance: {
+ required: false,
+ serializedName: 'roleInstance',
+ type: {
+ name: 'String'
+ }
+ },
+ total: {
+ required: false,
+ serializedName: 'total',
+ type: {
+ name: 'Number'
+ }
+ },
+ maximum: {
+ required: false,
+ serializedName: 'maximum',
+ type: {
+ name: 'Number'
+ }
+ },
+ minimum: {
+ required: false,
+ serializedName: 'minimum',
+ type: {
+ name: 'Number'
+ }
+ },
+ isAggregated: {
+ required: false,
+ serializedName: 'isAggregated',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticMetricSample;
diff --git a/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSet.js b/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSet.js
new file mode 100644
index 0000000000..dec74d0fc2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/diagnosticMetricSet.js
@@ -0,0 +1,105 @@
+/*
+ * 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 Diagnostic Metric information
+ *
+ */
+class DiagnosticMetricSet {
+ /**
+ * Create a DiagnosticMetricSet.
+ * @member {string} [name] Name of the metric
+ * @member {string} [unit] Metric's unit
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {string} [timeGrain] Presented time grain. Supported grains at the
+ * moment are PT1M, PT1H, P1D
+ * @member {array} [values] Collection of metric values for the selected
+ * period based on the
+ * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DiagnosticMetricSet
+ *
+ * @returns {object} metadata of DiagnosticMetricSet
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DiagnosticMetricSet',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticMetricSet',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ unit: {
+ required: false,
+ serializedName: 'unit',
+ type: {
+ name: 'String'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ timeGrain: {
+ required: false,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ values: {
+ required: false,
+ serializedName: 'values',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DiagnosticMetricSampleElementType',
+ type: {
+ name: 'Composite',
+ className: 'DiagnosticMetricSample'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DiagnosticMetricSet;
diff --git a/lib/services/websiteManagement2/lib/lib/models/dimension.js b/lib/services/websiteManagement2/lib/lib/models/dimension.js
new file mode 100644
index 0000000000..53cbe470f0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/dimension.js
@@ -0,0 +1,78 @@
+/*
+ * 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';
+
+/**
+ * Dimension of a resource metric. For e.g. instance specific HTTP requests for
+ * a web app,
+ * where instance name is dimension of the metric HTTP request
+ *
+ */
+class Dimension {
+ /**
+ * Create a Dimension.
+ * @member {string} [name]
+ * @member {string} [displayName]
+ * @member {string} [internalName]
+ * @member {boolean} [toBeExportedForShoebox]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Dimension
+ *
+ * @returns {object} metadata of Dimension
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Dimension',
+ type: {
+ name: 'Composite',
+ className: 'Dimension',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ displayName: {
+ required: false,
+ serializedName: 'displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ internalName: {
+ required: false,
+ serializedName: 'internalName',
+ type: {
+ name: 'String'
+ }
+ },
+ toBeExportedForShoebox: {
+ required: false,
+ serializedName: 'toBeExportedForShoebox',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Dimension;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domain.js b/lib/services/websiteManagement2/lib/lib/models/domain.js
new file mode 100644
index 0000000000..8eed458789
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domain.js
@@ -0,0 +1,414 @@
+/*
+ * 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');
+
+/**
+ * Information about a domain.
+ *
+ * @extends models['Resource']
+ */
+class Domain extends models['Resource'] {
+ /**
+ * Create a Domain.
+ * @member {object} contactAdmin Administrative contact.
+ * @member {object} [contactAdmin.addressMailing] Mailing address.
+ * @member {string} [contactAdmin.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactAdmin.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactAdmin.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactAdmin.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactAdmin.email] Email address.
+ * @member {string} [contactAdmin.fax] Fax number.
+ * @member {string} [contactAdmin.jobTitle] Job title.
+ * @member {string} [contactAdmin.nameFirst] First name.
+ * @member {string} [contactAdmin.nameLast] Last name.
+ * @member {string} [contactAdmin.nameMiddle] Middle name.
+ * @member {string} [contactAdmin.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactAdmin.phone] Phone number.
+ * @member {object} contactBilling Billing contact.
+ * @member {object} [contactBilling.addressMailing] Mailing address.
+ * @member {string} [contactBilling.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactBilling.addressMailing.address2] The second line
+ * of the Address. Optional.
+ * @member {string} [contactBilling.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.country] The country for
+ * the address.
+ * @member {string} [contactBilling.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactBilling.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactBilling.email] Email address.
+ * @member {string} [contactBilling.fax] Fax number.
+ * @member {string} [contactBilling.jobTitle] Job title.
+ * @member {string} [contactBilling.nameFirst] First name.
+ * @member {string} [contactBilling.nameLast] Last name.
+ * @member {string} [contactBilling.nameMiddle] Middle name.
+ * @member {string} [contactBilling.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactBilling.phone] Phone number.
+ * @member {object} contactRegistrant Registrant contact.
+ * @member {object} [contactRegistrant.addressMailing] Mailing address.
+ * @member {string} [contactRegistrant.addressMailing.address1] First line of
+ * an Address.
+ * @member {string} [contactRegistrant.addressMailing.address2] The second
+ * line of the Address. Optional.
+ * @member {string} [contactRegistrant.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactRegistrant.addressMailing.country] The country
+ * for the address.
+ * @member {string} [contactRegistrant.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactRegistrant.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactRegistrant.email] Email address.
+ * @member {string} [contactRegistrant.fax] Fax number.
+ * @member {string} [contactRegistrant.jobTitle] Job title.
+ * @member {string} [contactRegistrant.nameFirst] First name.
+ * @member {string} [contactRegistrant.nameLast] Last name.
+ * @member {string} [contactRegistrant.nameMiddle] Middle name.
+ * @member {string} [contactRegistrant.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactRegistrant.phone] Phone number.
+ * @member {object} contactTech Technical contact.
+ * @member {object} [contactTech.addressMailing] Mailing address.
+ * @member {string} [contactTech.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactTech.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactTech.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactTech.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactTech.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactTech.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactTech.email] Email address.
+ * @member {string} [contactTech.fax] Fax number.
+ * @member {string} [contactTech.jobTitle] Job title.
+ * @member {string} [contactTech.nameFirst] First name.
+ * @member {string} [contactTech.nameLast] Last name.
+ * @member {string} [contactTech.nameMiddle] Middle name.
+ * @member {string} [contactTech.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactTech.phone] Phone number.
+ * @member {string} [registrationStatus] Domain registration status. Possible
+ * values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated',
+ * 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked',
+ * 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown',
+ * 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'
+ * @member {string} [provisioningState] Domain provisioning state. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress',
+ * 'Deleting'
+ * @member {array} [nameServers] Name servers.
+ * @member {boolean} [privacy] true if domain privacy is enabled
+ * for this domain; otherwise, false.
+ * @member {date} [createdTime] Domain creation timestamp.
+ * @member {date} [expirationTime] Domain expiration timestamp.
+ * @member {date} [lastRenewedTime] Timestamp when the domain was renewed
+ * last time.
+ * @member {boolean} [autoRenew] true if the domain should be
+ * automatically renewed; otherwise, false. Default value: true
+ * .
+ * @member {boolean} [readyForDnsRecordManagement] true if Azure
+ * can assign this domain to App Service apps; otherwise, false.
+ * This value will be true if domain registration status is
+ * active and
+ * it is hosted on name servers Azure has programmatic access to.
+ * @member {array} [managedHostNames] All hostnames derived from the domain
+ * and assigned to Azure resources.
+ * @member {object} consent Legal agreement consent.
+ * @member {array} [consent.agreementKeys] List of applicable legal agreement
+ * keys. This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [consent.agreedBy] Client IP address.
+ * @member {date} [consent.agreedAt] Timestamp when the agreements were
+ * accepted.
+ * @member {array} [domainNotRenewableReasons] Reasons why domain is not
+ * renewable.
+ * @member {string} [dnsType] Current DNS type. Possible values include:
+ * 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [dnsZoneId] Azure DNS Zone to use
+ * @member {string} [targetDnsType] Target DNS type (would be used for
+ * migration). Possible values include: 'AzureDns',
+ * 'DefaultDomainRegistrarDns'
+ * @member {string} [authCode]
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Domain
+ *
+ * @returns {object} metadata of Domain
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Domain',
+ type: {
+ name: 'Composite',
+ className: 'Domain',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ contactAdmin: {
+ required: true,
+ serializedName: 'properties.contactAdmin',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactBilling: {
+ required: true,
+ serializedName: 'properties.contactBilling',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactRegistrant: {
+ required: true,
+ serializedName: 'properties.contactRegistrant',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactTech: {
+ required: true,
+ serializedName: 'properties.contactTech',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ registrationStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.registrationStatus',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Active', 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed' ]
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ nameServers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.nameServers',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ privacy: {
+ required: false,
+ serializedName: 'properties.privacy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ createdTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.createdTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ lastRenewedTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastRenewedTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ autoRenew: {
+ required: false,
+ serializedName: 'properties.autoRenew',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ readyForDnsRecordManagement: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.readyForDnsRecordManagement',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ managedHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.managedHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostNameElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostName'
+ }
+ }
+ }
+ },
+ consent: {
+ required: true,
+ serializedName: 'properties.consent',
+ type: {
+ name: 'Composite',
+ className: 'DomainPurchaseConsent'
+ }
+ },
+ domainNotRenewableReasons: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.domainNotRenewableReasons',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ dnsType: {
+ required: false,
+ serializedName: 'properties.dnsType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'AzureDns', 'DefaultDomainRegistrarDns' ]
+ }
+ },
+ dnsZoneId: {
+ required: false,
+ serializedName: 'properties.dnsZoneId',
+ type: {
+ name: 'String'
+ }
+ },
+ targetDnsType: {
+ required: false,
+ serializedName: 'properties.targetDnsType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'AzureDns', 'DefaultDomainRegistrarDns' ]
+ }
+ },
+ authCode: {
+ required: false,
+ serializedName: 'properties.authCode',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Domain;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainAvailablilityCheckResult.js b/lib/services/websiteManagement2/lib/lib/models/domainAvailablilityCheckResult.js
new file mode 100644
index 0000000000..545642c394
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainAvailablilityCheckResult.js
@@ -0,0 +1,73 @@
+/*
+ * 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';
+
+/**
+ * Domain availablility check result.
+ *
+ */
+class DomainAvailablilityCheckResult {
+ /**
+ * Create a DomainAvailablilityCheckResult.
+ * @member {string} [name] Name of the domain.
+ * @member {boolean} [available] true if domain can be purchased
+ * using CreateDomain API; otherwise, false.
+ * @member {string} [domainType] Valid values are Regular domain: Azure will
+ * charge the full price of domain registration, SoftDeleted: Purchasing this
+ * domain will simply restore it and this operation will not cost anything.
+ * Possible values include: 'Regular', 'SoftDeleted'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DomainAvailablilityCheckResult
+ *
+ * @returns {object} metadata of DomainAvailablilityCheckResult
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainAvailablilityCheckResult',
+ type: {
+ name: 'Composite',
+ className: 'DomainAvailablilityCheckResult',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ available: {
+ required: false,
+ serializedName: 'available',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ domainType: {
+ required: false,
+ serializedName: 'domainType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Regular', 'SoftDeleted' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainAvailablilityCheckResult;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainCollection.js b/lib/services/websiteManagement2/lib/lib/models/domainCollection.js
new file mode 100644
index 0000000000..bd23f8a9b7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainCollection.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 domains.
+ */
+class DomainCollection extends Array {
+ /**
+ * Create a DomainCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DomainCollection
+ *
+ * @returns {object} metadata of DomainCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainCollection',
+ type: {
+ name: 'Composite',
+ className: 'DomainCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DomainElementType',
+ type: {
+ name: 'Composite',
+ className: 'Domain'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainControlCenterSsoRequest.js b/lib/services/websiteManagement2/lib/lib/models/domainControlCenterSsoRequest.js
new file mode 100644
index 0000000000..c383cb4e4a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainControlCenterSsoRequest.js
@@ -0,0 +1,72 @@
+/*
+ * 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';
+
+/**
+ * Single sign-on request information for domain management.
+ *
+ */
+class DomainControlCenterSsoRequest {
+ /**
+ * Create a DomainControlCenterSsoRequest.
+ * @member {string} [url] URL where the single sign-on request is to be made.
+ * @member {string} [postParameterKey] Post parameter key.
+ * @member {string} [postParameterValue] Post parameter value. Client should
+ * use 'application/x-www-form-urlencoded' encoding for this value.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DomainControlCenterSsoRequest
+ *
+ * @returns {object} metadata of DomainControlCenterSsoRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainControlCenterSsoRequest',
+ type: {
+ name: 'Composite',
+ className: 'DomainControlCenterSsoRequest',
+ modelProperties: {
+ url: {
+ required: false,
+ readOnly: true,
+ serializedName: 'url',
+ type: {
+ name: 'String'
+ }
+ },
+ postParameterKey: {
+ required: false,
+ readOnly: true,
+ serializedName: 'postParameterKey',
+ type: {
+ name: 'String'
+ }
+ },
+ postParameterValue: {
+ required: false,
+ readOnly: true,
+ serializedName: 'postParameterValue',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainControlCenterSsoRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifier.js b/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifier.js
new file mode 100644
index 0000000000..357f342bab
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifier.js
@@ -0,0 +1,87 @@
+/*
+ * 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');
+
+/**
+ * Domain ownership Identifier.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DomainOwnershipIdentifier extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DomainOwnershipIdentifier.
+ * @member {string} [ownershipId] Ownership Id.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DomainOwnershipIdentifier
+ *
+ * @returns {object} metadata of DomainOwnershipIdentifier
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainOwnershipIdentifier',
+ type: {
+ name: 'Composite',
+ className: 'DomainOwnershipIdentifier',
+ 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'
+ }
+ },
+ ownershipId: {
+ required: false,
+ serializedName: 'properties.ownershipId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainOwnershipIdentifier;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifierCollection.js b/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifierCollection.js
new file mode 100644
index 0000000000..a15ca8300a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainOwnershipIdentifierCollection.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 domain ownership identifiers.
+ */
+class DomainOwnershipIdentifierCollection extends Array {
+ /**
+ * Create a DomainOwnershipIdentifierCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DomainOwnershipIdentifierCollection
+ *
+ * @returns {object} metadata of DomainOwnershipIdentifierCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainOwnershipIdentifierCollection',
+ type: {
+ name: 'Composite',
+ className: 'DomainOwnershipIdentifierCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DomainOwnershipIdentifierElementType',
+ type: {
+ name: 'Composite',
+ className: 'DomainOwnershipIdentifier'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainOwnershipIdentifierCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainPatchResource.js b/lib/services/websiteManagement2/lib/lib/models/domainPatchResource.js
new file mode 100644
index 0000000000..65093da110
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainPatchResource.js
@@ -0,0 +1,393 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a domain.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class DomainPatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a DomainPatchResource.
+ * @member {object} contactAdmin Administrative contact.
+ * @member {object} [contactAdmin.addressMailing] Mailing address.
+ * @member {string} [contactAdmin.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactAdmin.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactAdmin.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactAdmin.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactAdmin.email] Email address.
+ * @member {string} [contactAdmin.fax] Fax number.
+ * @member {string} [contactAdmin.jobTitle] Job title.
+ * @member {string} [contactAdmin.nameFirst] First name.
+ * @member {string} [contactAdmin.nameLast] Last name.
+ * @member {string} [contactAdmin.nameMiddle] Middle name.
+ * @member {string} [contactAdmin.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactAdmin.phone] Phone number.
+ * @member {object} contactBilling Billing contact.
+ * @member {object} [contactBilling.addressMailing] Mailing address.
+ * @member {string} [contactBilling.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactBilling.addressMailing.address2] The second line
+ * of the Address. Optional.
+ * @member {string} [contactBilling.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.country] The country for
+ * the address.
+ * @member {string} [contactBilling.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactBilling.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactBilling.email] Email address.
+ * @member {string} [contactBilling.fax] Fax number.
+ * @member {string} [contactBilling.jobTitle] Job title.
+ * @member {string} [contactBilling.nameFirst] First name.
+ * @member {string} [contactBilling.nameLast] Last name.
+ * @member {string} [contactBilling.nameMiddle] Middle name.
+ * @member {string} [contactBilling.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactBilling.phone] Phone number.
+ * @member {object} contactRegistrant Registrant contact.
+ * @member {object} [contactRegistrant.addressMailing] Mailing address.
+ * @member {string} [contactRegistrant.addressMailing.address1] First line of
+ * an Address.
+ * @member {string} [contactRegistrant.addressMailing.address2] The second
+ * line of the Address. Optional.
+ * @member {string} [contactRegistrant.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactRegistrant.addressMailing.country] The country
+ * for the address.
+ * @member {string} [contactRegistrant.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactRegistrant.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactRegistrant.email] Email address.
+ * @member {string} [contactRegistrant.fax] Fax number.
+ * @member {string} [contactRegistrant.jobTitle] Job title.
+ * @member {string} [contactRegistrant.nameFirst] First name.
+ * @member {string} [contactRegistrant.nameLast] Last name.
+ * @member {string} [contactRegistrant.nameMiddle] Middle name.
+ * @member {string} [contactRegistrant.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactRegistrant.phone] Phone number.
+ * @member {object} contactTech Technical contact.
+ * @member {object} [contactTech.addressMailing] Mailing address.
+ * @member {string} [contactTech.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactTech.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactTech.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactTech.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactTech.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactTech.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactTech.email] Email address.
+ * @member {string} [contactTech.fax] Fax number.
+ * @member {string} [contactTech.jobTitle] Job title.
+ * @member {string} [contactTech.nameFirst] First name.
+ * @member {string} [contactTech.nameLast] Last name.
+ * @member {string} [contactTech.nameMiddle] Middle name.
+ * @member {string} [contactTech.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactTech.phone] Phone number.
+ * @member {string} [registrationStatus] Domain registration status. Possible
+ * values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated',
+ * 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked',
+ * 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown',
+ * 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'
+ * @member {string} [provisioningState] Domain provisioning state. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress',
+ * 'Deleting'
+ * @member {array} [nameServers] Name servers.
+ * @member {boolean} [privacy] true if domain privacy is enabled
+ * for this domain; otherwise, false.
+ * @member {date} [createdTime] Domain creation timestamp.
+ * @member {date} [expirationTime] Domain expiration timestamp.
+ * @member {date} [lastRenewedTime] Timestamp when the domain was renewed
+ * last time.
+ * @member {boolean} [autoRenew] true if the domain should be
+ * automatically renewed; otherwise, false. Default value: true
+ * .
+ * @member {boolean} [readyForDnsRecordManagement] true if Azure
+ * can assign this domain to App Service apps; otherwise, false.
+ * This value will be true if domain registration status is
+ * active and
+ * it is hosted on name servers Azure has programmatic access to.
+ * @member {array} [managedHostNames] All hostnames derived from the domain
+ * and assigned to Azure resources.
+ * @member {object} consent Legal agreement consent.
+ * @member {array} [consent.agreementKeys] List of applicable legal agreement
+ * keys. This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [consent.agreedBy] Client IP address.
+ * @member {date} [consent.agreedAt] Timestamp when the agreements were
+ * accepted.
+ * @member {array} [domainNotRenewableReasons] Reasons why domain is not
+ * renewable.
+ * @member {string} [dnsType] Current DNS type. Possible values include:
+ * 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [dnsZoneId] Azure DNS Zone to use
+ * @member {string} [targetDnsType] Target DNS type (would be used for
+ * migration). Possible values include: 'AzureDns',
+ * 'DefaultDomainRegistrarDns'
+ * @member {string} [authCode]
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of DomainPatchResource
+ *
+ * @returns {object} metadata of DomainPatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainPatchResource',
+ type: {
+ name: 'Composite',
+ className: 'DomainPatchResource',
+ 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'
+ }
+ },
+ contactAdmin: {
+ required: true,
+ serializedName: 'properties.contactAdmin',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactBilling: {
+ required: true,
+ serializedName: 'properties.contactBilling',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactRegistrant: {
+ required: true,
+ serializedName: 'properties.contactRegistrant',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ contactTech: {
+ required: true,
+ serializedName: 'properties.contactTech',
+ type: {
+ name: 'Composite',
+ className: 'Contact'
+ }
+ },
+ registrationStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.registrationStatus',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Active', 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed' ]
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' ]
+ }
+ },
+ nameServers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.nameServers',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ privacy: {
+ required: false,
+ serializedName: 'properties.privacy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ createdTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.createdTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ lastRenewedTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastRenewedTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ autoRenew: {
+ required: false,
+ serializedName: 'properties.autoRenew',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ readyForDnsRecordManagement: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.readyForDnsRecordManagement',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ managedHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.managedHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostNameElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostName'
+ }
+ }
+ }
+ },
+ consent: {
+ required: true,
+ serializedName: 'properties.consent',
+ type: {
+ name: 'Composite',
+ className: 'DomainPurchaseConsent'
+ }
+ },
+ domainNotRenewableReasons: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.domainNotRenewableReasons',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ dnsType: {
+ required: false,
+ serializedName: 'properties.dnsType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'AzureDns', 'DefaultDomainRegistrarDns' ]
+ }
+ },
+ dnsZoneId: {
+ required: false,
+ serializedName: 'properties.dnsZoneId',
+ type: {
+ name: 'String'
+ }
+ },
+ targetDnsType: {
+ required: false,
+ serializedName: 'properties.targetDnsType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'AzureDns', 'DefaultDomainRegistrarDns' ]
+ }
+ },
+ authCode: {
+ required: false,
+ serializedName: 'properties.authCode',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainPatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainPurchaseConsent.js b/lib/services/websiteManagement2/lib/lib/models/domainPurchaseConsent.js
new file mode 100644
index 0000000000..9cd02ca121
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainPurchaseConsent.js
@@ -0,0 +1,78 @@
+/*
+ * 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';
+
+/**
+ * Domain purchase consent object, representing acceptance of applicable legal
+ * agreements.
+ *
+ */
+class DomainPurchaseConsent {
+ /**
+ * Create a DomainPurchaseConsent.
+ * @member {array} [agreementKeys] List of applicable legal agreement keys.
+ * This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [agreedBy] Client IP address.
+ * @member {date} [agreedAt] Timestamp when the agreements were accepted.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DomainPurchaseConsent
+ *
+ * @returns {object} metadata of DomainPurchaseConsent
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainPurchaseConsent',
+ type: {
+ name: 'Composite',
+ className: 'DomainPurchaseConsent',
+ modelProperties: {
+ agreementKeys: {
+ required: false,
+ serializedName: 'agreementKeys',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ agreedBy: {
+ required: false,
+ serializedName: 'agreedBy',
+ type: {
+ name: 'String'
+ }
+ },
+ agreedAt: {
+ required: false,
+ serializedName: 'agreedAt',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainPurchaseConsent;
diff --git a/lib/services/websiteManagement2/lib/lib/models/domainRecommendationSearchParameters.js b/lib/services/websiteManagement2/lib/lib/models/domainRecommendationSearchParameters.js
new file mode 100644
index 0000000000..dd3a3b6af9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/domainRecommendationSearchParameters.js
@@ -0,0 +1,62 @@
+/*
+ * 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';
+
+/**
+ * Domain recommendation search parameters.
+ *
+ */
+class DomainRecommendationSearchParameters {
+ /**
+ * Create a DomainRecommendationSearchParameters.
+ * @member {string} [keywords] Keywords to be used for generating domain
+ * recommendations.
+ * @member {number} [maxDomainRecommendations] Maximum number of
+ * recommendations.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of DomainRecommendationSearchParameters
+ *
+ * @returns {object} metadata of DomainRecommendationSearchParameters
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'DomainRecommendationSearchParameters',
+ type: {
+ name: 'Composite',
+ className: 'DomainRecommendationSearchParameters',
+ modelProperties: {
+ keywords: {
+ required: false,
+ serializedName: 'keywords',
+ type: {
+ name: 'String'
+ }
+ },
+ maxDomainRecommendations: {
+ required: false,
+ serializedName: 'maxDomainRecommendations',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = DomainRecommendationSearchParameters;
diff --git a/lib/services/websiteManagement2/lib/lib/models/enabledConfig.js b/lib/services/websiteManagement2/lib/lib/models/enabledConfig.js
new file mode 100644
index 0000000000..b45f899d15
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/enabledConfig.js
@@ -0,0 +1,53 @@
+/*
+ * 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';
+
+/**
+ * Enabled configuration.
+ *
+ */
+class EnabledConfig {
+ /**
+ * Create a EnabledConfig.
+ * @member {boolean} [enabled] True if configuration is enabled, false if it
+ * is disabled and null if configuration is not set.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of EnabledConfig
+ *
+ * @returns {object} metadata of EnabledConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'EnabledConfig',
+ type: {
+ name: 'Composite',
+ className: 'EnabledConfig',
+ modelProperties: {
+ enabled: {
+ required: false,
+ serializedName: 'enabled',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = EnabledConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/errorEntity.js b/lib/services/websiteManagement2/lib/lib/models/errorEntity.js
new file mode 100644
index 0000000000..7fe76aef2e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/errorEntity.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');
+
+/**
+ * Body of the error response returned from the API.
+ *
+ */
+class ErrorEntity {
+ /**
+ * Create a ErrorEntity.
+ * @member {string} [extendedCode] Type of error.
+ * @member {string} [messageTemplate] Message template.
+ * @member {array} [parameters] Parameters for the template.
+ * @member {array} [innerErrors] Inner errors.
+ * @member {string} [code] Basic error code.
+ * @member {string} [message] Any details of the error.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ErrorEntity
+ *
+ * @returns {object} metadata of ErrorEntity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ErrorEntity',
+ type: {
+ name: 'Composite',
+ className: 'ErrorEntity',
+ modelProperties: {
+ extendedCode: {
+ required: false,
+ serializedName: 'extendedCode',
+ type: {
+ name: 'String'
+ }
+ },
+ messageTemplate: {
+ required: false,
+ serializedName: 'messageTemplate',
+ type: {
+ name: 'String'
+ }
+ },
+ parameters: {
+ required: false,
+ serializedName: 'parameters',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ innerErrors: {
+ required: false,
+ serializedName: 'innerErrors',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ErrorEntityElementType',
+ type: {
+ name: 'Composite',
+ className: 'ErrorEntity'
+ }
+ }
+ }
+ },
+ code: {
+ required: false,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ErrorEntity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/errorResponse.js b/lib/services/websiteManagement2/lib/lib/models/errorResponse.js
new file mode 100644
index 0000000000..32e994231a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/errorResponse.js
@@ -0,0 +1,61 @@
+/*
+ * 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';
+
+/**
+ * Error Response.
+ *
+ */
+class ErrorResponse {
+ /**
+ * Create a ErrorResponse.
+ * @member {string} [code] Error code.
+ * @member {string} [message] Error message indicating why the operation
+ * failed.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ErrorResponse
+ *
+ * @returns {object} metadata of ErrorResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ErrorResponse',
+ type: {
+ name: 'Composite',
+ className: 'ErrorResponse',
+ modelProperties: {
+ code: {
+ required: false,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ErrorResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/experiments.js b/lib/services/websiteManagement2/lib/lib/models/experiments.js
new file mode 100644
index 0000000000..cf40478e30
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/experiments.js
@@ -0,0 +1,62 @@
+/*
+ * 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');
+
+/**
+ * Routing rules in production experiments.
+ *
+ */
+class Experiments {
+ /**
+ * Create a Experiments.
+ * @member {array} [rampUpRules] List of ramp-up rules.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Experiments
+ *
+ * @returns {object} metadata of Experiments
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Experiments',
+ type: {
+ name: 'Composite',
+ className: 'Experiments',
+ modelProperties: {
+ rampUpRules: {
+ required: false,
+ serializedName: 'rampUpRules',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'RampUpRuleElementType',
+ type: {
+ name: 'Composite',
+ className: 'RampUpRule'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Experiments;
diff --git a/lib/services/websiteManagement2/lib/lib/models/fileSystemApplicationLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/fileSystemApplicationLogsConfig.js
new file mode 100644
index 0000000000..b64d80772f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/fileSystemApplicationLogsConfig.js
@@ -0,0 +1,55 @@
+/*
+ * 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';
+
+/**
+ * Application logs to file system configuration.
+ *
+ */
+class FileSystemApplicationLogsConfig {
+ /**
+ * Create a FileSystemApplicationLogsConfig.
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'. Default value: 'Off' .
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of FileSystemApplicationLogsConfig
+ *
+ * @returns {object} metadata of FileSystemApplicationLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'FileSystemApplicationLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'FileSystemApplicationLogsConfig',
+ modelProperties: {
+ level: {
+ required: false,
+ serializedName: 'level',
+ defaultValue: 'Off',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Off', 'Verbose', 'Information', 'Warning', 'Error' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = FileSystemApplicationLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/fileSystemHttpLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/fileSystemHttpLogsConfig.js
new file mode 100644
index 0000000000..e85d48eb3b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/fileSystemHttpLogsConfig.js
@@ -0,0 +1,78 @@
+/*
+ * 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';
+
+/**
+ * Http logs to file system configuration.
+ *
+ */
+class FileSystemHttpLogsConfig {
+ /**
+ * Create a FileSystemHttpLogsConfig.
+ * @member {number} [retentionInMb] Maximum size in megabytes that http log
+ * files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [enabled] True if configuration is enabled, false if it
+ * is disabled and null if configuration is not set.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of FileSystemHttpLogsConfig
+ *
+ * @returns {object} metadata of FileSystemHttpLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'FileSystemHttpLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'FileSystemHttpLogsConfig',
+ modelProperties: {
+ retentionInMb: {
+ required: false,
+ serializedName: 'retentionInMb',
+ constraints: {
+ InclusiveMaximum: 100,
+ InclusiveMinimum: 25
+ },
+ type: {
+ name: 'Number'
+ }
+ },
+ retentionInDays: {
+ required: false,
+ serializedName: 'retentionInDays',
+ type: {
+ name: 'Number'
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'enabled',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = FileSystemHttpLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/functionEnvelope.js b/lib/services/websiteManagement2/lib/lib/models/functionEnvelope.js
new file mode 100644
index 0000000000..d7389e080d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/functionEnvelope.js
@@ -0,0 +1,169 @@
+/*
+ * 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');
+
+/**
+ * Web Job Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class FunctionEnvelope extends models['ProxyOnlyResource'] {
+ /**
+ * Create a FunctionEnvelope.
+ * @member {string} [functionEnvelopeName] Function name.
+ * @member {string} [functionAppId] Function App ID.
+ * @member {string} [scriptRootPathHref] Script root path URI.
+ * @member {string} [scriptHref] Script URI.
+ * @member {string} [configHref] Config URI.
+ * @member {string} [secretsFileHref] Secrets file URI.
+ * @member {string} [href] Function URI.
+ * @member {object} [config] Config information.
+ * @member {object} [files] File list.
+ * @member {string} [testData] Test data used when testing via the Azure
+ * Portal.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of FunctionEnvelope
+ *
+ * @returns {object} metadata of FunctionEnvelope
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'FunctionEnvelope',
+ type: {
+ name: 'Composite',
+ className: 'FunctionEnvelope',
+ 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'
+ }
+ },
+ functionEnvelopeName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ functionAppId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.functionAppId',
+ type: {
+ name: 'String'
+ }
+ },
+ scriptRootPathHref: {
+ required: false,
+ serializedName: 'properties.scriptRootPathHref',
+ type: {
+ name: 'String'
+ }
+ },
+ scriptHref: {
+ required: false,
+ serializedName: 'properties.scriptHref',
+ type: {
+ name: 'String'
+ }
+ },
+ configHref: {
+ required: false,
+ serializedName: 'properties.configHref',
+ type: {
+ name: 'String'
+ }
+ },
+ secretsFileHref: {
+ required: false,
+ serializedName: 'properties.secretsFileHref',
+ type: {
+ name: 'String'
+ }
+ },
+ href: {
+ required: false,
+ serializedName: 'properties.href',
+ type: {
+ name: 'String'
+ }
+ },
+ config: {
+ required: false,
+ serializedName: 'properties.config',
+ type: {
+ name: 'Object'
+ }
+ },
+ files: {
+ required: false,
+ serializedName: 'properties.files',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ testData: {
+ required: false,
+ serializedName: 'properties.testData',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = FunctionEnvelope;
diff --git a/lib/services/websiteManagement2/lib/lib/models/functionEnvelopeCollection.js b/lib/services/websiteManagement2/lib/lib/models/functionEnvelopeCollection.js
new file mode 100644
index 0000000000..11a87f9e7b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/functionEnvelopeCollection.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 Kudu function information elements.
+ */
+class FunctionEnvelopeCollection extends Array {
+ /**
+ * Create a FunctionEnvelopeCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of FunctionEnvelopeCollection
+ *
+ * @returns {object} metadata of FunctionEnvelopeCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'FunctionEnvelopeCollection',
+ type: {
+ name: 'Composite',
+ className: 'FunctionEnvelopeCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'FunctionEnvelopeElementType',
+ type: {
+ name: 'Composite',
+ className: 'FunctionEnvelope'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = FunctionEnvelopeCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/functionSecrets.js b/lib/services/websiteManagement2/lib/lib/models/functionSecrets.js
new file mode 100644
index 0000000000..6c33bce188
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/functionSecrets.js
@@ -0,0 +1,95 @@
+/*
+ * 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');
+
+/**
+ * Function secrets.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class FunctionSecrets extends models['ProxyOnlyResource'] {
+ /**
+ * Create a FunctionSecrets.
+ * @member {string} [key] Secret key.
+ * @member {string} [triggerUrl] Trigger URL.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of FunctionSecrets
+ *
+ * @returns {object} metadata of FunctionSecrets
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'FunctionSecrets',
+ type: {
+ name: 'Composite',
+ className: 'FunctionSecrets',
+ 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'
+ }
+ },
+ key: {
+ required: false,
+ serializedName: 'properties.key',
+ type: {
+ name: 'String'
+ }
+ },
+ triggerUrl: {
+ required: false,
+ serializedName: 'properties.triggerUrl',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = FunctionSecrets;
diff --git a/lib/services/websiteManagement2/lib/lib/models/geoRegion.js b/lib/services/websiteManagement2/lib/lib/models/geoRegion.js
new file mode 100644
index 0000000000..bf004ffc2e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/geoRegion.js
@@ -0,0 +1,106 @@
+/*
+ * 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');
+
+/**
+ * Geographical region.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class GeoRegion extends models['ProxyOnlyResource'] {
+ /**
+ * Create a GeoRegion.
+ * @member {string} [geoRegionName] Region name.
+ * @member {string} [description] Region description.
+ * @member {string} [displayName] Display name for region.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of GeoRegion
+ *
+ * @returns {object} metadata of GeoRegion
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'GeoRegion',
+ type: {
+ name: 'Composite',
+ className: 'GeoRegion',
+ 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'
+ }
+ },
+ geoRegionName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ },
+ displayName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = GeoRegion;
diff --git a/lib/services/websiteManagement2/lib/lib/models/geoRegionCollection.js b/lib/services/websiteManagement2/lib/lib/models/geoRegionCollection.js
new file mode 100644
index 0000000000..b4383a4013
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/geoRegionCollection.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 geographical regions.
+ */
+class GeoRegionCollection extends Array {
+ /**
+ * Create a GeoRegionCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of GeoRegionCollection
+ *
+ * @returns {object} metadata of GeoRegionCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'GeoRegionCollection',
+ type: {
+ name: 'Composite',
+ className: 'GeoRegionCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'GeoRegionElementType',
+ type: {
+ name: 'Composite',
+ className: 'GeoRegion'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = GeoRegionCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/globalCsmSkuDescription.js b/lib/services/websiteManagement2/lib/lib/models/globalCsmSkuDescription.js
new file mode 100644
index 0000000000..4e36a7f290
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/globalCsmSkuDescription.js
@@ -0,0 +1,127 @@
+/*
+ * 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');
+
+/**
+ * A Global SKU Description.
+ *
+ */
+class GlobalCsmSkuDescription {
+ /**
+ * Create a GlobalCsmSkuDescription.
+ * @member {string} [name] Name of the resource SKU.
+ * @member {string} [tier] Service Tier of the resource SKU.
+ * @member {string} [size] Size specifier of the resource SKU.
+ * @member {string} [family] Family code of the resource SKU.
+ * @member {object} [capacity] Min, max, and default scale values of the SKU.
+ * @member {number} [capacity.minimum] Minimum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.maximum] Maximum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.default] Default number of workers for this App
+ * Service plan SKU.
+ * @member {string} [capacity.scaleType] Available scale configurations for
+ * an App Service plan.
+ * @member {array} [locations] Locations of the SKU.
+ * @member {array} [capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of GlobalCsmSkuDescription
+ *
+ * @returns {object} metadata of GlobalCsmSkuDescription
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'GlobalCsmSkuDescription',
+ type: {
+ name: 'Composite',
+ className: 'GlobalCsmSkuDescription',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ tier: {
+ required: false,
+ serializedName: 'tier',
+ type: {
+ name: 'String'
+ }
+ },
+ size: {
+ required: false,
+ serializedName: 'size',
+ type: {
+ name: 'String'
+ }
+ },
+ family: {
+ required: false,
+ serializedName: 'family',
+ type: {
+ name: 'String'
+ }
+ },
+ capacity: {
+ required: false,
+ serializedName: 'capacity',
+ type: {
+ name: 'Composite',
+ className: 'SkuCapacity'
+ }
+ },
+ locations: {
+ required: false,
+ serializedName: 'locations',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ capabilities: {
+ required: false,
+ serializedName: 'capabilities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CapabilityElementType',
+ type: {
+ name: 'Composite',
+ className: 'Capability'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = GlobalCsmSkuDescription;
diff --git a/lib/services/websiteManagement2/lib/lib/models/handlerMapping.js b/lib/services/websiteManagement2/lib/lib/models/handlerMapping.js
new file mode 100644
index 0000000000..ee5dc87e3b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/handlerMapping.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';
+
+/**
+ * The IIS handler mappings used to define which handler processes HTTP
+ * requests with certain extension.
+ * For example, it is used to configure php-cgi.exe process to handle all HTTP
+ * requests with *.php extension.
+ *
+ */
+class HandlerMapping {
+ /**
+ * Create a HandlerMapping.
+ * @member {string} [extension] Requests with this extension will be handled
+ * using the specified FastCGI application.
+ * @member {string} [scriptProcessor] The absolute path to the FastCGI
+ * application.
+ * @member {string} [argumentsProperty] Command-line arguments to be passed
+ * to the script processor.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HandlerMapping
+ *
+ * @returns {object} metadata of HandlerMapping
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HandlerMapping',
+ type: {
+ name: 'Composite',
+ className: 'HandlerMapping',
+ modelProperties: {
+ extension: {
+ required: false,
+ serializedName: 'extension',
+ type: {
+ name: 'String'
+ }
+ },
+ scriptProcessor: {
+ required: false,
+ serializedName: 'scriptProcessor',
+ type: {
+ name: 'String'
+ }
+ },
+ argumentsProperty: {
+ required: false,
+ serializedName: 'arguments',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HandlerMapping;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostName.js b/lib/services/websiteManagement2/lib/lib/models/hostName.js
new file mode 100644
index 0000000000..04e7ae98f7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostName.js
@@ -0,0 +1,110 @@
+/*
+ * 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';
+
+/**
+ * Details of a hostname derived from a domain.
+ *
+ */
+class HostName {
+ /**
+ * Create a HostName.
+ * @member {string} [name] Name of the hostname.
+ * @member {array} [siteNames] List of apps the hostname is assigned to. This
+ * list will have more than one app only if the hostname is pointing to a
+ * Traffic Manager.
+ * @member {string} [azureResourceName] Name of the Azure resource the
+ * hostname is assigned to. If it is assigned to a Traffic Manager then it
+ * will be the Traffic Manager name otherwise it will be the app name.
+ * @member {string} [azureResourceType] Type of the Azure resource the
+ * hostname is assigned to. Possible values include: 'Website',
+ * 'TrafficManager'
+ * @member {string} [customHostNameDnsRecordType] Type of the DNS record.
+ * Possible values include: 'CName', 'A'
+ * @member {string} [hostNameType] Type of the hostname. Possible values
+ * include: 'Verified', 'Managed'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HostName
+ *
+ * @returns {object} metadata of HostName
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostName',
+ type: {
+ name: 'Composite',
+ className: 'HostName',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ siteNames: {
+ required: false,
+ serializedName: 'siteNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ azureResourceName: {
+ required: false,
+ serializedName: 'azureResourceName',
+ type: {
+ name: 'String'
+ }
+ },
+ azureResourceType: {
+ required: false,
+ serializedName: 'azureResourceType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Website', 'TrafficManager' ]
+ }
+ },
+ customHostNameDnsRecordType: {
+ required: false,
+ serializedName: 'customHostNameDnsRecordType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'CName', 'A' ]
+ }
+ },
+ hostNameType: {
+ required: false,
+ serializedName: 'hostNameType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Verified', 'Managed' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostName;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostNameBinding.js b/lib/services/websiteManagement2/lib/lib/models/hostNameBinding.js
new file mode 100644
index 0000000000..f18fcbe373
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostNameBinding.js
@@ -0,0 +1,161 @@
+/*
+ * 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');
+
+/**
+ * A hostname binding object.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class HostNameBinding extends models['ProxyOnlyResource'] {
+ /**
+ * Create a HostNameBinding.
+ * @member {string} [siteName] App Service app name.
+ * @member {string} [domainId] Fully qualified ARM domain resource URI.
+ * @member {string} [azureResourceName] Azure resource name.
+ * @member {string} [azureResourceType] Azure resource type. Possible values
+ * include: 'Website', 'TrafficManager'
+ * @member {string} [customHostNameDnsRecordType] Custom DNS record type.
+ * Possible values include: 'CName', 'A'
+ * @member {string} [hostNameType] Hostname type. Possible values include:
+ * 'Verified', 'Managed'
+ * @member {string} [sslState] SSL type. Possible values include: 'Disabled',
+ * 'SniEnabled', 'IpBasedEnabled'
+ * @member {string} [thumbprint] SSL certificate thumbprint
+ * @member {string} [virtualIP] Virtual IP address assigned to the hostname
+ * if IP based SSL is enabled.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HostNameBinding
+ *
+ * @returns {object} metadata of HostNameBinding
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostNameBinding',
+ type: {
+ name: 'Composite',
+ className: 'HostNameBinding',
+ 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'
+ }
+ },
+ siteName: {
+ required: false,
+ serializedName: 'properties.siteName',
+ type: {
+ name: 'String'
+ }
+ },
+ domainId: {
+ required: false,
+ serializedName: 'properties.domainId',
+ type: {
+ name: 'String'
+ }
+ },
+ azureResourceName: {
+ required: false,
+ serializedName: 'properties.azureResourceName',
+ type: {
+ name: 'String'
+ }
+ },
+ azureResourceType: {
+ required: false,
+ serializedName: 'properties.azureResourceType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Website', 'TrafficManager' ]
+ }
+ },
+ customHostNameDnsRecordType: {
+ required: false,
+ serializedName: 'properties.customHostNameDnsRecordType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'CName', 'A' ]
+ }
+ },
+ hostNameType: {
+ required: false,
+ serializedName: 'properties.hostNameType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Verified', 'Managed' ]
+ }
+ },
+ sslState: {
+ required: false,
+ serializedName: 'properties.sslState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Disabled', 'SniEnabled', 'IpBasedEnabled' ]
+ }
+ },
+ thumbprint: {
+ required: false,
+ serializedName: 'properties.thumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ virtualIP: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.virtualIP',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostNameBinding;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostNameBindingCollection.js b/lib/services/websiteManagement2/lib/lib/models/hostNameBindingCollection.js
new file mode 100644
index 0000000000..701310c452
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostNameBindingCollection.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 hostname bindings.
+ */
+class HostNameBindingCollection extends Array {
+ /**
+ * Create a HostNameBindingCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HostNameBindingCollection
+ *
+ * @returns {object} metadata of HostNameBindingCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostNameBindingCollection',
+ type: {
+ name: 'Composite',
+ className: 'HostNameBindingCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostNameBindingElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostNameBinding'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostNameBindingCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostNameSslState.js b/lib/services/websiteManagement2/lib/lib/models/hostNameSslState.js
new file mode 100644
index 0000000000..2158c960f7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostNameSslState.js
@@ -0,0 +1,98 @@
+/*
+ * 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';
+
+/**
+ * SSL-enabled hostname.
+ *
+ */
+class HostNameSslState {
+ /**
+ * Create a HostNameSslState.
+ * @member {string} [name] Hostname.
+ * @member {string} [sslState] SSL type. Possible values include: 'Disabled',
+ * 'SniEnabled', 'IpBasedEnabled'
+ * @member {string} [virtualIP] Virtual IP address assigned to the hostname
+ * if IP based SSL is enabled.
+ * @member {string} [thumbprint] SSL certificate thumbprint.
+ * @member {boolean} [toUpdate] Set to true to update existing
+ * hostname.
+ * @member {string} [hostType] Indicates whether the hostname is a standard
+ * or repository hostname. Possible values include: 'Standard', 'Repository'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HostNameSslState
+ *
+ * @returns {object} metadata of HostNameSslState
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostNameSslState',
+ type: {
+ name: 'Composite',
+ className: 'HostNameSslState',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ sslState: {
+ required: false,
+ serializedName: 'sslState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Disabled', 'SniEnabled', 'IpBasedEnabled' ]
+ }
+ },
+ virtualIP: {
+ required: false,
+ serializedName: 'virtualIP',
+ type: {
+ name: 'String'
+ }
+ },
+ thumbprint: {
+ required: false,
+ serializedName: 'thumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ toUpdate: {
+ required: false,
+ serializedName: 'toUpdate',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ hostType: {
+ required: false,
+ serializedName: 'hostType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Standard', 'Repository' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostNameSslState;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDeploymentInfo.js b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDeploymentInfo.js
new file mode 100644
index 0000000000..08dd21c8d2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDeploymentInfo.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Information needed to create resources on an App Service Environment.
+ *
+ */
+class HostingEnvironmentDeploymentInfo {
+ /**
+ * Create a HostingEnvironmentDeploymentInfo.
+ * @member {string} [name] Name of the App Service Environment.
+ * @member {string} [location] Location of the App Service Environment.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HostingEnvironmentDeploymentInfo
+ *
+ * @returns {object} metadata of HostingEnvironmentDeploymentInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostingEnvironmentDeploymentInfo',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentDeploymentInfo',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ location: {
+ required: false,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostingEnvironmentDeploymentInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDiagnostics.js b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDiagnostics.js
new file mode 100644
index 0000000000..2ea639d385
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentDiagnostics.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Diagnostics for an App Service Environment.
+ *
+ */
+class HostingEnvironmentDiagnostics {
+ /**
+ * Create a HostingEnvironmentDiagnostics.
+ * @member {string} [name] Name/identifier of the diagnostics.
+ * @member {string} [diagnosicsOutput] Diagnostics output.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HostingEnvironmentDiagnostics
+ *
+ * @returns {object} metadata of HostingEnvironmentDiagnostics
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostingEnvironmentDiagnostics',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentDiagnostics',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ diagnosicsOutput: {
+ required: false,
+ serializedName: 'diagnosicsOutput',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostingEnvironmentDiagnostics;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentProfile.js b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentProfile.js
new file mode 100644
index 0000000000..e339a1cc17
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hostingEnvironmentProfile.js
@@ -0,0 +1,70 @@
+/*
+ * 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';
+
+/**
+ * Specification for an App Service Environment to use for this resource.
+ *
+ */
+class HostingEnvironmentProfile {
+ /**
+ * Create a HostingEnvironmentProfile.
+ * @member {string} [id] Resource ID of the App Service Environment.
+ * @member {string} [name] Name of the App Service Environment.
+ * @member {string} [type] Resource type of the App Service Environment.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HostingEnvironmentProfile
+ *
+ * @returns {object} metadata of HostingEnvironmentProfile
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile',
+ modelProperties: {
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ readOnly: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HostingEnvironmentProfile;
diff --git a/lib/services/websiteManagement2/lib/lib/models/httpLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/httpLogsConfig.js
new file mode 100644
index 0000000000..2636ecd1ff
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/httpLogsConfig.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';
+
+const models = require('./index');
+
+/**
+ * Http logs configuration.
+ *
+ */
+class HttpLogsConfig {
+ /**
+ * Create a HttpLogsConfig.
+ * @member {object} [fileSystem] Http logs to file system configuration.
+ * @member {number} [fileSystem.retentionInMb] Maximum size in megabytes that
+ * http log files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [fileSystem.retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [fileSystem.enabled] True if configuration is enabled,
+ * false if it is disabled and null if configuration is not set.
+ * @member {object} [azureBlobStorage] Http logs to azure blob storage
+ * configuration.
+ * @member {string} [azureBlobStorage.sasUrl] SAS url to a azure blob
+ * container with read/write/list/delete permissions.
+ * @member {number} [azureBlobStorage.retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [azureBlobStorage.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of HttpLogsConfig
+ *
+ * @returns {object} metadata of HttpLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HttpLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'HttpLogsConfig',
+ modelProperties: {
+ fileSystem: {
+ required: false,
+ serializedName: 'fileSystem',
+ type: {
+ name: 'Composite',
+ className: 'FileSystemHttpLogsConfig'
+ }
+ },
+ azureBlobStorage: {
+ required: false,
+ serializedName: 'azureBlobStorage',
+ type: {
+ name: 'Composite',
+ className: 'AzureBlobStorageHttpLogsConfig'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HttpLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hybridConnection.js b/lib/services/websiteManagement2/lib/lib/models/hybridConnection.js
new file mode 100644
index 0000000000..8c40a4b549
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hybridConnection.js
@@ -0,0 +1,148 @@
+/*
+ * 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');
+
+/**
+ * Hybrid Connection contract. This is used to configure a Hybrid Connection.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class HybridConnection extends models['ProxyOnlyResource'] {
+ /**
+ * Create a HybridConnection.
+ * @member {string} [serviceBusNamespace] The name of the Service Bus
+ * namespace.
+ * @member {string} [relayName] The name of the Service Bus relay.
+ * @member {string} [relayArmUri] The ARM URI to the Service Bus relay.
+ * @member {string} [hostname] The hostname of the endpoint.
+ * @member {number} [port] The port of the endpoint.
+ * @member {string} [sendKeyName] The name of the Service Bus key which has
+ * Send permissions. This is used to authenticate to Service Bus.
+ * @member {string} [sendKeyValue] The value of the Service Bus key. This is
+ * used to authenticate to Service Bus. In ARM this key will not be returned
+ * normally, use the POST /listKeys API instead.
+ * @member {string} [serviceBusSuffix] The suffix for the service bus
+ * endpoint. By default this is .servicebus.windows.net
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HybridConnection
+ *
+ * @returns {object} metadata of HybridConnection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HybridConnection',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnection',
+ 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'
+ }
+ },
+ serviceBusNamespace: {
+ required: false,
+ serializedName: 'properties.serviceBusNamespace',
+ type: {
+ name: 'String'
+ }
+ },
+ relayName: {
+ required: false,
+ serializedName: 'properties.relayName',
+ type: {
+ name: 'String'
+ }
+ },
+ relayArmUri: {
+ required: false,
+ serializedName: 'properties.relayArmUri',
+ type: {
+ name: 'String'
+ }
+ },
+ hostname: {
+ required: false,
+ serializedName: 'properties.hostname',
+ type: {
+ name: 'String'
+ }
+ },
+ port: {
+ required: false,
+ serializedName: 'properties.port',
+ type: {
+ name: 'Number'
+ }
+ },
+ sendKeyName: {
+ required: false,
+ serializedName: 'properties.sendKeyName',
+ type: {
+ name: 'String'
+ }
+ },
+ sendKeyValue: {
+ required: false,
+ serializedName: 'properties.sendKeyValue',
+ type: {
+ name: 'String'
+ }
+ },
+ serviceBusSuffix: {
+ required: false,
+ serializedName: 'properties.serviceBusSuffix',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HybridConnection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hybridConnectionCollection.js b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionCollection.js
new file mode 100644
index 0000000000..ae824224f0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionCollection.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 hostname bindings.
+ */
+class HybridConnectionCollection extends Array {
+ /**
+ * Create a HybridConnectionCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HybridConnectionCollection
+ *
+ * @returns {object} metadata of HybridConnectionCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HybridConnectionCollection',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnectionCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HybridConnectionElementType',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnection'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HybridConnectionCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hybridConnectionKey.js b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionKey.js
new file mode 100644
index 0000000000..1f4ee6efc7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionKey.js
@@ -0,0 +1,98 @@
+/*
+ * 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');
+
+/**
+ * Hybrid Connection key contract. This has the send key name and value for a
+ * Hybrid Connection.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class HybridConnectionKey extends models['ProxyOnlyResource'] {
+ /**
+ * Create a HybridConnectionKey.
+ * @member {string} [sendKeyName] The name of the send key.
+ * @member {string} [sendKeyValue] The value of the send key.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HybridConnectionKey
+ *
+ * @returns {object} metadata of HybridConnectionKey
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HybridConnectionKey',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnectionKey',
+ 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'
+ }
+ },
+ sendKeyName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.sendKeyName',
+ type: {
+ name: 'String'
+ }
+ },
+ sendKeyValue: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.sendKeyValue',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HybridConnectionKey;
diff --git a/lib/services/websiteManagement2/lib/lib/models/hybridConnectionLimits.js b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionLimits.js
new file mode 100644
index 0000000000..dcae3a5dc1
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/hybridConnectionLimits.js
@@ -0,0 +1,99 @@
+/*
+ * 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');
+
+/**
+ * Hybrid Connection limits contract. This is used to return the plan limits of
+ * Hybrid Connections.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class HybridConnectionLimits extends models['ProxyOnlyResource'] {
+ /**
+ * Create a HybridConnectionLimits.
+ * @member {number} [current] The current number of Hybrid Connections.
+ * @member {number} [maximum] The maximum number of Hybrid Connections
+ * allowed.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of HybridConnectionLimits
+ *
+ * @returns {object} metadata of HybridConnectionLimits
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'HybridConnectionLimits',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnectionLimits',
+ 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'
+ }
+ },
+ current: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.current',
+ type: {
+ name: 'Number'
+ }
+ },
+ maximum: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maximum',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = HybridConnectionLimits;
diff --git a/lib/services/websiteManagement2/lib/lib/models/identifier.js b/lib/services/websiteManagement2/lib/lib/models/identifier.js
new file mode 100644
index 0000000000..6f2bbdd90e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/identifier.js
@@ -0,0 +1,87 @@
+/*
+ * 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');
+
+/**
+ * A domain specific resource identifier.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class Identifier extends models['ProxyOnlyResource'] {
+ /**
+ * Create a Identifier.
+ * @member {string} [identifierId] String representation of the identity.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Identifier
+ *
+ * @returns {object} metadata of Identifier
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Identifier',
+ type: {
+ name: 'Composite',
+ className: 'Identifier',
+ 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'
+ }
+ },
+ identifierId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Identifier;
diff --git a/lib/services/websiteManagement2/lib/lib/models/identifierCollection.js b/lib/services/websiteManagement2/lib/lib/models/identifierCollection.js
new file mode 100644
index 0000000000..849810dc14
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/identifierCollection.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 identifiers.
+ */
+class IdentifierCollection extends Array {
+ /**
+ * Create a IdentifierCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of IdentifierCollection
+ *
+ * @returns {object} metadata of IdentifierCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'IdentifierCollection',
+ type: {
+ name: 'Composite',
+ className: 'IdentifierCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'IdentifierElementType',
+ type: {
+ name: 'Composite',
+ className: 'Identifier'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = IdentifierCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/lib/models/index.d.ts
new file mode 100644
index 0000000000..07caf5ba94
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/index.d.ts
@@ -0,0 +1,7284 @@
+/*
+ * 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.
+ */
+
+import { BaseResource } from 'ms-rest-azure';
+import { CloudError } from 'ms-rest-azure';
+import * as moment from 'moment';
+
+export { BaseResource } from 'ms-rest-azure';
+export { CloudError } from 'ms-rest-azure';
+
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificate class.
+ * @constructor
+ * Key Vault container for a certificate that is purchased through Azure.
+ *
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+export interface AppServiceCertificate {
+ keyVaultId?: string;
+ keyVaultSecretName?: string;
+ readonly provisioningState?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Resource class.
+ * @constructor
+ * Azure resource. This resource is tracked in Azure Resource Manager
+ *
+ * @member {string} [id] Resource Id.
+ * @member {string} [name] Resource Name.
+ * @member {string} [kind] Kind of resource.
+ * @member {string} location Resource Location.
+ * @member {string} [type] Resource type.
+ * @member {object} [tags] Resource tags.
+ */
+export interface Resource extends BaseResource {
+ readonly id?: string;
+ readonly name?: string;
+ kind?: string;
+ location: string;
+ readonly type?: string;
+ tags?: { [propertyName: string]: string };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificateResource class.
+ * @constructor
+ * Key Vault container ARM resource for a certificate that is purchased through
+ * Azure.
+ *
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+export interface AppServiceCertificateResource extends Resource {
+ keyVaultId?: string;
+ keyVaultSecretName?: string;
+ readonly provisioningState?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CertificateDetails class.
+ * @constructor
+ * SSL certificate details.
+ *
+ * @member {number} [version] Certificate Version.
+ * @member {string} [serialNumber] Certificate Serial Number.
+ * @member {string} [thumbprint] Certificate Thumbprint.
+ * @member {string} [subject] Certificate Subject.
+ * @member {date} [notBefore] Date Certificate is valid from.
+ * @member {date} [notAfter] Date Certificate is valid to.
+ * @member {string} [signatureAlgorithm] Certificate Signature algorithm.
+ * @member {string} [issuer] Certificate Issuer.
+ * @member {string} [rawData] Raw certificate data.
+ */
+export interface CertificateDetails {
+ readonly version?: number;
+ readonly serialNumber?: string;
+ readonly thumbprint?: string;
+ readonly subject?: string;
+ readonly notBefore?: Date;
+ readonly notAfter?: Date;
+ readonly signatureAlgorithm?: string;
+ readonly issuer?: string;
+ readonly rawData?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificateOrder class.
+ * @constructor
+ * SSL certificate purchase order.
+ *
+ * @member {object} [certificates] State of the Key Vault secret.
+ * @member {string} [distinguishedName] Certificate distinguished name.
+ * @member {string} [domainVerificationToken] Domain verification token.
+ * @member {number} [validityInYears] Duration in years (must be between 1 and
+ * 3). Default value: 1 .
+ * @member {number} [keySize] Certificate key size. Default value: 2048 .
+ * @member {string} productType Certificate product type. Possible values
+ * include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'
+ * @member {boolean} [autoRenew] true if the certificate should be
+ * automatically renewed when it expires; otherwise, false.
+ * Default value: true .
+ * @member {string} [provisioningState] Status of certificate order. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'
+ * @member {string} [status] Current order status. Possible values include:
+ * 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied',
+ * 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
+ * @member {object} [signedCertificate] Signed certificate.
+ * @member {number} [signedCertificate.version] Certificate Version.
+ * @member {string} [signedCertificate.serialNumber] Certificate Serial Number.
+ * @member {string} [signedCertificate.thumbprint] Certificate Thumbprint.
+ * @member {string} [signedCertificate.subject] Certificate Subject.
+ * @member {date} [signedCertificate.notBefore] Date Certificate is valid from.
+ * @member {date} [signedCertificate.notAfter] Date Certificate is valid to.
+ * @member {string} [signedCertificate.signatureAlgorithm] Certificate
+ * Signature algorithm.
+ * @member {string} [signedCertificate.issuer] Certificate Issuer.
+ * @member {string} [signedCertificate.rawData] Raw certificate data.
+ * @member {string} [csr] Last CSR that was created for this order.
+ * @member {object} [intermediate] Intermediate certificate.
+ * @member {number} [intermediate.version] Certificate Version.
+ * @member {string} [intermediate.serialNumber] Certificate Serial Number.
+ * @member {string} [intermediate.thumbprint] Certificate Thumbprint.
+ * @member {string} [intermediate.subject] Certificate Subject.
+ * @member {date} [intermediate.notBefore] Date Certificate is valid from.
+ * @member {date} [intermediate.notAfter] Date Certificate is valid to.
+ * @member {string} [intermediate.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [intermediate.issuer] Certificate Issuer.
+ * @member {string} [intermediate.rawData] Raw certificate data.
+ * @member {object} [root] Root certificate.
+ * @member {number} [root.version] Certificate Version.
+ * @member {string} [root.serialNumber] Certificate Serial Number.
+ * @member {string} [root.thumbprint] Certificate Thumbprint.
+ * @member {string} [root.subject] Certificate Subject.
+ * @member {date} [root.notBefore] Date Certificate is valid from.
+ * @member {date} [root.notAfter] Date Certificate is valid to.
+ * @member {string} [root.signatureAlgorithm] Certificate Signature algorithm.
+ * @member {string} [root.issuer] Certificate Issuer.
+ * @member {string} [root.rawData] Raw certificate data.
+ * @member {string} [serialNumber] Current serial number of the certificate.
+ * @member {date} [lastCertificateIssuanceTime] Certificate last issuance time.
+ * @member {date} [expirationTime] Certificate expiration time.
+ * @member {boolean} [isPrivateKeyExternal] true if private key is
+ * external; otherwise, false.
+ * @member {array} [appServiceCertificateNotRenewableReasons] Reasons why App
+ * Service Certificate is not renewable at the current moment.
+ * @member {date} [nextAutoRenewalTimeStamp] Time stamp when the certificate
+ * would be auto renewed next
+ */
+export interface AppServiceCertificateOrder extends Resource {
+ certificates?: { [propertyName: string]: AppServiceCertificate };
+ distinguishedName?: string;
+ readonly domainVerificationToken?: string;
+ validityInYears?: number;
+ keySize?: number;
+ productType: string;
+ autoRenew?: boolean;
+ readonly provisioningState?: string;
+ readonly status?: string;
+ readonly signedCertificate?: CertificateDetails;
+ csr?: string;
+ readonly intermediate?: CertificateDetails;
+ readonly root?: CertificateDetails;
+ readonly serialNumber?: string;
+ readonly lastCertificateIssuanceTime?: Date;
+ readonly expirationTime?: Date;
+ readonly isPrivateKeyExternal?: boolean;
+ readonly appServiceCertificateNotRenewableReasons?: string[];
+ readonly nextAutoRenewalTimeStamp?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProxyOnlyResource class.
+ * @constructor
+ * Azure proxy only resource. This resource is not tracked by Azure Resource
+ * Manager.
+ *
+ * @member {string} [id] Resource Id.
+ * @member {string} [name] Resource Name.
+ * @member {string} [kind] Kind of resource.
+ * @member {string} [type] Resource type.
+ */
+export interface ProxyOnlyResource extends BaseResource {
+ readonly id?: string;
+ readonly name?: string;
+ kind?: string;
+ readonly type?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificateOrderPatchResource class.
+ * @constructor
+ * ARM resource for a certificate order that is purchased through Azure.
+ *
+ * @member {object} [certificates] State of the Key Vault secret.
+ * @member {string} [distinguishedName] Certificate distinguished name.
+ * @member {string} [domainVerificationToken] Domain verification token.
+ * @member {number} [validityInYears] Duration in years (must be between 1 and
+ * 3). Default value: 1 .
+ * @member {number} [keySize] Certificate key size. Default value: 2048 .
+ * @member {string} productType Certificate product type. Possible values
+ * include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'
+ * @member {boolean} [autoRenew] true if the certificate should be
+ * automatically renewed when it expires; otherwise, false.
+ * Default value: true .
+ * @member {string} [provisioningState] Status of certificate order. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'
+ * @member {string} [status] Current order status. Possible values include:
+ * 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied',
+ * 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
+ * @member {object} [signedCertificate] Signed certificate.
+ * @member {number} [signedCertificate.version] Certificate Version.
+ * @member {string} [signedCertificate.serialNumber] Certificate Serial Number.
+ * @member {string} [signedCertificate.thumbprint] Certificate Thumbprint.
+ * @member {string} [signedCertificate.subject] Certificate Subject.
+ * @member {date} [signedCertificate.notBefore] Date Certificate is valid from.
+ * @member {date} [signedCertificate.notAfter] Date Certificate is valid to.
+ * @member {string} [signedCertificate.signatureAlgorithm] Certificate
+ * Signature algorithm.
+ * @member {string} [signedCertificate.issuer] Certificate Issuer.
+ * @member {string} [signedCertificate.rawData] Raw certificate data.
+ * @member {string} [csr] Last CSR that was created for this order.
+ * @member {object} [intermediate] Intermediate certificate.
+ * @member {number} [intermediate.version] Certificate Version.
+ * @member {string} [intermediate.serialNumber] Certificate Serial Number.
+ * @member {string} [intermediate.thumbprint] Certificate Thumbprint.
+ * @member {string} [intermediate.subject] Certificate Subject.
+ * @member {date} [intermediate.notBefore] Date Certificate is valid from.
+ * @member {date} [intermediate.notAfter] Date Certificate is valid to.
+ * @member {string} [intermediate.signatureAlgorithm] Certificate Signature
+ * algorithm.
+ * @member {string} [intermediate.issuer] Certificate Issuer.
+ * @member {string} [intermediate.rawData] Raw certificate data.
+ * @member {object} [root] Root certificate.
+ * @member {number} [root.version] Certificate Version.
+ * @member {string} [root.serialNumber] Certificate Serial Number.
+ * @member {string} [root.thumbprint] Certificate Thumbprint.
+ * @member {string} [root.subject] Certificate Subject.
+ * @member {date} [root.notBefore] Date Certificate is valid from.
+ * @member {date} [root.notAfter] Date Certificate is valid to.
+ * @member {string} [root.signatureAlgorithm] Certificate Signature algorithm.
+ * @member {string} [root.issuer] Certificate Issuer.
+ * @member {string} [root.rawData] Raw certificate data.
+ * @member {string} [serialNumber] Current serial number of the certificate.
+ * @member {date} [lastCertificateIssuanceTime] Certificate last issuance time.
+ * @member {date} [expirationTime] Certificate expiration time.
+ * @member {boolean} [isPrivateKeyExternal] true if private key is
+ * external; otherwise, false.
+ * @member {array} [appServiceCertificateNotRenewableReasons] Reasons why App
+ * Service Certificate is not renewable at the current moment.
+ * @member {date} [nextAutoRenewalTimeStamp] Time stamp when the certificate
+ * would be auto renewed next
+ */
+export interface AppServiceCertificateOrderPatchResource extends ProxyOnlyResource {
+ certificates?: { [propertyName: string]: AppServiceCertificate };
+ distinguishedName?: string;
+ readonly domainVerificationToken?: string;
+ validityInYears?: number;
+ keySize?: number;
+ productType: string;
+ autoRenew?: boolean;
+ readonly provisioningState?: string;
+ readonly status?: string;
+ readonly signedCertificate?: CertificateDetails;
+ csr?: string;
+ readonly intermediate?: CertificateDetails;
+ readonly root?: CertificateDetails;
+ readonly serialNumber?: string;
+ readonly lastCertificateIssuanceTime?: Date;
+ readonly expirationTime?: Date;
+ readonly isPrivateKeyExternal?: boolean;
+ readonly appServiceCertificateNotRenewableReasons?: string[];
+ readonly nextAutoRenewalTimeStamp?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificatePatchResource class.
+ * @constructor
+ * Key Vault container ARM resource for a certificate that is purchased through
+ * Azure.
+ *
+ * @member {string} [keyVaultId] Key Vault resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [provisioningState] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ */
+export interface AppServiceCertificatePatchResource extends ProxyOnlyResource {
+ keyVaultId?: string;
+ keyVaultSecretName?: string;
+ readonly provisioningState?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CertificateEmail class.
+ * @constructor
+ * SSL certificate email.
+ *
+ * @member {string} [emailId] Email id.
+ * @member {date} [timeStamp] Time stamp.
+ */
+export interface CertificateEmail extends ProxyOnlyResource {
+ emailId?: string;
+ timeStamp?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CertificateOrderAction class.
+ * @constructor
+ * Certificate order action.
+ *
+ * @member {string} [certificateOrderActionType] Action type. Possible values
+ * include: 'CertificateIssued', 'CertificateOrderCanceled',
+ * 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete',
+ * 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop',
+ * 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning',
+ * 'FraudDocumentationRequired', 'Unknown'
+ * @member {date} [createdAt] Time at which the certificate action was
+ * performed.
+ */
+export interface CertificateOrderAction extends ProxyOnlyResource {
+ certificateOrderActionType?: string;
+ createdAt?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ReissueCertificateOrderRequest class.
+ * @constructor
+ * Class representing certificate reissue request.
+ *
+ * @member {number} [keySize] Certificate Key Size.
+ * @member {number} [delayExistingRevokeInHours] Delay in hours to revoke
+ * existing certificate after the new certificate is issued.
+ * @member {string} [csr] Csr to be used for re-key operation.
+ * @member {boolean} [isPrivateKeyExternal] Should we change the ASC type (from
+ * managed private key to external private key and vice versa).
+ */
+export interface ReissueCertificateOrderRequest extends ProxyOnlyResource {
+ keySize?: number;
+ delayExistingRevokeInHours?: number;
+ csr?: string;
+ isPrivateKeyExternal?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RenewCertificateOrderRequest class.
+ * @constructor
+ * Class representing certificate renew request.
+ *
+ * @member {number} [keySize] Certificate Key Size.
+ * @member {string} [csr] Csr to be used for re-key operation.
+ * @member {boolean} [isPrivateKeyExternal] Should we change the ASC type (from
+ * managed private key to external private key and vice versa).
+ */
+export interface RenewCertificateOrderRequest extends ProxyOnlyResource {
+ keySize?: number;
+ csr?: string;
+ isPrivateKeyExternal?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteSeal class.
+ * @constructor
+ * Site seal
+ *
+ * @member {string} html HTML snippet
+ */
+export interface SiteSeal {
+ html: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteSealRequest class.
+ * @constructor
+ * Site seal request.
+ *
+ * @member {boolean} [lightTheme] If true use the light color
+ * theme for site seal; otherwise, use the default color theme.
+ * @member {string} [locale] Locale of site seal.
+ */
+export interface SiteSealRequest {
+ lightTheme?: boolean;
+ locale?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetRoute class.
+ * @constructor
+ * Virtual Network route contract used to pass routing information for a
+ * Virtual Network.
+ *
+ * @member {string} [vnetRouteName] The name of this route. This is only
+ * returned by the server and does not need to be set by the client.
+ * @member {string} [startAddress] The starting address for this route. This
+ * may also include a CIDR notation, in which case the end address must not be
+ * specified.
+ * @member {string} [endAddress] The ending address for this route. If the
+ * start address is specified in CIDR notation, this must be omitted.
+ * @member {string} [routeType] The type of route this is:
+ * DEFAULT - By default, every app has routes to the local address ranges
+ * specified by RFC1918
+ * INHERITED - Routes inherited from the real Virtual Network routes
+ * STATIC - Static route set on the app only
+ *
+ * These values will be used for syncing an app's routes with those from a
+ * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
+ */
+export interface VnetRoute extends ProxyOnlyResource {
+ vnetRouteName?: string;
+ startAddress?: string;
+ endAddress?: string;
+ routeType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetInfo class.
+ * @constructor
+ * Virtual Network information contract.
+ *
+ * @member {string} [vnetResourceId] The Virtual Network's resource ID.
+ * @member {string} [certThumbprint] The client certificate thumbprint.
+ * @member {buffer} [certBlob] A certificate file (.cer) blob containing the
+ * public key of the private key used to authenticate a
+ * Point-To-Site VPN connection.
+ * @member {array} [routes] The routes that this Virtual Network connection
+ * uses.
+ * @member {boolean} [resyncRequired] true if a resync is
+ * required; otherwise, false.
+ * @member {string} [dnsServers] DNS servers to be used by this Virtual
+ * Network. This should be a comma-separated list of IP addresses.
+ */
+export interface VnetInfo extends ProxyOnlyResource {
+ vnetResourceId?: string;
+ readonly certThumbprint?: string;
+ certBlob?: Buffer;
+ readonly routes?: VnetRoute[];
+ readonly resyncRequired?: boolean;
+ dnsServers?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetGateway class.
+ * @constructor
+ * The Virtual Network gateway contract. This is used to give the Virtual
+ * Network gateway access to the VPN package.
+ *
+ * @member {string} [vnetName] The Virtual Network name.
+ * @member {string} vpnPackageUri The URI where the VPN package can be
+ * downloaded.
+ */
+export interface VnetGateway extends ProxyOnlyResource {
+ vnetName?: string;
+ vpnPackageUri: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the User class.
+ * @constructor
+ * User crendentials used for publishing activity.
+ *
+ * @member {string} [userName] Username
+ * @member {string} publishingUserName Username used for publishing.
+ * @member {string} [publishingPassword] Password used for publishing.
+ * @member {string} [publishingPasswordHash] Password hash used for publishing.
+ * @member {string} [publishingPasswordHashSalt] Password hash salt used for
+ * publishing.
+ */
+export interface User extends ProxyOnlyResource {
+ userName?: string;
+ publishingUserName: string;
+ publishingPassword?: string;
+ publishingPasswordHash?: string;
+ publishingPasswordHashSalt?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SnapshotRecoveryTarget class.
+ * @constructor
+ * Specifies the web app that snapshot contents will be written to.
+ *
+ * @member {string} [location] Geographical location of the target web app,
+ * e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [id] ARM resource ID of the target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ */
+export interface SnapshotRecoveryTarget {
+ location?: string;
+ id?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SnapshotRecoveryRequest class.
+ * @constructor
+ * Details about app recovery operation.
+ *
+ * @member {string} [snapshotTime] Point in time in which the app recovery
+ * should be attempted, formatted as a DateTime string.
+ * @member {object} [recoveryTarget] Specifies the web app that snapshot
+ * contents will be written to.
+ * @member {string} [recoveryTarget.location] Geographical location of the
+ * target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [recoveryTarget.id] ARM resource ID of the target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} overwrite If true the recovery operation can
+ * overwrite source app; otherwise, false.
+ * @member {boolean} [recoverConfiguration] If true, site configuration, in
+ * addition to content, will be reverted.
+ * @member {boolean} [ignoreConflictingHostNames] If true, custom hostname
+ * conflicts will be ignored when recovering to a target web app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ */
+export interface SnapshotRecoveryRequest extends ProxyOnlyResource {
+ snapshotTime?: string;
+ recoveryTarget?: SnapshotRecoveryTarget;
+ overwrite: boolean;
+ recoverConfiguration?: boolean;
+ ignoreConflictingHostNames?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricAvailability class.
+ * @constructor
+ * Metrics availability and retention.
+ *
+ * @member {string} [timeGrain] Time grain .
+ * @member {string} [retention] Retention period for the current time grain.
+ */
+export interface ResourceMetricAvailability {
+ readonly timeGrain?: string;
+ readonly retention?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricName class.
+ * @constructor
+ * Name of a metric for any resource .
+ *
+ * @member {string} [value] metric name value.
+ * @member {string} [localizedValue] Localized metric name value.
+ */
+export interface ResourceMetricName {
+ readonly value?: string;
+ readonly localizedValue?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricDefinition class.
+ * @constructor
+ * Metadata for the metrics.
+ *
+ * @member {object} [resourceMetricDefinitionName] Name of the metric.
+ * @member {string} [resourceMetricDefinitionName.value] metric name value.
+ * @member {string} [resourceMetricDefinitionName.localizedValue] Localized
+ * metric name value.
+ * @member {string} [unit] Unit of the metric.
+ * @member {string} [primaryAggregationType] Primary aggregation type.
+ * @member {array} [metricAvailabilities] List of time grains supported for the
+ * metric together with retention period.
+ * @member {string} [resourceUri] Resource URI.
+ * @member {string} [resourceMetricDefinitionId] Resource ID.
+ * @member {object} [properties] Resource metric definition properties.
+ */
+export interface ResourceMetricDefinition extends ProxyOnlyResource {
+ readonly resourceMetricDefinitionName?: ResourceMetricName;
+ readonly unit?: string;
+ readonly primaryAggregationType?: string;
+ readonly metricAvailabilities?: ResourceMetricAvailability[];
+ readonly resourceUri?: string;
+ readonly resourceMetricDefinitionId?: string;
+ readonly properties?: { [propertyName: string]: string };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PushSettings class.
+ * @constructor
+ * Push settings for the App.
+ *
+ * @member {boolean} isPushEnabled Gets or sets a flag indicating whether the
+ * Push endpoint is enabled.
+ * @member {string} [tagWhitelistJson] Gets or sets a JSON string containing a
+ * list of tags that are whitelisted for use by the push registration endpoint.
+ * @member {string} [tagsRequiringAuth] Gets or sets a JSON string containing a
+ * list of tags that require user authentication to be used in the push
+ * registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [dynamicTagsJson] Gets or sets a JSON string containing a
+ * list of dynamic tags that will be evaluated from user claims in the push
+ * registration endpoint.
+ */
+export interface PushSettings extends ProxyOnlyResource {
+ isPushEnabled: boolean;
+ tagWhitelistJson?: string;
+ tagsRequiringAuth?: string;
+ dynamicTagsJson?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Identifier class.
+ * @constructor
+ * A domain specific resource identifier.
+ *
+ * @member {string} [identifierId] String representation of the identity.
+ */
+export interface Identifier extends ProxyOnlyResource {
+ identifierId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HybridConnectionKey class.
+ * @constructor
+ * Hybrid Connection key contract. This has the send key name and value for a
+ * Hybrid Connection.
+ *
+ * @member {string} [sendKeyName] The name of the send key.
+ * @member {string} [sendKeyValue] The value of the send key.
+ */
+export interface HybridConnectionKey extends ProxyOnlyResource {
+ readonly sendKeyName?: string;
+ readonly sendKeyValue?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HybridConnection class.
+ * @constructor
+ * Hybrid Connection contract. This is used to configure a Hybrid Connection.
+ *
+ * @member {string} [serviceBusNamespace] The name of the Service Bus
+ * namespace.
+ * @member {string} [relayName] The name of the Service Bus relay.
+ * @member {string} [relayArmUri] The ARM URI to the Service Bus relay.
+ * @member {string} [hostname] The hostname of the endpoint.
+ * @member {number} [port] The port of the endpoint.
+ * @member {string} [sendKeyName] The name of the Service Bus key which has
+ * Send permissions. This is used to authenticate to Service Bus.
+ * @member {string} [sendKeyValue] The value of the Service Bus key. This is
+ * used to authenticate to Service Bus. In ARM this key will not be returned
+ * normally, use the POST /listKeys API instead.
+ * @member {string} [serviceBusSuffix] The suffix for the service bus endpoint.
+ * By default this is .servicebus.windows.net
+ */
+export interface HybridConnection extends ProxyOnlyResource {
+ serviceBusNamespace?: string;
+ relayName?: string;
+ relayArmUri?: string;
+ hostname?: string;
+ port?: number;
+ sendKeyName?: string;
+ sendKeyValue?: string;
+ serviceBusSuffix?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ManagedServiceIdentity class.
+ * @constructor
+ * Managed service identity.
+ *
+ * @member {string} [type] Type of managed service identity. Possible values
+ * include: 'SystemAssigned'
+ * @member {string} [tenantId] Tenant of managed service identity.
+ * @member {string} [principalId] Principal Id of managed service identity.
+ */
+export interface ManagedServiceIdentity {
+ type?: string;
+ readonly tenantId?: string;
+ readonly principalId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SlotSwapStatus class.
+ * @constructor
+ * The status of the last successfull slot swap operation.
+ *
+ * @member {date} [timestampUtc] The time the last successful slot swap
+ * completed.
+ * @member {string} [sourceSlotName] The source slot of the last swap
+ * operation.
+ * @member {string} [destinationSlotName] The destination slot of the last swap
+ * operation.
+ */
+export interface SlotSwapStatus {
+ readonly timestampUtc?: Date;
+ readonly sourceSlotName?: string;
+ readonly destinationSlotName?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CloningInfo class.
+ * @constructor
+ * Information needed for cloning operation.
+ *
+ * @member {uuid} [correlationId] Correlation ID of cloning operation. This ID
+ * ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [overwrite] true to overwrite destination
+ * app; otherwise, false.
+ * @member {boolean} [cloneCustomHostNames] true to clone custom
+ * hostnames from source app; otherwise, false.
+ * @member {boolean} [cloneSourceControl] true to clone source
+ * control from source app; otherwise, false.
+ * @member {string} sourceWebAppId ARM resource ID of the source app. App
+ * resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [hostingEnvironment] App Service Environment.
+ * @member {object} [appSettingsOverrides] Application setting overrides for
+ * cloned app. If specified, these settings override the settings cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [configureLoadBalancing] true to configure
+ * load balancing for source and destination app.
+ * @member {string} [trafficManagerProfileId] ARM resource ID of the Traffic
+ * Manager profile to use, if it exists. Traffic Manager resource ID is of the
+ * form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [trafficManagerProfileName] Name of Traffic Manager profile
+ * to create. This is only needed if Traffic Manager profile does not already
+ * exist.
+ * @member {boolean} [ignoreQuotas] true if quotas should be
+ * ignored; otherwise, false.
+ */
+export interface CloningInfo {
+ correlationId?: string;
+ overwrite?: boolean;
+ cloneCustomHostNames?: boolean;
+ cloneSourceControl?: boolean;
+ sourceWebAppId: string;
+ hostingEnvironment?: string;
+ appSettingsOverrides?: { [propertyName: string]: string };
+ configureLoadBalancing?: boolean;
+ trafficManagerProfileId?: string;
+ trafficManagerProfileName?: string;
+ ignoreQuotas?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostingEnvironmentProfile class.
+ * @constructor
+ * Specification for an App Service Environment to use for this resource.
+ *
+ * @member {string} [id] Resource ID of the App Service Environment.
+ * @member {string} [name] Name of the App Service Environment.
+ * @member {string} [type] Resource type of the App Service Environment.
+ */
+export interface HostingEnvironmentProfile {
+ id?: string;
+ readonly name?: string;
+ readonly type?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the IpSecurityRestriction class.
+ * @constructor
+ * IP security restriction on an app.
+ *
+ * @member {string} ipAddress IP address the security restriction is valid for.
+ * @member {string} [subnetMask] Subnet mask for the range of IP addresses the
+ * restriction is valid for.
+ */
+export interface IpSecurityRestriction {
+ ipAddress: string;
+ subnetMask?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ApiDefinitionInfo class.
+ * @constructor
+ * Information about the formal API definition for the app.
+ *
+ * @member {string} [url] The URL of the API definition.
+ */
+export interface ApiDefinitionInfo {
+ url?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CorsSettings class.
+ * @constructor
+ * Cross-Origin Resource Sharing (CORS) settings for the app.
+ *
+ * @member {array} [allowedOrigins] Gets or sets the list of origins that
+ * should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ */
+export interface CorsSettings {
+ allowedOrigins?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AutoHealCustomAction class.
+ * @constructor
+ * Custom action to be executed
+ * when an auto heal rule is triggered.
+ *
+ * @member {string} [exe] Executable to be run.
+ * @member {string} [parameters] Parameters for the executable.
+ */
+export interface AutoHealCustomAction {
+ exe?: string;
+ parameters?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AutoHealActions class.
+ * @constructor
+ * Actions which to take by the auto-heal module when a rule is triggered.
+ *
+ * @member {string} [actionType] Predefined action to be taken. Possible values
+ * include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [customAction] Custom action to be taken.
+ * @member {string} [customAction.exe] Executable to be run.
+ * @member {string} [customAction.parameters] Parameters for the executable.
+ * @member {string} [minProcessExecutionTime] Minimum time the process must
+ * execute
+ * before taking the action
+ */
+export interface AutoHealActions {
+ actionType?: string;
+ customAction?: AutoHealCustomAction;
+ minProcessExecutionTime?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SlowRequestsBasedTrigger class.
+ * @constructor
+ * Trigger based on request execution time.
+ *
+ * @member {string} [timeTaken] Time taken.
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+export interface SlowRequestsBasedTrigger {
+ timeTaken?: string;
+ count?: number;
+ timeInterval?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StatusCodesBasedTrigger class.
+ * @constructor
+ * Trigger based on status code.
+ *
+ * @member {number} [status] HTTP status code.
+ * @member {number} [subStatus] Request Sub Status.
+ * @member {number} [win32Status] Win32 error code.
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+export interface StatusCodesBasedTrigger {
+ status?: number;
+ subStatus?: number;
+ win32Status?: number;
+ count?: number;
+ timeInterval?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RequestsBasedTrigger class.
+ * @constructor
+ * Trigger based on total requests.
+ *
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+export interface RequestsBasedTrigger {
+ count?: number;
+ timeInterval?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AutoHealTriggers class.
+ * @constructor
+ * Triggers for auto-heal.
+ *
+ * @member {object} [requests] A rule based on total requests.
+ * @member {number} [requests.count] Request Count.
+ * @member {string} [requests.timeInterval] Time interval.
+ * @member {number} [privateBytesInKB] A rule based on private bytes.
+ * @member {array} [statusCodes] A rule based on status codes.
+ * @member {object} [slowRequests] A rule based on request execution time.
+ * @member {string} [slowRequests.timeTaken] Time taken.
+ * @member {number} [slowRequests.count] Request Count.
+ * @member {string} [slowRequests.timeInterval] Time interval.
+ */
+export interface AutoHealTriggers {
+ requests?: RequestsBasedTrigger;
+ privateBytesInKB?: number;
+ statusCodes?: StatusCodesBasedTrigger[];
+ slowRequests?: SlowRequestsBasedTrigger;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AutoHealRules class.
+ * @constructor
+ * Rules that can be defined for auto-heal.
+ *
+ * @member {object} [triggers] Conditions that describe when to execute the
+ * auto-heal actions.
+ * @member {object} [triggers.requests] A rule based on total requests.
+ * @member {number} [triggers.requests.count] Request Count.
+ * @member {string} [triggers.requests.timeInterval] Time interval.
+ * @member {number} [triggers.privateBytesInKB] A rule based on private bytes.
+ * @member {array} [triggers.statusCodes] A rule based on status codes.
+ * @member {object} [triggers.slowRequests] A rule based on request execution
+ * time.
+ * @member {string} [triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [triggers.slowRequests.count] Request Count.
+ * @member {string} [triggers.slowRequests.timeInterval] Time interval.
+ * @member {object} [actions] Actions to be executed when a rule is triggered.
+ * @member {string} [actions.actionType] Predefined action to be taken.
+ * Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [actions.customAction] Custom action to be taken.
+ * @member {string} [actions.customAction.exe] Executable to be run.
+ * @member {string} [actions.customAction.parameters] Parameters for the
+ * executable.
+ * @member {string} [actions.minProcessExecutionTime] Minimum time the process
+ * must execute
+ * before taking the action
+ */
+export interface AutoHealRules {
+ triggers?: AutoHealTriggers;
+ actions?: AutoHealActions;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteLimits class.
+ * @constructor
+ * Metric limits set on an app.
+ *
+ * @member {number} [maxPercentageCpu] Maximum allowed CPU usage percentage.
+ * @member {number} [maxMemoryInMb] Maximum allowed memory usage in MB.
+ * @member {number} [maxDiskSizeInMb] Maximum allowed disk size usage in MB.
+ */
+export interface SiteLimits {
+ maxPercentageCpu?: number;
+ maxMemoryInMb?: number;
+ maxDiskSizeInMb?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RampUpRule class.
+ * @constructor
+ * Routing rules for ramp up testing. This rule allows to redirect static
+ * traffic % to a slot or to gradually change routing % based on performance.
+ *
+ * @member {string} [actionHostName] Hostname of a slot to which the traffic
+ * will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
+ * @member {number} [reroutePercentage] Percentage of the traffic which will be
+ * redirected to ActionHostName.
+ * @member {number} [changeStep] In auto ramp up scenario this is the step to
+ * to add/remove from ReroutePercentage until it reaches
+ * MinReroutePercentage or MaxReroutePercentage. Site
+ * metrics are checked every N minutes specificed in
+ * ChangeIntervalInMinutes.
+ * Custom decision algorithm can be provided in TiPCallback site extension
+ * which URL can be specified in ChangeDecisionCallbackUrl.
+ * @member {number} [changeIntervalInMinutes] Specifies interval in mimuntes to
+ * reevaluate ReroutePercentage.
+ * @member {number} [minReroutePercentage] Specifies lower boundary above which
+ * ReroutePercentage will stay.
+ * @member {number} [maxReroutePercentage] Specifies upper boundary below which
+ * ReroutePercentage will stay.
+ * @member {string} [changeDecisionCallbackUrl] Custom decision algorithm can
+ * be provided in TiPCallback site extension which URL can be specified. See
+ * TiPCallback site extension for the scaffold and contracts.
+ * https://www.siteextensions.net/packages/TiPCallback/
+ * @member {string} [name] Name of the routing rule. The recommended name would
+ * be to point to the slot which will receive the traffic in the experiment.
+ */
+export interface RampUpRule {
+ actionHostName?: string;
+ reroutePercentage?: number;
+ changeStep?: number;
+ changeIntervalInMinutes?: number;
+ minReroutePercentage?: number;
+ maxReroutePercentage?: number;
+ changeDecisionCallbackUrl?: string;
+ name?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Experiments class.
+ * @constructor
+ * Routing rules in production experiments.
+ *
+ * @member {array} [rampUpRules] List of ramp-up rules.
+ */
+export interface Experiments {
+ rampUpRules?: RampUpRule[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VirtualDirectory class.
+ * @constructor
+ * Directory for virtual application.
+ *
+ * @member {string} [virtualPath] Path to virtual application.
+ * @member {string} [physicalPath] Physical path.
+ */
+export interface VirtualDirectory {
+ virtualPath?: string;
+ physicalPath?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VirtualApplication class.
+ * @constructor
+ * Virtual application in an app.
+ *
+ * @member {string} [virtualPath] Virtual path.
+ * @member {string} [physicalPath] Physical path.
+ * @member {boolean} [preloadEnabled] true if preloading is
+ * enabled; otherwise, false.
+ * @member {array} [virtualDirectories] Virtual directories for virtual
+ * application.
+ */
+export interface VirtualApplication {
+ virtualPath?: string;
+ physicalPath?: string;
+ preloadEnabled?: boolean;
+ virtualDirectories?: VirtualDirectory[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HandlerMapping class.
+ * @constructor
+ * The IIS handler mappings used to define which handler processes HTTP
+ * requests with certain extension.
+ * For example, it is used to configure php-cgi.exe process to handle all HTTP
+ * requests with *.php extension.
+ *
+ * @member {string} [extension] Requests with this extension will be handled
+ * using the specified FastCGI application.
+ * @member {string} [scriptProcessor] The absolute path to the FastCGI
+ * application.
+ * @member {string} [argumentsProperty] Command-line arguments to be passed to
+ * the script processor.
+ */
+export interface HandlerMapping {
+ extension?: string;
+ scriptProcessor?: string;
+ argumentsProperty?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteMachineKey class.
+ * @constructor
+ * MachineKey of an app.
+ *
+ * @member {string} [validation] MachineKey validation.
+ * @member {string} [validationKey] Validation key.
+ * @member {string} [decryption] Algorithm used for decryption.
+ * @member {string} [decryptionKey] Decryption key.
+ */
+export interface SiteMachineKey {
+ validation?: string;
+ validationKey?: string;
+ decryption?: string;
+ decryptionKey?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ConnStringInfo class.
+ * @constructor
+ * Database connection string information.
+ *
+ * @member {string} [name] Name of connection string.
+ * @member {string} [connectionString] Connection string value.
+ * @member {string} [type] Type of database. Possible values include: 'MySql',
+ * 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus',
+ * 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'
+ */
+export interface ConnStringInfo {
+ name?: string;
+ connectionString?: string;
+ type?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the NameValuePair class.
+ * @constructor
+ * Name value pair.
+ *
+ * @member {string} [name] Pair name.
+ * @member {string} [value] Pair value.
+ */
+export interface NameValuePair {
+ name?: string;
+ value?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteConfig class.
+ * @constructor
+ * Configuration of an App Service app.
+ *
+ * @member {number} [numberOfWorkers] Number of workers.
+ * @member {array} [defaultDocuments] Default documents.
+ * @member {string} [netFrameworkVersion] .NET Framework version. Default
+ * value: 'v4.6' .
+ * @member {string} [phpVersion] Version of PHP.
+ * @member {string} [pythonVersion] Version of Python.
+ * @member {string} [nodeVersion] Version of Node.js.
+ * @member {string} [linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [requestTracingEnabled] true if request
+ * tracing is enabled; otherwise, false.
+ * @member {date} [requestTracingExpirationTime] Request tracing expiration
+ * time.
+ * @member {boolean} [remoteDebuggingEnabled] true if remote
+ * debugging is enabled; otherwise, false.
+ * @member {string} [remoteDebuggingVersion] Remote debugging version.
+ * @member {boolean} [httpLoggingEnabled] true if HTTP logging is
+ * enabled; otherwise, false.
+ * @member {number} [logsDirectorySizeLimit] HTTP logs directory size limit.
+ * @member {boolean} [detailedErrorLoggingEnabled] true if
+ * detailed error logging is enabled; otherwise, false.
+ * @member {string} [publishingUsername] Publishing user name.
+ * @member {array} [appSettings] Application settings.
+ * @member {array} [connectionStrings] Connection strings.
+ * @member {object} [machineKey] Site MachineKey.
+ * @member {string} [machineKey.validation] MachineKey validation.
+ * @member {string} [machineKey.validationKey] Validation key.
+ * @member {string} [machineKey.decryption] Algorithm used for decryption.
+ * @member {string} [machineKey.decryptionKey] Decryption key.
+ * @member {array} [handlerMappings] Handler mappings.
+ * @member {string} [documentRoot] Document root.
+ * @member {string} [scmType] SCM type. Possible values include: 'None',
+ * 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [use32BitWorkerProcess] true to use 32-bit
+ * worker process; otherwise, false.
+ * @member {boolean} [webSocketsEnabled] true if WebSocket is
+ * enabled; otherwise, false.
+ * @member {boolean} [alwaysOn] true if Always On is enabled;
+ * otherwise, false.
+ * @member {string} [javaVersion] Java version.
+ * @member {string} [javaContainer] Java container.
+ * @member {string} [javaContainerVersion] Java container version.
+ * @member {string} [appCommandLine] App command line to launch.
+ * @member {string} [managedPipelineMode] Managed pipeline mode. Possible
+ * values include: 'Integrated', 'Classic'
+ * @member {array} [virtualApplications] Virtual applications.
+ * @member {string} [loadBalancing] Site load balancing. Possible values
+ * include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [experiments] This is work around for polymophic types.
+ * @member {array} [experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [limits] Site limits.
+ * @member {number} [limits.maxPercentageCpu] Maximum allowed CPU usage
+ * percentage.
+ * @member {number} [limits.maxMemoryInMb] Maximum allowed memory usage in MB.
+ * @member {number} [limits.maxDiskSizeInMb] Maximum allowed disk size usage in
+ * MB.
+ * @member {boolean} [autoHealEnabled] true if Auto Heal is
+ * enabled; otherwise, false.
+ * @member {object} [autoHealRules] Auto Heal rules.
+ * @member {object} [autoHealRules.triggers] Conditions that describe when to
+ * execute the auto-heal actions.
+ * @member {object} [autoHealRules.triggers.requests] A rule based on total
+ * requests.
+ * @member {number} [autoHealRules.triggers.requests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.requests.timeInterval] Time
+ * interval.
+ * @member {number} [autoHealRules.triggers.privateBytesInKB] A rule based on
+ * private bytes.
+ * @member {array} [autoHealRules.triggers.statusCodes] A rule based on status
+ * codes.
+ * @member {object} [autoHealRules.triggers.slowRequests] A rule based on
+ * request execution time.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [autoHealRules.triggers.slowRequests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [autoHealRules.actions] Actions to be executed when a rule
+ * is triggered.
+ * @member {string} [autoHealRules.actions.actionType] Predefined action to be
+ * taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [autoHealRules.actions.customAction] Custom action to be
+ * taken.
+ * @member {string} [autoHealRules.actions.customAction.exe] Executable to be
+ * run.
+ * @member {string} [autoHealRules.actions.customAction.parameters] Parameters
+ * for the executable.
+ * @member {string} [autoHealRules.actions.minProcessExecutionTime] Minimum
+ * time the process must execute
+ * before taking the action
+ * @member {string} [tracingOptions] Tracing options.
+ * @member {string} [vnetName] Virtual Network name.
+ * @member {object} [cors] Cross-Origin Resource Sharing (CORS) settings.
+ * @member {array} [cors.allowedOrigins] Gets or sets the list of origins that
+ * should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [push] Push endpoint settings.
+ * @member {boolean} [push.isPushEnabled] Gets or sets a flag indicating
+ * whether the Push endpoint is enabled.
+ * @member {string} [push.tagWhitelistJson] Gets or sets a JSON string
+ * containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [push.tagsRequiringAuth] Gets or sets a JSON string
+ * containing a list of tags that require user authentication to be used in the
+ * push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [push.dynamicTagsJson] Gets or sets a JSON string
+ * containing a list of dynamic tags that will be evaluated from user claims in
+ * the push registration endpoint.
+ * @member {object} [apiDefinition] Information about the formal API definition
+ * for the app.
+ * @member {string} [apiDefinition.url] The URL of the API definition.
+ * @member {string} [autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [localMySqlEnabled] true to enable local
+ * MySQL; otherwise, false. Default value: false .
+ * @member {array} [ipSecurityRestrictions] IP security restrictions.
+ * @member {boolean} [http20Enabled] Http20Enabled: configures a web site to
+ * allow clients to connect over http2.0. Default value: true .
+ * @member {string} [minTlsVersion] MinTlsVersion: configures the minimum
+ * version of TLS required for SSL requests. Possible values include: '1.0',
+ * '1.1', '1.2'
+ */
+export interface SiteConfig {
+ numberOfWorkers?: number;
+ defaultDocuments?: string[];
+ netFrameworkVersion?: string;
+ phpVersion?: string;
+ pythonVersion?: string;
+ nodeVersion?: string;
+ linuxFxVersion?: string;
+ requestTracingEnabled?: boolean;
+ requestTracingExpirationTime?: Date;
+ remoteDebuggingEnabled?: boolean;
+ remoteDebuggingVersion?: string;
+ httpLoggingEnabled?: boolean;
+ logsDirectorySizeLimit?: number;
+ detailedErrorLoggingEnabled?: boolean;
+ publishingUsername?: string;
+ appSettings?: NameValuePair[];
+ connectionStrings?: ConnStringInfo[];
+ readonly machineKey?: SiteMachineKey;
+ handlerMappings?: HandlerMapping[];
+ documentRoot?: string;
+ scmType?: string;
+ use32BitWorkerProcess?: boolean;
+ webSocketsEnabled?: boolean;
+ alwaysOn?: boolean;
+ javaVersion?: string;
+ javaContainer?: string;
+ javaContainerVersion?: string;
+ appCommandLine?: string;
+ managedPipelineMode?: string;
+ virtualApplications?: VirtualApplication[];
+ loadBalancing?: string;
+ experiments?: Experiments;
+ limits?: SiteLimits;
+ autoHealEnabled?: boolean;
+ autoHealRules?: AutoHealRules;
+ tracingOptions?: string;
+ vnetName?: string;
+ cors?: CorsSettings;
+ push?: PushSettings;
+ apiDefinition?: ApiDefinitionInfo;
+ autoSwapSlotName?: string;
+ localMySqlEnabled?: boolean;
+ ipSecurityRestrictions?: IpSecurityRestriction[];
+ http20Enabled?: boolean;
+ minTlsVersion?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostNameSslState class.
+ * @constructor
+ * SSL-enabled hostname.
+ *
+ * @member {string} [name] Hostname.
+ * @member {string} [sslState] SSL type. Possible values include: 'Disabled',
+ * 'SniEnabled', 'IpBasedEnabled'
+ * @member {string} [virtualIP] Virtual IP address assigned to the hostname if
+ * IP based SSL is enabled.
+ * @member {string} [thumbprint] SSL certificate thumbprint.
+ * @member {boolean} [toUpdate] Set to true to update existing
+ * hostname.
+ * @member {string} [hostType] Indicates whether the hostname is a standard or
+ * repository hostname. Possible values include: 'Standard', 'Repository'
+ */
+export interface HostNameSslState {
+ name?: string;
+ sslState?: string;
+ virtualIP?: string;
+ thumbprint?: string;
+ toUpdate?: boolean;
+ hostType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Site class.
+ * @constructor
+ * A web app, a mobile app backend, or an API app.
+ *
+ * @member {string} [state] Current state of the app.
+ * @member {array} [hostNames] Hostnames associated with the app.
+ * @member {string} [repositorySiteName] Name of the repository site.
+ * @member {string} [usageState] State indicating whether the app has exceeded
+ * its quota usage. Read-only. Possible values include: 'Normal', 'Exceeded'
+ * @member {boolean} [enabled] true if the app is enabled;
+ * otherwise, false. Setting this value to false disables the app
+ * (takes the app offline).
+ * @member {array} [enabledHostNames] Enabled hostnames for the app.Hostnames
+ * need to be assigned (see HostNames) AND enabled. Otherwise,
+ * the app is not served on those hostnames.
+ * @member {string} [availabilityState] Management information availability
+ * state for the app. Possible values include: 'Normal', 'Limited',
+ * 'DisasterRecoveryMode'
+ * @member {array} [hostNameSslStates] Hostname SSL states are used to manage
+ * the SSL bindings for app's hostnames.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ * @member {boolean} [reserved] true if reserved; otherwise,
+ * false. Default value: false .
+ * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in UTC.
+ * Read-only.
+ * @member {object} [siteConfig] Configuration of the app.
+ * @member {number} [siteConfig.numberOfWorkers] Number of workers.
+ * @member {array} [siteConfig.defaultDocuments] Default documents.
+ * @member {string} [siteConfig.netFrameworkVersion] .NET Framework version.
+ * @member {string} [siteConfig.phpVersion] Version of PHP.
+ * @member {string} [siteConfig.pythonVersion] Version of Python.
+ * @member {string} [siteConfig.nodeVersion] Version of Node.js.
+ * @member {string} [siteConfig.linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [siteConfig.requestTracingEnabled] true if
+ * request tracing is enabled; otherwise, false.
+ * @member {date} [siteConfig.requestTracingExpirationTime] Request tracing
+ * expiration time.
+ * @member {boolean} [siteConfig.remoteDebuggingEnabled] true if
+ * remote debugging is enabled; otherwise, false.
+ * @member {string} [siteConfig.remoteDebuggingVersion] Remote debugging
+ * version.
+ * @member {boolean} [siteConfig.httpLoggingEnabled] true if HTTP
+ * logging is enabled; otherwise, false.
+ * @member {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory
+ * size limit.
+ * @member {boolean} [siteConfig.detailedErrorLoggingEnabled] true
+ * if detailed error logging is enabled; otherwise, false.
+ * @member {string} [siteConfig.publishingUsername] Publishing user name.
+ * @member {array} [siteConfig.appSettings] Application settings.
+ * @member {array} [siteConfig.connectionStrings] Connection strings.
+ * @member {object} [siteConfig.machineKey] Site MachineKey.
+ * @member {string} [siteConfig.machineKey.validation] MachineKey validation.
+ * @member {string} [siteConfig.machineKey.validationKey] Validation key.
+ * @member {string} [siteConfig.machineKey.decryption] Algorithm used for
+ * decryption.
+ * @member {string} [siteConfig.machineKey.decryptionKey] Decryption key.
+ * @member {array} [siteConfig.handlerMappings] Handler mappings.
+ * @member {string} [siteConfig.documentRoot] Document root.
+ * @member {string} [siteConfig.scmType] SCM type. Possible values include:
+ * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [siteConfig.use32BitWorkerProcess] true to
+ * use 32-bit worker process; otherwise, false.
+ * @member {boolean} [siteConfig.webSocketsEnabled] true if
+ * WebSocket is enabled; otherwise, false.
+ * @member {boolean} [siteConfig.alwaysOn] true if Always On is
+ * enabled; otherwise, false.
+ * @member {string} [siteConfig.javaVersion] Java version.
+ * @member {string} [siteConfig.javaContainer] Java container.
+ * @member {string} [siteConfig.javaContainerVersion] Java container version.
+ * @member {string} [siteConfig.appCommandLine] App command line to launch.
+ * @member {string} [siteConfig.managedPipelineMode] Managed pipeline mode.
+ * Possible values include: 'Integrated', 'Classic'
+ * @member {array} [siteConfig.virtualApplications] Virtual applications.
+ * @member {string} [siteConfig.loadBalancing] Site load balancing. Possible
+ * values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [siteConfig.experiments] This is work around for polymophic
+ * types.
+ * @member {array} [siteConfig.experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [siteConfig.limits] Site limits.
+ * @member {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU
+ * usage percentage.
+ * @member {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory
+ * usage in MB.
+ * @member {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk
+ * size usage in MB.
+ * @member {boolean} [siteConfig.autoHealEnabled] true if Auto
+ * Heal is enabled; otherwise, false.
+ * @member {object} [siteConfig.autoHealRules] Auto Heal rules.
+ * @member {object} [siteConfig.autoHealRules.triggers] Conditions that
+ * describe when to execute the auto-heal actions.
+ * @member {object} [siteConfig.autoHealRules.triggers.requests] A rule based
+ * on total requests.
+ * @member {number} [siteConfig.autoHealRules.triggers.requests.count] Request
+ * Count.
+ * @member {string} [siteConfig.autoHealRules.triggers.requests.timeInterval]
+ * Time interval.
+ * @member {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A rule
+ * based on private bytes.
+ * @member {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule based
+ * on status codes.
+ * @member {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule
+ * based on request execution time.
+ * @member {string} [siteConfig.autoHealRules.triggers.slowRequests.timeTaken]
+ * Time taken.
+ * @member {number} [siteConfig.autoHealRules.triggers.slowRequests.count]
+ * Request Count.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time interval.
+ * @member {object} [siteConfig.autoHealRules.actions] Actions to be executed
+ * when a rule is triggered.
+ * @member {string} [siteConfig.autoHealRules.actions.actionType] Predefined
+ * action to be taken. Possible values include: 'Recycle', 'LogEvent',
+ * 'CustomAction'
+ * @member {object} [siteConfig.autoHealRules.actions.customAction] Custom
+ * action to be taken.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.exe]
+ * Executable to be run.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.parameters]
+ * Parameters for the executable.
+ * @member {string} [siteConfig.autoHealRules.actions.minProcessExecutionTime]
+ * Minimum time the process must execute
+ * before taking the action
+ * @member {string} [siteConfig.tracingOptions] Tracing options.
+ * @member {string} [siteConfig.vnetName] Virtual Network name.
+ * @member {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS)
+ * settings.
+ * @member {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of
+ * origins that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [siteConfig.push] Push endpoint settings.
+ * @member {boolean} [siteConfig.push.isPushEnabled] Gets or sets a flag
+ * indicating whether the Push endpoint is enabled.
+ * @member {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON
+ * string containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON
+ * string containing a list of tags that require user authentication to be used
+ * in the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON
+ * string containing a list of dynamic tags that will be evaluated from user
+ * claims in the push registration endpoint.
+ * @member {object} [siteConfig.apiDefinition] Information about the formal API
+ * definition for the app.
+ * @member {string} [siteConfig.apiDefinition.url] The URL of the API
+ * definition.
+ * @member {string} [siteConfig.autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [siteConfig.localMySqlEnabled] true to enable
+ * local MySQL; otherwise, false.
+ * @member {array} [siteConfig.ipSecurityRestrictions] IP security
+ * restrictions.
+ * @member {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a web
+ * site to allow clients to connect over http2.0
+ * @member {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the
+ * minimum version of TLS required for SSL requests. Possible values include:
+ * '1.0', '1.1', '1.2'
+ * @member {array} [trafficManagerHostNames] Azure Traffic Manager hostnames
+ * associated with the app. Read-only.
+ * @member {boolean} [scmSiteAlsoStopped] true to stop SCM (KUDU)
+ * site when the app is stopped; otherwise, false. The default is
+ * false. Default value: false .
+ * @member {string} [targetSwapSlot] Specifies which deployment slot this app
+ * will swap into. Read-only.
+ * @member {object} [hostingEnvironmentProfile] App Service Environment to use
+ * for the app.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {boolean} [clientAffinityEnabled] true to enable client
+ * affinity; false to stop sending session affinity cookies, which
+ * route client requests in the same session to the same instance. Default is
+ * true.
+ * @member {boolean} [clientCertEnabled] true to enable client
+ * certificate authentication (TLS mutual authentication); otherwise,
+ * false. Default is false.
+ * @member {boolean} [hostNamesDisabled] true to disable the
+ * public hostnames of the app; otherwise, false.
+ * If true, the app is only accessible via API management process.
+ * @member {string} [outboundIpAddresses] List of IP addresses that the app
+ * uses for outbound connections (e.g. database access). Includes VIPs from
+ * tenants that site can be hosted with current settings. Read-only.
+ * @member {string} [possibleOutboundIpAddresses] List of IP addresses that the
+ * app uses for outbound connections (e.g. database access). Includes VIPs from
+ * all tenants. Read-only.
+ * @member {number} [containerSize] Size of the function container.
+ * @member {number} [dailyMemoryTimeQuota] Maximum allowed daily memory-time
+ * quota (applicable on dynamic apps only).
+ * @member {date} [suspendedTill] App suspended till in case memory-time quota
+ * is exceeded.
+ * @member {number} [maxNumberOfWorkers] Maximum number of workers.
+ * This only applies to Functions container.
+ * @member {object} [cloningInfo] If specified during app creation, the app is
+ * cloned from a source app.
+ * @member {uuid} [cloningInfo.correlationId] Correlation ID of cloning
+ * operation. This ID ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [cloningInfo.overwrite] true to overwrite
+ * destination app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneCustomHostNames] true to
+ * clone custom hostnames from source app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneSourceControl] true to
+ * clone source control from source app; otherwise, false.
+ * @member {string} [cloningInfo.sourceWebAppId] ARM resource ID of the source
+ * app. App resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [cloningInfo.hostingEnvironment] App Service Environment.
+ * @member {object} [cloningInfo.appSettingsOverrides] Application setting
+ * overrides for cloned app. If specified, these settings override the settings
+ * cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [cloningInfo.configureLoadBalancing] true to
+ * configure load balancing for source and destination app.
+ * @member {string} [cloningInfo.trafficManagerProfileId] ARM resource ID of
+ * the Traffic Manager profile to use, if it exists. Traffic Manager resource
+ * ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [cloningInfo.trafficManagerProfileName] Name of Traffic
+ * Manager profile to create. This is only needed if Traffic Manager profile
+ * does not already exist.
+ * @member {boolean} [cloningInfo.ignoreQuotas] true if quotas
+ * should be ignored; otherwise, false.
+ * @member {object} [snapshotInfo] If specified during app creation, the app is
+ * created from a previous snapshot.
+ * @member {string} [snapshotInfo.snapshotTime] Point in time in which the app
+ * recovery should be attempted, formatted as a DateTime string.
+ * @member {object} [snapshotInfo.recoveryTarget] Specifies the web app that
+ * snapshot contents will be written to.
+ * @member {string} [snapshotInfo.recoveryTarget.location] Geographical
+ * location of the target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [snapshotInfo.recoveryTarget.id] ARM resource ID of the
+ * target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} [snapshotInfo.overwrite] If true the recovery
+ * operation can overwrite source app; otherwise, false.
+ * @member {boolean} [snapshotInfo.recoverConfiguration] If true, site
+ * configuration, in addition to content, will be reverted.
+ * @member {boolean} [snapshotInfo.ignoreConflictingHostNames] If true, custom
+ * hostname conflicts will be ignored when recovering to a target web app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ * @member {string} [resourceGroup] Name of the resource group the app belongs
+ * to. Read-only.
+ * @member {boolean} [isDefaultContainer] true if the app is a
+ * default container; otherwise, false.
+ * @member {string} [defaultHostName] Default hostname of the app. Read-only.
+ * @member {object} [slotSwapStatus] Status of the last deployment slot swap
+ * operation.
+ * @member {date} [slotSwapStatus.timestampUtc] The time the last successful
+ * slot swap completed.
+ * @member {string} [slotSwapStatus.sourceSlotName] The source slot of the last
+ * swap operation.
+ * @member {string} [slotSwapStatus.destinationSlotName] The destination slot
+ * of the last swap operation.
+ * @member {boolean} [httpsOnly] HttpsOnly: configures a web site to accept
+ * only https requests. Issues redirect for
+ * http requests
+ * @member {object} [identity]
+ * @member {string} [identity.type] Type of managed service identity. Possible
+ * values include: 'SystemAssigned'
+ * @member {string} [identity.tenantId] Tenant of managed service identity.
+ * @member {string} [identity.principalId] Principal Id of managed service
+ * identity.
+ */
+export interface Site extends Resource {
+ readonly state?: string;
+ readonly hostNames?: string[];
+ readonly repositorySiteName?: string;
+ readonly usageState?: string;
+ enabled?: boolean;
+ readonly enabledHostNames?: string[];
+ readonly availabilityState?: string;
+ hostNameSslStates?: HostNameSslState[];
+ serverFarmId?: string;
+ reserved?: boolean;
+ readonly lastModifiedTimeUtc?: Date;
+ siteConfig?: SiteConfig;
+ readonly trafficManagerHostNames?: string[];
+ scmSiteAlsoStopped?: boolean;
+ readonly targetSwapSlot?: string;
+ hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ clientAffinityEnabled?: boolean;
+ clientCertEnabled?: boolean;
+ hostNamesDisabled?: boolean;
+ readonly outboundIpAddresses?: string;
+ readonly possibleOutboundIpAddresses?: string;
+ containerSize?: number;
+ dailyMemoryTimeQuota?: number;
+ readonly suspendedTill?: Date;
+ readonly maxNumberOfWorkers?: number;
+ cloningInfo?: CloningInfo;
+ snapshotInfo?: SnapshotRecoveryRequest;
+ readonly resourceGroup?: string;
+ readonly isDefaultContainer?: boolean;
+ readonly defaultHostName?: string;
+ readonly slotSwapStatus?: SlotSwapStatus;
+ httpsOnly?: boolean;
+ identity?: ManagedServiceIdentity;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Capability class.
+ * @constructor
+ * Describes the capabilities/features allowed for a specific SKU.
+ *
+ * @member {string} [name] Name of the SKU capability.
+ * @member {string} [value] Value of the SKU capability.
+ * @member {string} [reason] Reason of the SKU capability.
+ */
+export interface Capability {
+ name?: string;
+ value?: string;
+ reason?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SkuCapacity class.
+ * @constructor
+ * Description of the App Service plan scale options.
+ *
+ * @member {number} [minimum] Minimum number of workers for this App Service
+ * plan SKU.
+ * @member {number} [maximum] Maximum number of workers for this App Service
+ * plan SKU.
+ * @member {number} [default] Default number of workers for this App Service
+ * plan SKU.
+ * @member {string} [scaleType] Available scale configurations for an App
+ * Service plan.
+ */
+export interface SkuCapacity {
+ minimum?: number;
+ maximum?: number;
+ default?: number;
+ scaleType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SkuDescription class.
+ * @constructor
+ * Description of a SKU for a scalable resource.
+ *
+ * @member {string} [name] Name of the resource SKU.
+ * @member {string} [tier] Service tier of the resource SKU.
+ * @member {string} [size] Size specifier of the resource SKU.
+ * @member {string} [family] Family code of the resource SKU.
+ * @member {number} [capacity] Current number of instances assigned to the
+ * resource.
+ * @member {object} [skuCapacity] Min, max, and default scale values of the
+ * SKU.
+ * @member {number} [skuCapacity.minimum] Minimum number of workers for this
+ * App Service plan SKU.
+ * @member {number} [skuCapacity.maximum] Maximum number of workers for this
+ * App Service plan SKU.
+ * @member {number} [skuCapacity.default] Default number of workers for this
+ * App Service plan SKU.
+ * @member {string} [skuCapacity.scaleType] Available scale configurations for
+ * an App Service plan.
+ * @member {array} [locations] Locations of the SKU.
+ * @member {array} [capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+export interface SkuDescription {
+ name?: string;
+ tier?: string;
+ size?: string;
+ family?: string;
+ capacity?: number;
+ skuCapacity?: SkuCapacity;
+ locations?: string[];
+ capabilities?: Capability[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServicePlan class.
+ * @constructor
+ * App Service plan.
+ *
+ * @member {string} appServicePlanName Name for the App Service plan.
+ * @member {string} [workerTierName] Target worker tier assigned to the App
+ * Service plan.
+ * @member {string} [status] App Service plan status. Possible values include:
+ * 'Ready', 'Pending', 'Creating'
+ * @member {string} [subscription] App Service plan subscription.
+ * @member {string} [adminSiteName] App Service plan administration site.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the App Service plan.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {number} [maximumNumberOfWorkers] Maximum number of instances that
+ * can be assigned to this App Service plan.
+ * @member {string} [geoRegion] Geographical location for the App Service plan.
+ * @member {boolean} [perSiteScaling] If true, apps assigned to
+ * this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan. Default value: false .
+ * @member {number} [numberOfSites] Number of apps assigned to this App Service
+ * plan.
+ * @member {boolean} [isSpot] If true, this App Service Plan owns
+ * spot instances.
+ * @member {date} [spotExpirationTime] The time when the server farm expires.
+ * Valid only if it is a spot server farm.
+ * @member {string} [resourceGroup] Resource group of the App Service plan.
+ * @member {boolean} [reserved] If Linux app service plan true,
+ * false otherwise. Default value: false .
+ * @member {number} [targetWorkerCount] Scaling worker count.
+ * @member {number} [targetWorkerSizeId] Scaling worker size ID.
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {object} [sku]
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to the
+ * resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of the
+ * SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale configurations
+ * for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+export interface AppServicePlan extends Resource {
+ appServicePlanName: string;
+ workerTierName?: string;
+ readonly status?: string;
+ readonly subscription?: string;
+ adminSiteName?: string;
+ hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ readonly maximumNumberOfWorkers?: number;
+ readonly geoRegion?: string;
+ perSiteScaling?: boolean;
+ readonly numberOfSites?: number;
+ isSpot?: boolean;
+ spotExpirationTime?: Date;
+ readonly resourceGroup?: string;
+ reserved?: boolean;
+ targetWorkerCount?: number;
+ targetWorkerSizeId?: number;
+ readonly provisioningState?: string;
+ sku?: SkuDescription;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the NameIdentifier class.
+ * @constructor
+ * Identifies an object.
+ *
+ * @member {string} [name] Name of the object.
+ */
+export interface NameIdentifier {
+ name?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MetricAvailability class.
+ * @constructor
+ * Retention policy of a resource metric.
+ *
+ * @member {string} [timeGrain]
+ * @member {string} [blobDuration]
+ */
+export interface MetricAvailability {
+ timeGrain?: string;
+ blobDuration?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Dimension class.
+ * @constructor
+ * Dimension of a resource metric. For e.g. instance specific HTTP requests for
+ * a web app,
+ * where instance name is dimension of the metric HTTP request
+ *
+ * @member {string} [name]
+ * @member {string} [displayName]
+ * @member {string} [internalName]
+ * @member {boolean} [toBeExportedForShoebox]
+ */
+export interface Dimension {
+ name?: string;
+ displayName?: string;
+ internalName?: string;
+ toBeExportedForShoebox?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MetricSpecification class.
+ * @constructor
+ * Definition of a single resource metric.
+ *
+ * @member {string} [name]
+ * @member {string} [displayName]
+ * @member {string} [displayDescription]
+ * @member {string} [unit]
+ * @member {string} [aggregationType]
+ * @member {boolean} [supportsInstanceLevelAggregation]
+ * @member {boolean} [enableRegionalMdmAccount]
+ * @member {string} [sourceMdmAccount]
+ * @member {string} [sourceMdmNamespace]
+ * @member {string} [metricFilterPattern]
+ * @member {boolean} [fillGapWithZero]
+ * @member {boolean} [isInternal]
+ * @member {array} [dimensions]
+ * @member {string} [category]
+ * @member {array} [availabilities]
+ */
+export interface MetricSpecification {
+ name?: string;
+ displayName?: string;
+ displayDescription?: string;
+ unit?: string;
+ aggregationType?: string;
+ supportsInstanceLevelAggregation?: boolean;
+ enableRegionalMdmAccount?: boolean;
+ sourceMdmAccount?: string;
+ sourceMdmNamespace?: string;
+ metricFilterPattern?: string;
+ fillGapWithZero?: boolean;
+ isInternal?: boolean;
+ dimensions?: Dimension[];
+ category?: string;
+ availabilities?: MetricAvailability[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ServiceSpecification class.
+ * @constructor
+ * Resource metrics service provided by Microsoft.Insights resource provider.
+ *
+ * @member {array} [metricSpecifications]
+ */
+export interface ServiceSpecification {
+ metricSpecifications?: MetricSpecification[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmOperationDescriptionProperties class.
+ * @constructor
+ * Properties available for a Microsoft.Web resource provider operation.
+ *
+ * @member {object} [serviceSpecification]
+ * @member {array} [serviceSpecification.metricSpecifications]
+ */
+export interface CsmOperationDescriptionProperties {
+ serviceSpecification?: ServiceSpecification;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmOperationDisplay class.
+ * @constructor
+ * Meta data about operation used for display in portal.
+ *
+ * @member {string} [provider]
+ * @member {string} [resource]
+ * @member {string} [operation]
+ * @member {string} [description]
+ */
+export interface CsmOperationDisplay {
+ provider?: string;
+ resource?: string;
+ operation?: string;
+ description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmOperationDescription class.
+ * @constructor
+ * Description of an operation available for Microsoft.Web resource provider.
+ *
+ * @member {string} [name]
+ * @member {object} [display]
+ * @member {string} [display.provider]
+ * @member {string} [display.resource]
+ * @member {string} [display.operation]
+ * @member {string} [display.description]
+ * @member {string} [origin]
+ * @member {object} [properties]
+ * @member {object} [properties.serviceSpecification]
+ * @member {array} [properties.serviceSpecification.metricSpecifications]
+ */
+export interface CsmOperationDescription {
+ name?: string;
+ display?: CsmOperationDisplay;
+ origin?: string;
+ properties?: CsmOperationDescriptionProperties;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Address class.
+ * @constructor
+ * Address information for domain registration.
+ *
+ * @member {string} address1 First line of an Address.
+ * @member {string} [address2] The second line of the Address. Optional.
+ * @member {string} city The city for the address.
+ * @member {string} country The country for the address.
+ * @member {string} postalCode The postal code for the address.
+ * @member {string} state The state or province for the address.
+ */
+export interface Address {
+ address1: string;
+ address2?: string;
+ city: string;
+ country: string;
+ postalCode: string;
+ state: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Contact class.
+ * @constructor
+ * Contact information for domain registration. If 'Domain Privacy' option is
+ * not selected then the contact information is made publicly available through
+ * the Whois
+ * directories as per ICANN requirements.
+ *
+ * @member {object} [addressMailing] Mailing address.
+ * @member {string} [addressMailing.address1] First line of an Address.
+ * @member {string} [addressMailing.address2] The second line of the Address.
+ * Optional.
+ * @member {string} [addressMailing.city] The city for the address.
+ * @member {string} [addressMailing.country] The country for the address.
+ * @member {string} [addressMailing.postalCode] The postal code for the
+ * address.
+ * @member {string} [addressMailing.state] The state or province for the
+ * address.
+ * @member {string} email Email address.
+ * @member {string} [fax] Fax number.
+ * @member {string} [jobTitle] Job title.
+ * @member {string} nameFirst First name.
+ * @member {string} nameLast Last name.
+ * @member {string} [nameMiddle] Middle name.
+ * @member {string} [organization] Organization contact belongs to.
+ * @member {string} phone Phone number.
+ */
+export interface Contact {
+ addressMailing?: Address;
+ email: string;
+ fax?: string;
+ jobTitle?: string;
+ nameFirst: string;
+ nameLast: string;
+ nameMiddle?: string;
+ organization?: string;
+ phone: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostName class.
+ * @constructor
+ * Details of a hostname derived from a domain.
+ *
+ * @member {string} [name] Name of the hostname.
+ * @member {array} [siteNames] List of apps the hostname is assigned to. This
+ * list will have more than one app only if the hostname is pointing to a
+ * Traffic Manager.
+ * @member {string} [azureResourceName] Name of the Azure resource the hostname
+ * is assigned to. If it is assigned to a Traffic Manager then it will be the
+ * Traffic Manager name otherwise it will be the app name.
+ * @member {string} [azureResourceType] Type of the Azure resource the hostname
+ * is assigned to. Possible values include: 'Website', 'TrafficManager'
+ * @member {string} [customHostNameDnsRecordType] Type of the DNS record.
+ * Possible values include: 'CName', 'A'
+ * @member {string} [hostNameType] Type of the hostname. Possible values
+ * include: 'Verified', 'Managed'
+ */
+export interface HostName {
+ name?: string;
+ siteNames?: string[];
+ azureResourceName?: string;
+ azureResourceType?: string;
+ customHostNameDnsRecordType?: string;
+ hostNameType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainPurchaseConsent class.
+ * @constructor
+ * Domain purchase consent object, representing acceptance of applicable legal
+ * agreements.
+ *
+ * @member {array} [agreementKeys] List of applicable legal agreement keys.
+ * This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [agreedBy] Client IP address.
+ * @member {date} [agreedAt] Timestamp when the agreements were accepted.
+ */
+export interface DomainPurchaseConsent {
+ agreementKeys?: string[];
+ agreedBy?: string;
+ agreedAt?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Domain class.
+ * @constructor
+ * Information about a domain.
+ *
+ * @member {object} contactAdmin Administrative contact.
+ * @member {object} [contactAdmin.addressMailing] Mailing address.
+ * @member {string} [contactAdmin.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactAdmin.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactAdmin.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactAdmin.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactAdmin.email] Email address.
+ * @member {string} [contactAdmin.fax] Fax number.
+ * @member {string} [contactAdmin.jobTitle] Job title.
+ * @member {string} [contactAdmin.nameFirst] First name.
+ * @member {string} [contactAdmin.nameLast] Last name.
+ * @member {string} [contactAdmin.nameMiddle] Middle name.
+ * @member {string} [contactAdmin.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactAdmin.phone] Phone number.
+ * @member {object} contactBilling Billing contact.
+ * @member {object} [contactBilling.addressMailing] Mailing address.
+ * @member {string} [contactBilling.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactBilling.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactBilling.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactBilling.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactBilling.email] Email address.
+ * @member {string} [contactBilling.fax] Fax number.
+ * @member {string} [contactBilling.jobTitle] Job title.
+ * @member {string} [contactBilling.nameFirst] First name.
+ * @member {string} [contactBilling.nameLast] Last name.
+ * @member {string} [contactBilling.nameMiddle] Middle name.
+ * @member {string} [contactBilling.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactBilling.phone] Phone number.
+ * @member {object} contactRegistrant Registrant contact.
+ * @member {object} [contactRegistrant.addressMailing] Mailing address.
+ * @member {string} [contactRegistrant.addressMailing.address1] First line of
+ * an Address.
+ * @member {string} [contactRegistrant.addressMailing.address2] The second line
+ * of the Address. Optional.
+ * @member {string} [contactRegistrant.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactRegistrant.addressMailing.country] The country for
+ * the address.
+ * @member {string} [contactRegistrant.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactRegistrant.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactRegistrant.email] Email address.
+ * @member {string} [contactRegistrant.fax] Fax number.
+ * @member {string} [contactRegistrant.jobTitle] Job title.
+ * @member {string} [contactRegistrant.nameFirst] First name.
+ * @member {string} [contactRegistrant.nameLast] Last name.
+ * @member {string} [contactRegistrant.nameMiddle] Middle name.
+ * @member {string} [contactRegistrant.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactRegistrant.phone] Phone number.
+ * @member {object} contactTech Technical contact.
+ * @member {object} [contactTech.addressMailing] Mailing address.
+ * @member {string} [contactTech.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactTech.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactTech.addressMailing.city] The city for the address.
+ * @member {string} [contactTech.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactTech.addressMailing.postalCode] The postal code for
+ * the address.
+ * @member {string} [contactTech.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactTech.email] Email address.
+ * @member {string} [contactTech.fax] Fax number.
+ * @member {string} [contactTech.jobTitle] Job title.
+ * @member {string} [contactTech.nameFirst] First name.
+ * @member {string} [contactTech.nameLast] Last name.
+ * @member {string} [contactTech.nameMiddle] Middle name.
+ * @member {string} [contactTech.organization] Organization contact belongs to.
+ * @member {string} [contactTech.phone] Phone number.
+ * @member {string} [registrationStatus] Domain registration status. Possible
+ * values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated',
+ * 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked',
+ * 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown',
+ * 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'
+ * @member {string} [provisioningState] Domain provisioning state. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'
+ * @member {array} [nameServers] Name servers.
+ * @member {boolean} [privacy] true if domain privacy is enabled
+ * for this domain; otherwise, false.
+ * @member {date} [createdTime] Domain creation timestamp.
+ * @member {date} [expirationTime] Domain expiration timestamp.
+ * @member {date} [lastRenewedTime] Timestamp when the domain was renewed last
+ * time.
+ * @member {boolean} [autoRenew] true if the domain should be
+ * automatically renewed; otherwise, false. Default value: true .
+ * @member {boolean} [readyForDnsRecordManagement] true if Azure
+ * can assign this domain to App Service apps; otherwise, false.
+ * This value will be true if domain registration status is active
+ * and
+ * it is hosted on name servers Azure has programmatic access to.
+ * @member {array} [managedHostNames] All hostnames derived from the domain and
+ * assigned to Azure resources.
+ * @member {object} consent Legal agreement consent.
+ * @member {array} [consent.agreementKeys] List of applicable legal agreement
+ * keys. This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [consent.agreedBy] Client IP address.
+ * @member {date} [consent.agreedAt] Timestamp when the agreements were
+ * accepted.
+ * @member {array} [domainNotRenewableReasons] Reasons why domain is not
+ * renewable.
+ * @member {string} [dnsType] Current DNS type. Possible values include:
+ * 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [dnsZoneId] Azure DNS Zone to use
+ * @member {string} [targetDnsType] Target DNS type (would be used for
+ * migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [authCode]
+ */
+export interface Domain extends Resource {
+ contactAdmin: Contact;
+ contactBilling: Contact;
+ contactRegistrant: Contact;
+ contactTech: Contact;
+ readonly registrationStatus?: string;
+ readonly provisioningState?: string;
+ readonly nameServers?: string[];
+ privacy?: boolean;
+ readonly createdTime?: Date;
+ readonly expirationTime?: Date;
+ readonly lastRenewedTime?: Date;
+ autoRenew?: boolean;
+ readonly readyForDnsRecordManagement?: boolean;
+ readonly managedHostNames?: HostName[];
+ consent: DomainPurchaseConsent;
+ readonly domainNotRenewableReasons?: string[];
+ dnsType?: string;
+ dnsZoneId?: string;
+ targetDnsType?: string;
+ authCode?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainAvailablilityCheckResult class.
+ * @constructor
+ * Domain availablility check result.
+ *
+ * @member {string} [name] Name of the domain.
+ * @member {boolean} [available] true if domain can be purchased
+ * using CreateDomain API; otherwise, false.
+ * @member {string} [domainType] Valid values are Regular domain: Azure will
+ * charge the full price of domain registration, SoftDeleted: Purchasing this
+ * domain will simply restore it and this operation will not cost anything.
+ * Possible values include: 'Regular', 'SoftDeleted'
+ */
+export interface DomainAvailablilityCheckResult {
+ name?: string;
+ available?: boolean;
+ domainType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainControlCenterSsoRequest class.
+ * @constructor
+ * Single sign-on request information for domain management.
+ *
+ * @member {string} [url] URL where the single sign-on request is to be made.
+ * @member {string} [postParameterKey] Post parameter key.
+ * @member {string} [postParameterValue] Post parameter value. Client should
+ * use 'application/x-www-form-urlencoded' encoding for this value.
+ */
+export interface DomainControlCenterSsoRequest {
+ readonly url?: string;
+ readonly postParameterKey?: string;
+ readonly postParameterValue?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainOwnershipIdentifier class.
+ * @constructor
+ * Domain ownership Identifier.
+ *
+ * @member {string} [ownershipId] Ownership Id.
+ */
+export interface DomainOwnershipIdentifier extends ProxyOnlyResource {
+ ownershipId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainPatchResource class.
+ * @constructor
+ * ARM resource for a domain.
+ *
+ * @member {object} contactAdmin Administrative contact.
+ * @member {object} [contactAdmin.addressMailing] Mailing address.
+ * @member {string} [contactAdmin.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactAdmin.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactAdmin.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactAdmin.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactAdmin.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactAdmin.email] Email address.
+ * @member {string} [contactAdmin.fax] Fax number.
+ * @member {string} [contactAdmin.jobTitle] Job title.
+ * @member {string} [contactAdmin.nameFirst] First name.
+ * @member {string} [contactAdmin.nameLast] Last name.
+ * @member {string} [contactAdmin.nameMiddle] Middle name.
+ * @member {string} [contactAdmin.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactAdmin.phone] Phone number.
+ * @member {object} contactBilling Billing contact.
+ * @member {object} [contactBilling.addressMailing] Mailing address.
+ * @member {string} [contactBilling.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactBilling.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactBilling.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactBilling.addressMailing.postalCode] The postal code
+ * for the address.
+ * @member {string} [contactBilling.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactBilling.email] Email address.
+ * @member {string} [contactBilling.fax] Fax number.
+ * @member {string} [contactBilling.jobTitle] Job title.
+ * @member {string} [contactBilling.nameFirst] First name.
+ * @member {string} [contactBilling.nameLast] Last name.
+ * @member {string} [contactBilling.nameMiddle] Middle name.
+ * @member {string} [contactBilling.organization] Organization contact belongs
+ * to.
+ * @member {string} [contactBilling.phone] Phone number.
+ * @member {object} contactRegistrant Registrant contact.
+ * @member {object} [contactRegistrant.addressMailing] Mailing address.
+ * @member {string} [contactRegistrant.addressMailing.address1] First line of
+ * an Address.
+ * @member {string} [contactRegistrant.addressMailing.address2] The second line
+ * of the Address. Optional.
+ * @member {string} [contactRegistrant.addressMailing.city] The city for the
+ * address.
+ * @member {string} [contactRegistrant.addressMailing.country] The country for
+ * the address.
+ * @member {string} [contactRegistrant.addressMailing.postalCode] The postal
+ * code for the address.
+ * @member {string} [contactRegistrant.addressMailing.state] The state or
+ * province for the address.
+ * @member {string} [contactRegistrant.email] Email address.
+ * @member {string} [contactRegistrant.fax] Fax number.
+ * @member {string} [contactRegistrant.jobTitle] Job title.
+ * @member {string} [contactRegistrant.nameFirst] First name.
+ * @member {string} [contactRegistrant.nameLast] Last name.
+ * @member {string} [contactRegistrant.nameMiddle] Middle name.
+ * @member {string} [contactRegistrant.organization] Organization contact
+ * belongs to.
+ * @member {string} [contactRegistrant.phone] Phone number.
+ * @member {object} contactTech Technical contact.
+ * @member {object} [contactTech.addressMailing] Mailing address.
+ * @member {string} [contactTech.addressMailing.address1] First line of an
+ * Address.
+ * @member {string} [contactTech.addressMailing.address2] The second line of
+ * the Address. Optional.
+ * @member {string} [contactTech.addressMailing.city] The city for the address.
+ * @member {string} [contactTech.addressMailing.country] The country for the
+ * address.
+ * @member {string} [contactTech.addressMailing.postalCode] The postal code for
+ * the address.
+ * @member {string} [contactTech.addressMailing.state] The state or province
+ * for the address.
+ * @member {string} [contactTech.email] Email address.
+ * @member {string} [contactTech.fax] Fax number.
+ * @member {string} [contactTech.jobTitle] Job title.
+ * @member {string} [contactTech.nameFirst] First name.
+ * @member {string} [contactTech.nameLast] Last name.
+ * @member {string} [contactTech.nameMiddle] Middle name.
+ * @member {string} [contactTech.organization] Organization contact belongs to.
+ * @member {string} [contactTech.phone] Phone number.
+ * @member {string} [registrationStatus] Domain registration status. Possible
+ * values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated',
+ * 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked',
+ * 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown',
+ * 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'
+ * @member {string} [provisioningState] Domain provisioning state. Possible
+ * values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'
+ * @member {array} [nameServers] Name servers.
+ * @member {boolean} [privacy] true if domain privacy is enabled
+ * for this domain; otherwise, false.
+ * @member {date} [createdTime] Domain creation timestamp.
+ * @member {date} [expirationTime] Domain expiration timestamp.
+ * @member {date} [lastRenewedTime] Timestamp when the domain was renewed last
+ * time.
+ * @member {boolean} [autoRenew] true if the domain should be
+ * automatically renewed; otherwise, false. Default value: true .
+ * @member {boolean} [readyForDnsRecordManagement] true if Azure
+ * can assign this domain to App Service apps; otherwise, false.
+ * This value will be true if domain registration status is active
+ * and
+ * it is hosted on name servers Azure has programmatic access to.
+ * @member {array} [managedHostNames] All hostnames derived from the domain and
+ * assigned to Azure resources.
+ * @member {object} consent Legal agreement consent.
+ * @member {array} [consent.agreementKeys] List of applicable legal agreement
+ * keys. This list can be retrieved using ListLegalAgreements API under
+ * TopLevelDomain resource.
+ * @member {string} [consent.agreedBy] Client IP address.
+ * @member {date} [consent.agreedAt] Timestamp when the agreements were
+ * accepted.
+ * @member {array} [domainNotRenewableReasons] Reasons why domain is not
+ * renewable.
+ * @member {string} [dnsType] Current DNS type. Possible values include:
+ * 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [dnsZoneId] Azure DNS Zone to use
+ * @member {string} [targetDnsType] Target DNS type (would be used for
+ * migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'
+ * @member {string} [authCode]
+ */
+export interface DomainPatchResource extends ProxyOnlyResource {
+ contactAdmin: Contact;
+ contactBilling: Contact;
+ contactRegistrant: Contact;
+ contactTech: Contact;
+ readonly registrationStatus?: string;
+ readonly provisioningState?: string;
+ readonly nameServers?: string[];
+ privacy?: boolean;
+ readonly createdTime?: Date;
+ readonly expirationTime?: Date;
+ readonly lastRenewedTime?: Date;
+ autoRenew?: boolean;
+ readonly readyForDnsRecordManagement?: boolean;
+ readonly managedHostNames?: HostName[];
+ consent: DomainPurchaseConsent;
+ readonly domainNotRenewableReasons?: string[];
+ dnsType?: string;
+ dnsZoneId?: string;
+ targetDnsType?: string;
+ authCode?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainRecommendationSearchParameters class.
+ * @constructor
+ * Domain recommendation search parameters.
+ *
+ * @member {string} [keywords] Keywords to be used for generating domain
+ * recommendations.
+ * @member {number} [maxDomainRecommendations] Maximum number of
+ * recommendations.
+ */
+export interface DomainRecommendationSearchParameters {
+ keywords?: string;
+ maxDomainRecommendations?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ErrorResponse class.
+ * @constructor
+ * Error Response.
+ *
+ * @member {string} [code] Error code.
+ * @member {string} [message] Error message indicating why the operation
+ * failed.
+ */
+export interface ErrorResponse {
+ code?: string;
+ message?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TldLegalAgreement class.
+ * @constructor
+ * Legal agreement for a top level domain.
+ *
+ * @member {string} agreementKey Unique identifier for the agreement.
+ * @member {string} title Agreement title.
+ * @member {string} content Agreement details.
+ * @member {string} [url] URL where a copy of the agreement details is hosted.
+ */
+export interface TldLegalAgreement {
+ agreementKey: string;
+ title: string;
+ content: string;
+ url?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TopLevelDomain class.
+ * @constructor
+ * A top level domain object.
+ *
+ * @member {string} [domainName] Name of the top level domain.
+ * @member {boolean} [privacy] If true, then the top level domain
+ * supports domain privacy; otherwise, false.
+ */
+export interface TopLevelDomain extends ProxyOnlyResource {
+ readonly domainName?: string;
+ privacy?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TopLevelDomainAgreementOption class.
+ * @constructor
+ * Options for retrieving the list of top level domain legal agreements.
+ *
+ * @member {boolean} [includePrivacy] If true, then the list of
+ * agreements will include agreements for domain privacy as well; otherwise,
+ * false.
+ * @member {boolean} [forTransfer] If true, then the list of
+ * agreements will include agreements for domain transfer as well; otherwise,
+ * false.
+ */
+export interface TopLevelDomainAgreementOption {
+ includePrivacy?: boolean;
+ forTransfer?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Certificate class.
+ * @constructor
+ * SSL certificate for an app.
+ *
+ * @member {string} [friendlyName] Friendly name of the certificate.
+ * @member {string} [subjectName] Subject name of the certificate.
+ * @member {array} [hostNames] Host names the certificate applies to.
+ * @member {buffer} [pfxBlob] Pfx blob.
+ * @member {string} [siteName] App name.
+ * @member {string} [selfLink] Self link.
+ * @member {string} [issuer] Certificate issuer.
+ * @member {date} [issueDate] Certificate issue Date.
+ * @member {date} [expirationDate] Certificate expriration date.
+ * @member {string} password Certificate password.
+ * @member {string} [thumbprint] Certificate thumbprint.
+ * @member {boolean} [valid] Is the certificate valid?.
+ * @member {buffer} [cerBlob] Raw bytes of .cer file
+ * @member {string} [publicKeyHash] Public key hash.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the certificate.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {string} [keyVaultId] Key Vault Csm resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [keyVaultSecretStatus] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ * @member {string} [geoRegion] Region of the certificate.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ */
+export interface Certificate extends Resource {
+ readonly friendlyName?: string;
+ readonly subjectName?: string;
+ hostNames?: string[];
+ pfxBlob?: Buffer;
+ readonly siteName?: string;
+ readonly selfLink?: string;
+ readonly issuer?: string;
+ readonly issueDate?: Date;
+ readonly expirationDate?: Date;
+ password: string;
+ readonly thumbprint?: string;
+ readonly valid?: boolean;
+ readonly cerBlob?: Buffer;
+ readonly publicKeyHash?: string;
+ readonly hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ keyVaultId?: string;
+ keyVaultSecretName?: string;
+ readonly keyVaultSecretStatus?: string;
+ readonly geoRegion?: string;
+ serverFarmId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CertificatePatchResource class.
+ * @constructor
+ * ARM resource for a certificate.
+ *
+ * @member {string} [friendlyName] Friendly name of the certificate.
+ * @member {string} [subjectName] Subject name of the certificate.
+ * @member {array} [hostNames] Host names the certificate applies to.
+ * @member {buffer} [pfxBlob] Pfx blob.
+ * @member {string} [siteName] App name.
+ * @member {string} [selfLink] Self link.
+ * @member {string} [issuer] Certificate issuer.
+ * @member {date} [issueDate] Certificate issue Date.
+ * @member {date} [expirationDate] Certificate expriration date.
+ * @member {string} password Certificate password.
+ * @member {string} [thumbprint] Certificate thumbprint.
+ * @member {boolean} [valid] Is the certificate valid?.
+ * @member {buffer} [cerBlob] Raw bytes of .cer file
+ * @member {string} [publicKeyHash] Public key hash.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the certificate.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {string} [keyVaultId] Key Vault Csm resource Id.
+ * @member {string} [keyVaultSecretName] Key Vault secret name.
+ * @member {string} [keyVaultSecretStatus] Status of the Key Vault secret.
+ * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
+ * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
+ * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
+ * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
+ * 'Unknown'
+ * @member {string} [geoRegion] Region of the certificate.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ */
+export interface CertificatePatchResource extends ProxyOnlyResource {
+ readonly friendlyName?: string;
+ readonly subjectName?: string;
+ hostNames?: string[];
+ pfxBlob?: Buffer;
+ readonly siteName?: string;
+ readonly selfLink?: string;
+ readonly issuer?: string;
+ readonly issueDate?: Date;
+ readonly expirationDate?: Date;
+ password: string;
+ readonly thumbprint?: string;
+ readonly valid?: boolean;
+ readonly cerBlob?: Buffer;
+ readonly publicKeyHash?: string;
+ readonly hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ keyVaultId?: string;
+ keyVaultSecretName?: string;
+ readonly keyVaultSecretStatus?: string;
+ readonly geoRegion?: string;
+ serverFarmId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VirtualNetworkProfile class.
+ * @constructor
+ * Specification for using a Virtual Network.
+ *
+ * @member {string} [id] Resource id of the Virtual Network.
+ * @member {string} [name] Name of the Virtual Network (read-only).
+ * @member {string} [type] Resource type of the Virtual Network (read-only).
+ * @member {string} [subnet] Subnet within the Virtual Network.
+ */
+export interface VirtualNetworkProfile {
+ id?: string;
+ readonly name?: string;
+ readonly type?: string;
+ subnet?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WorkerPool class.
+ * @constructor
+ * Worker pool of an App Service Environment.
+ *
+ * @member {number} [workerSizeId] Worker size ID for referencing this worker
+ * pool.
+ * @member {string} [computeMode] Shared or dedicated app hosting. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] VM size of the worker pool instances.
+ * @member {number} [workerCount] Number of instances in the worker pool.
+ * @member {array} [instanceNames] Names of all instances in the worker pool
+ * (read only).
+ */
+export interface WorkerPool {
+ workerSizeId?: number;
+ computeMode?: string;
+ workerSize?: string;
+ workerCount?: number;
+ readonly instanceNames?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VirtualIPMapping class.
+ * @constructor
+ * Virtual IP mapping.
+ *
+ * @member {string} [virtualIP] Virtual IP address.
+ * @member {number} [internalHttpPort] Internal HTTP port.
+ * @member {number} [internalHttpsPort] Internal HTTPS port.
+ * @member {boolean} [inUse] Is virtual IP mapping in use.
+ */
+export interface VirtualIPMapping {
+ virtualIP?: string;
+ internalHttpPort?: number;
+ internalHttpsPort?: number;
+ inUse?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StampCapacity class.
+ * @constructor
+ * Stamp capacity information.
+ *
+ * @member {string} [name] Name of the stamp.
+ * @member {number} [availableCapacity] Available capacity (# of machines,
+ * bytes of storage etc...).
+ * @member {number} [totalCapacity] Total capacity (# of machines, bytes of
+ * storage etc...).
+ * @member {string} [unit] Name of the unit.
+ * @member {string} [computeMode] Shared/dedicated workers. Possible values
+ * include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] Size of the machines. Possible values include:
+ * 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3'
+ * @member {number} [workerSizeId] Size ID of machines:
+ * 0 - Small
+ * 1 - Medium
+ * 2 - Large
+ * @member {boolean} [excludeFromCapacityAllocation] If true, it
+ * includes basic apps.
+ * Basic apps are not used for capacity allocation.
+ * @member {boolean} [isApplicableForAllComputeModes] true if
+ * capacity is applicable for all apps; otherwise, false.
+ * @member {string} [siteMode] Shared or Dedicated.
+ */
+export interface StampCapacity {
+ name?: string;
+ availableCapacity?: number;
+ totalCapacity?: number;
+ unit?: string;
+ computeMode?: string;
+ workerSize?: string;
+ workerSizeId?: number;
+ excludeFromCapacityAllocation?: boolean;
+ isApplicableForAllComputeModes?: boolean;
+ siteMode?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the NetworkAccessControlEntry class.
+ * @constructor
+ * Network access control entry.
+ *
+ * @member {string} [action] Action object. Possible values include: 'Permit',
+ * 'Deny'
+ * @member {string} [description] Description of network access control entry.
+ * @member {number} [order] Order of precedence.
+ * @member {string} [remoteSubnet] Remote subnet.
+ */
+export interface NetworkAccessControlEntry {
+ action?: string;
+ description?: string;
+ order?: number;
+ remoteSubnet?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceEnvironment class.
+ * @constructor
+ * Description of an App Service Environment.
+ *
+ * @member {string} name Name of the App Service Environment.
+ * @member {string} location Location of the App Service Environment, e.g.
+ * "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App Service
+ * Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved for
+ * the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for the
+ * App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action on
+ * the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the App
+ * Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results of
+ * the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account associated
+ * with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment can
+ * be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended e.g.
+ * when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the behavior
+ * of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to whitelist
+ * on ASE db
+ */
+export interface AppServiceEnvironment {
+ name: string;
+ location: string;
+ readonly provisioningState?: string;
+ readonly status?: string;
+ vnetName?: string;
+ vnetResourceGroupName?: string;
+ vnetSubnetName?: string;
+ virtualNetwork: VirtualNetworkProfile;
+ internalLoadBalancingMode?: string;
+ multiSize?: string;
+ multiRoleCount?: number;
+ workerPools: WorkerPool[];
+ ipsslAddressCount?: number;
+ readonly databaseEdition?: string;
+ readonly databaseServiceObjective?: string;
+ readonly upgradeDomains?: number;
+ readonly subscriptionId?: string;
+ dnsSuffix?: string;
+ readonly lastAction?: string;
+ readonly lastActionResult?: string;
+ readonly allowedMultiSizes?: string;
+ readonly allowedWorkerSizes?: string;
+ readonly maximumNumberOfMachines?: number;
+ readonly vipMappings?: VirtualIPMapping[];
+ readonly environmentCapacities?: StampCapacity[];
+ networkAccessControlList?: NetworkAccessControlEntry[];
+ readonly environmentIsHealthy?: boolean;
+ readonly environmentStatus?: string;
+ readonly resourceGroup?: string;
+ frontEndScaleFactor?: number;
+ readonly defaultFrontEndScaleFactor?: number;
+ apiManagementAccountId?: string;
+ suspended?: boolean;
+ dynamicCacheEnabled?: boolean;
+ clusterSettings?: NameValuePair[];
+ userWhitelistedIpRanges?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the LocalizableString class.
+ * @constructor
+ * Localizable string object containing the name and a localized value.
+ *
+ * @member {string} [value] Non-localized name.
+ * @member {string} [localizedValue] Localized name.
+ */
+export interface LocalizableString {
+ value?: string;
+ localizedValue?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmUsageQuota class.
+ * @constructor
+ * Usage of the quota resource.
+ *
+ * @member {string} [unit] Units of measurement for the quota resourse.
+ * @member {date} [nextResetTime] Next reset time for the resource counter.
+ * @member {number} [currentValue] The current value of the resource counter.
+ * @member {number} [limit] The resource limit.
+ * @member {object} [name] Quota name.
+ * @member {string} [name.value] Non-localized name.
+ * @member {string} [name.localizedValue] Localized name.
+ */
+export interface CsmUsageQuota {
+ unit?: string;
+ nextResetTime?: Date;
+ currentValue?: number;
+ limit?: number;
+ name?: LocalizableString;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ErrorEntity class.
+ * @constructor
+ * Body of the error response returned from the API.
+ *
+ * @member {string} [extendedCode] Type of error.
+ * @member {string} [messageTemplate] Message template.
+ * @member {array} [parameters] Parameters for the template.
+ * @member {array} [innerErrors] Inner errors.
+ * @member {string} [code] Basic error code.
+ * @member {string} [message] Any details of the error.
+ */
+export interface ErrorEntity {
+ extendedCode?: string;
+ messageTemplate?: string;
+ parameters?: string[];
+ innerErrors?: ErrorEntity[];
+ code?: string;
+ message?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DefaultErrorResponseErrorDetailsItem class.
+ * @constructor
+ * Detailed errors.
+ *
+ * @member {string} code Standardized string to programmatically identify the
+ * error.
+ * @member {string} message Detailed error description and debugging
+ * information.
+ * @member {string} [target] Detailed error description and debugging
+ * information.
+ */
+export interface DefaultErrorResponseErrorDetailsItem {
+ readonly code: string;
+ readonly message: string;
+ readonly target?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DefaultErrorResponseError class.
+ * @constructor
+ * Error model.
+ *
+ * @member {string} code Standardized string to programmatically identify the
+ * error.
+ * @member {string} message Detailed error description and debugging
+ * information.
+ * @member {string} [target] Detailed error description and debugging
+ * information.
+ * @member {array} [details]
+ * @member {string} [innererror] More information to debug error.
+ */
+export interface DefaultErrorResponseError {
+ readonly code: string;
+ readonly message: string;
+ readonly target?: string;
+ details?: DefaultErrorResponseErrorDetailsItem[];
+ readonly innererror?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DefaultErrorResponse class.
+ * @constructor
+ * App Service error response.
+ *
+ * @member {object} [error] Error model.
+ * @member {string} [error.code] Standardized string to programmatically
+ * identify the error.
+ * @member {string} [error.message] Detailed error description and debugging
+ * information.
+ * @member {string} [error.target] Detailed error description and debugging
+ * information.
+ * @member {array} [error.details]
+ * @member {string} [error.innererror] More information to debug error.
+ */
+export interface DefaultErrorResponse {
+ readonly error?: DefaultErrorResponseError;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Operation class.
+ * @constructor
+ * An operation on a resource.
+ *
+ * @member {string} [id] Operation ID.
+ * @member {string} [name] Operation name.
+ * @member {string} [status] The current status of the operation. Possible
+ * values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'
+ * @member {array} [errors] Any errors associate with the operation.
+ * @member {date} [createdTime] Time when operation has started.
+ * @member {date} [modifiedTime] Time when operation has been updated.
+ * @member {date} [expirationTime] Time when operation will expire.
+ * @member {uuid} [geoMasterOperationId] Applicable only for stamp operation
+ * ids.
+ */
+export interface Operation {
+ id?: string;
+ name?: string;
+ status?: string;
+ errors?: ErrorEntity[];
+ createdTime?: Date;
+ modifiedTime?: Date;
+ expirationTime?: Date;
+ geoMasterOperationId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricProperty class.
+ * @constructor
+ * Resource metric property.
+ *
+ * @member {string} [key] Key for resource metric property.
+ * @member {string} [value] Value of pair.
+ */
+export interface ResourceMetricProperty {
+ key?: string;
+ value?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricValue class.
+ * @constructor
+ * Value of resource metric.
+ *
+ * @member {string} [timestamp] Value timestamp.
+ * @member {number} [average] Value average.
+ * @member {number} [minimum] Value minimum.
+ * @member {number} [maximum] Value maximum.
+ * @member {number} [total] Value total.
+ * @member {number} [count] Value count.
+ * @member {array} [properties] Resource metric properties collection.
+ */
+export interface ResourceMetricValue {
+ readonly timestamp?: string;
+ readonly average?: number;
+ readonly minimum?: number;
+ readonly maximum?: number;
+ readonly total?: number;
+ readonly count?: number;
+ readonly properties?: ResourceMetricProperty[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetric class.
+ * @constructor
+ * Object representing a metric for any resource .
+ *
+ * @member {object} [name] Name of metric.
+ * @member {string} [name.value] metric name value.
+ * @member {string} [name.localizedValue] Localized metric name value.
+ * @member {string} [unit] Metric unit.
+ * @member {string} [timeGrain] Metric granularity. E.g PT1H, PT5M, P1D
+ * @member {date} [startTime] Metric start time.
+ * @member {date} [endTime] Metric end time.
+ * @member {string} [resourceId] Metric resource Id.
+ * @member {string} [id] Resource Id.
+ * @member {array} [metricValues] Metric values.
+ * @member {array} [properties] Resource metric properties collection.
+ */
+export interface ResourceMetric {
+ readonly name?: ResourceMetricName;
+ readonly unit?: string;
+ readonly timeGrain?: string;
+ readonly startTime?: Date;
+ readonly endTime?: Date;
+ readonly resourceId?: string;
+ readonly id?: string;
+ readonly metricValues?: ResourceMetricValue[];
+ readonly properties?: ResourceMetricProperty[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DeletedSite class.
+ * @constructor
+ * A deleted app.
+ *
+ * @member {number} [id] Numeric id for the deleted site
+ * @member {string} [deletedTimestamp] Time in UTC when the app was deleted.
+ * @member {string} [subscription] Subscription containing the deleted site
+ * @member {string} [resourceGroup] ResourceGroup that contained the deleted
+ * site
+ * @member {string} [name] Name of the deleted site
+ * @member {string} [slot] Slot of the deleted site
+ */
+export interface DeletedSite {
+ id?: number;
+ readonly deletedTimestamp?: string;
+ readonly subscription?: string;
+ readonly resourceGroup?: string;
+ readonly name?: string;
+ readonly slot?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Solution class.
+ * @constructor
+ * Class Representing Solution for problems detected.
+ *
+ * @member {number} [id] Solution Id.
+ * @member {string} [displayName] Display Name of the solution
+ * @member {number} [order] Order of the solution.
+ * @member {string} [description] Description of the solution
+ * @member {string} [type] Type of Solution. Possible values include:
+ * 'QuickSolution', 'DeepInvestigation', 'BestPractices'
+ * @member {array} [data] Solution Data.
+ * @member {array} [metadata] Solution Metadata.
+ */
+export interface Solution {
+ id?: number;
+ displayName?: string;
+ order?: number;
+ description?: string;
+ type?: string;
+ data?: NameValuePair[][];
+ metadata?: NameValuePair[][];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DetectorAbnormalTimePeriod class.
+ * @constructor
+ * Class representing Abnormal Time Period detected.
+ *
+ * @member {date} [startTime] Start time of the corelated event
+ * @member {date} [endTime] End time of the corelated event
+ * @member {string} [message] Message describing the event
+ * @member {string} [source] Represents the name of the Detector
+ * @member {number} [priority] Represents the rank of the Detector
+ * @member {array} [metaData] Downtime metadata
+ * @member {string} [type] Represents the type of the Detector. Possible values
+ * include: 'ServiceIncident', 'AppDeployment', 'AppCrash',
+ * 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue',
+ * 'Other'
+ * @member {array} [solutions] List of proposed solutions
+ */
+export interface DetectorAbnormalTimePeriod {
+ startTime?: Date;
+ endTime?: Date;
+ message?: string;
+ source?: string;
+ priority?: number;
+ metaData?: NameValuePair[][];
+ type?: string;
+ solutions?: Solution[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AbnormalTimePeriod class.
+ * @constructor
+ * Class representing Abnormal Time Period identified in diagnosis
+ *
+ * @member {date} [startTime] Start time of the downtime
+ * @member {date} [endTime] End time of the downtime
+ * @member {array} [events] List of Possible Cause of downtime
+ * @member {array} [solutions] List of proposed solutions
+ */
+export interface AbnormalTimePeriod {
+ startTime?: Date;
+ endTime?: Date;
+ events?: DetectorAbnormalTimePeriod[];
+ solutions?: Solution[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DetectorDefinition class.
+ * @constructor
+ * Class representing detector definition
+ *
+ * @member {string} [displayName] Display name of the detector
+ * @member {string} [description] Description of the detector
+ * @member {number} [rank] Detector Rank
+ * @member {boolean} [isEnabled] Flag representing whether detector is enabled
+ * or not.
+ */
+export interface DetectorDefinition extends ProxyOnlyResource {
+ readonly displayName?: string;
+ readonly description?: string;
+ readonly rank?: number;
+ readonly isEnabled?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticMetricSample class.
+ * @constructor
+ * Class representing Diagnostic Metric
+ *
+ * @member {date} [timestamp] Time at which metric is measured
+ * @member {string} [roleInstance] Role Instance. Null if this counter is not
+ * per instance
+ * This is returned and should be whichever instance name we desire to be
+ * returned
+ * i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0)
+ * where RDWORKERNAME is Machine name below and RoleInstance name in
+ * parenthesis
+ * @member {number} [total] Total value of the metric. If multiple measurements
+ * are made this will have sum of all.
+ * @member {number} [maximum] Maximum of the metric sampled during the time
+ * period
+ * @member {number} [minimum] Minimum of the metric sampled during the time
+ * period
+ * @member {boolean} [isAggregated] Whether the values are aggregates across
+ * all workers or not
+ */
+export interface DiagnosticMetricSample {
+ timestamp?: Date;
+ roleInstance?: string;
+ total?: number;
+ maximum?: number;
+ minimum?: number;
+ isAggregated?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticMetricSet class.
+ * @constructor
+ * Class representing Diagnostic Metric information
+ *
+ * @member {string} [name] Name of the metric
+ * @member {string} [unit] Metric's unit
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {string} [timeGrain] Presented time grain. Supported grains at the
+ * moment are PT1M, PT1H, P1D
+ * @member {array} [values] Collection of metric values for the selected period
+ * based on the
+ * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}
+ */
+export interface DiagnosticMetricSet {
+ name?: string;
+ unit?: string;
+ startTime?: Date;
+ endTime?: Date;
+ timeGrain?: string;
+ values?: DiagnosticMetricSample[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DataSource class.
+ * @constructor
+ * Class representing data source used by the detectors
+ *
+ * @member {array} [instructions] Instrunctions if any for the data source
+ * @member {array} [dataSourceUri] Datasource Uri Links
+ */
+export interface DataSource {
+ instructions?: string[];
+ dataSourceUri?: NameValuePair[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResponseMetaData class.
+ * @constructor
+ * @member {object} [dataSource] Source of the Data
+ * @member {array} [dataSource.instructions] Instrunctions if any for the data
+ * source
+ * @member {array} [dataSource.dataSourceUri] Datasource Uri Links
+ */
+export interface ResponseMetaData {
+ dataSource?: DataSource;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AnalysisData class.
+ * @constructor
+ * Class Representing Detector Evidence used for analysis
+ *
+ * @member {string} [source] Name of the Detector
+ * @member {object} [detectorDefinition] Detector Definition
+ * @member {string} [detectorDefinition.displayName] Display name of the
+ * detector
+ * @member {string} [detectorDefinition.description] Description of the
+ * detector
+ * @member {number} [detectorDefinition.rank] Detector Rank
+ * @member {boolean} [detectorDefinition.isEnabled] Flag representing whether
+ * detector is enabled or not.
+ * @member {array} [metrics] Source Metrics
+ * @member {array} [data] Additional Source Data
+ * @member {object} [detectorMetaData] Detector Meta Data
+ * @member {object} [detectorMetaData.dataSource] Source of the Data
+ * @member {array} [detectorMetaData.dataSource.instructions] Instrunctions if
+ * any for the data source
+ * @member {array} [detectorMetaData.dataSource.dataSourceUri] Datasource Uri
+ * Links
+ */
+export interface AnalysisData {
+ source?: string;
+ detectorDefinition?: DetectorDefinition;
+ metrics?: DiagnosticMetricSet[];
+ data?: NameValuePair[][];
+ detectorMetaData?: ResponseMetaData;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AnalysisDefinition class.
+ * @constructor
+ * Definition of Analysis
+ *
+ * @member {string} [description] Description of the Analysis
+ */
+export interface AnalysisDefinition extends ProxyOnlyResource {
+ readonly description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticAnalysis class.
+ * @constructor
+ * Class representing a diagnostic analysis done on an application
+ *
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {array} [abnormalTimePeriods] List of time periods.
+ * @member {array} [payload] Data by each detector
+ * @member {array} [nonCorrelatedDetectors] Data by each detector for detectors
+ * that did not corelate
+ */
+export interface DiagnosticAnalysis extends ProxyOnlyResource {
+ startTime?: Date;
+ endTime?: Date;
+ abnormalTimePeriods?: AbnormalTimePeriod[];
+ payload?: AnalysisData[];
+ nonCorrelatedDetectors?: DetectorDefinition[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticCategory class.
+ * @constructor
+ * Class representing detector definition
+ *
+ * @member {string} [description] Description of the diagnostic category
+ */
+export interface DiagnosticCategory extends ProxyOnlyResource {
+ readonly description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticDetectorResponse class.
+ * @constructor
+ * Class representing Reponse from Diagnostic Detectors
+ *
+ * @member {date} [startTime] Start time of the period
+ * @member {date} [endTime] End time of the period
+ * @member {boolean} [issueDetected] Flag representing Issue was detected.
+ * @member {object} [detectorDefinition] Detector's definition
+ * @member {string} [detectorDefinition.displayName] Display name of the
+ * detector
+ * @member {string} [detectorDefinition.description] Description of the
+ * detector
+ * @member {number} [detectorDefinition.rank] Detector Rank
+ * @member {boolean} [detectorDefinition.isEnabled] Flag representing whether
+ * detector is enabled or not.
+ * @member {array} [metrics] Metrics provided by the detector
+ * @member {array} [abnormalTimePeriods] List of Correlated events found by the
+ * detector
+ * @member {array} [data] Additional Data that detector wants to send.
+ * @member {object} [responseMetaData] Meta Data
+ * @member {object} [responseMetaData.dataSource] Source of the Data
+ * @member {array} [responseMetaData.dataSource.instructions] Instrunctions if
+ * any for the data source
+ * @member {array} [responseMetaData.dataSource.dataSourceUri] Datasource Uri
+ * Links
+ */
+export interface DiagnosticDetectorResponse extends ProxyOnlyResource {
+ startTime?: Date;
+ endTime?: Date;
+ issueDetected?: boolean;
+ detectorDefinition?: DetectorDefinition;
+ metrics?: DiagnosticMetricSet[];
+ abnormalTimePeriods?: DetectorAbnormalTimePeriod[];
+ data?: NameValuePair[][];
+ responseMetaData?: ResponseMetaData;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StackMinorVersion class.
+ * @constructor
+ * Application stack minor version.
+ *
+ * @member {string} [displayVersion] Application stack minor version (display
+ * only).
+ * @member {string} [runtimeVersion] Application stack minor version (runtime
+ * only).
+ * @member {boolean} [isDefault] true if this is the default minor
+ * version; otherwise, false.
+ */
+export interface StackMinorVersion {
+ displayVersion?: string;
+ runtimeVersion?: string;
+ isDefault?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StackMajorVersion class.
+ * @constructor
+ * Application stack major version.
+ *
+ * @member {string} [displayVersion] Application stack major version (display
+ * only).
+ * @member {string} [runtimeVersion] Application stack major version (runtime
+ * only).
+ * @member {boolean} [isDefault] true if this is the default major
+ * version; otherwise, false.
+ * @member {array} [minorVersions] Minor versions associated with the major
+ * version.
+ */
+export interface StackMajorVersion {
+ displayVersion?: string;
+ runtimeVersion?: string;
+ isDefault?: boolean;
+ minorVersions?: StackMinorVersion[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ApplicationStack class.
+ * @constructor
+ * Application stack.
+ *
+ * @member {string} [name] Application stack name.
+ * @member {string} [display] Application stack display name.
+ * @member {string} [dependency] Application stack dependency.
+ * @member {array} [majorVersions] List of major versions available.
+ * @member {array} [frameworks] List of frameworks associated with application
+ * stack.
+ */
+export interface ApplicationStack {
+ name?: string;
+ display?: string;
+ dependency?: string;
+ majorVersions?: StackMajorVersion[];
+ frameworks?: ApplicationStack[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Recommendation class.
+ * @constructor
+ * Represents a recommendation result generated by the recommendation engine.
+ *
+ * @member {date} [creationTime] Timestamp when this instance was created.
+ * @member {uuid} [recommendationId] A GUID value that each recommendation
+ * object is associated with.
+ * @member {string} [resourceId] Full ARM resource ID string that this
+ * recommendation object is associated with.
+ * @member {string} [resourceScope] Name of a resource type this recommendation
+ * applies, e.g. Subscription, ServerFarm, Site. Possible values include:
+ * 'ServerFarm', 'Subscription', 'WebSite'
+ * @member {string} [ruleName] Unique name of the rule.
+ * @member {string} [displayName] UI friendly name of the rule (may not be
+ * unique).
+ * @member {string} [message] Recommendation text.
+ * @member {string} [level] Level indicating how critical this recommendation
+ * can impact. Possible values include: 'Critical', 'Warning', 'Information',
+ * 'NonUrgentSuggestion'
+ * @member {string} [channels] List of channels that this recommendation can
+ * apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook',
+ * 'All'
+ * @member {array} [tags] The list of category tags that this recommendation
+ * belongs to.
+ * @member {string} [actionName] Name of action recommended by this object.
+ * @member {date} [startTime] The beginning time in UTC of a range that the
+ * recommendation refers to.
+ * @member {date} [endTime] The end time in UTC of a range that the
+ * recommendation refers to.
+ * @member {date} [nextNotificationTime] When to notify this recommendation
+ * next in UTC. Null means that this will never be notified anymore.
+ * @member {date} [notificationExpirationTime] Date and time in UTC when this
+ * notification expires.
+ * @member {date} [notifiedTime] Last timestamp in UTC this instance was
+ * actually notified. Null means that this recommendation hasn't been notified
+ * yet.
+ * @member {number} [score] A metric value measured by the rule.
+ * @member {boolean} [isDynamic] True if this is associated with a dynamically
+ * added rule
+ * @member {string} [extensionName] Extension name of the portal if exists.
+ * @member {string} [bladeName] Deep link to a blade on the portal.
+ * @member {string} [forwardLink] Forward link to an external document
+ * associated with the rule.
+ */
+export interface Recommendation extends ProxyOnlyResource {
+ creationTime?: Date;
+ recommendationId?: string;
+ resourceId?: string;
+ resourceScope?: string;
+ ruleName?: string;
+ displayName?: string;
+ message?: string;
+ level?: string;
+ channels?: string;
+ tags?: string[];
+ actionName?: string;
+ startTime?: Date;
+ endTime?: Date;
+ nextNotificationTime?: Date;
+ notificationExpirationTime?: Date;
+ notifiedTime?: Date;
+ score?: number;
+ isDynamic?: boolean;
+ extensionName?: string;
+ bladeName?: string;
+ forwardLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RecommendationRule class.
+ * @constructor
+ * Represents a recommendation rule that the recommendation engine can perform.
+ *
+ * @member {string} [recommendationRuleName] Unique name of the rule.
+ * @member {string} [displayName] UI friendly name of the rule.
+ * @member {string} [message] Localized name of the rule (Good for UI).
+ * @member {uuid} [recommendationId] Recommendation ID of an associated
+ * recommendation object tied to the rule, if exists.
+ * If such an object doesn't exist, it is set to null.
+ * @member {string} [description] Localized detailed description of the rule.
+ * @member {string} [actionName] Name of action that is recommended by this
+ * rule in string.
+ * @member {string} [level] Level of impact indicating how critical this rule
+ * is. Possible values include: 'Critical', 'Warning', 'Information',
+ * 'NonUrgentSuggestion'
+ * @member {string} [channels] List of available channels that this rule
+ * applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook',
+ * 'All'
+ * @member {array} [tags] An array of category tags that the rule contains.
+ * @member {boolean} [isDynamic] True if this is associated with a dynamically
+ * added rule
+ * @member {string} [extensionName] Extension name of the portal if exists.
+ * Applicable to dynamic rule only.
+ * @member {string} [bladeName] Deep link to a blade on the portal. Applicable
+ * to dynamic rule only.
+ * @member {string} [forwardLink] Forward link to an external document
+ * associated with the rule. Applicable to dynamic rule only.
+ */
+export interface RecommendationRule extends ProxyOnlyResource {
+ recommendationRuleName?: string;
+ displayName?: string;
+ message?: string;
+ recommendationId?: string;
+ description?: string;
+ actionName?: string;
+ level?: string;
+ channels?: string;
+ tags?: string[];
+ isDynamic?: boolean;
+ extensionName?: string;
+ bladeName?: string;
+ forwardLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceHealthMetadata class.
+ * @constructor
+ * Used for getting ResourceHealthCheck settings.
+ *
+ * @member {string} [category] The category that the resource matches in the
+ * RHC Policy File
+ * @member {boolean} [signalAvailability] Is there a health signal for the
+ * resource
+ */
+export interface ResourceHealthMetadata extends ProxyOnlyResource {
+ category?: string;
+ signalAvailability?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BillingMeter class.
+ * @constructor
+ * App Service billing entity that contains information about meter which the
+ * Azure billing system utilizes to charge users for services.
+ *
+ * @member {string} [meterId] Meter GUID onboarded in Commerce
+ * @member {string} [billingLocation] Azure Location of billable resource
+ * @member {string} [shortName] Short Name from App Service Azure pricing Page
+ * @member {string} [friendlyName] Friendly name of the meter
+ * @member {string} [resourceType] App Service resource type meter used for
+ */
+export interface BillingMeter extends ProxyOnlyResource {
+ meterId?: string;
+ billingLocation?: string;
+ shortName?: string;
+ friendlyName?: string;
+ resourceType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmMoveResourceEnvelope class.
+ * @constructor
+ * Object with a list of the resources that need to be moved and the resource
+ * group they should be moved to.
+ *
+ * @member {string} [targetResourceGroup]
+ * @member {array} [resources]
+ */
+export interface CsmMoveResourceEnvelope {
+ targetResourceGroup?: string;
+ resources?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the GeoRegion class.
+ * @constructor
+ * Geographical region.
+ *
+ * @member {string} [geoRegionName] Region name.
+ * @member {string} [description] Region description.
+ * @member {string} [displayName] Display name for region.
+ */
+export interface GeoRegion extends ProxyOnlyResource {
+ readonly geoRegionName?: string;
+ readonly description?: string;
+ readonly displayName?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostingEnvironmentDeploymentInfo class.
+ * @constructor
+ * Information needed to create resources on an App Service Environment.
+ *
+ * @member {string} [name] Name of the App Service Environment.
+ * @member {string} [location] Location of the App Service Environment.
+ */
+export interface HostingEnvironmentDeploymentInfo {
+ name?: string;
+ location?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DeploymentLocations class.
+ * @constructor
+ * List of available locations (regions or App Service Environments) for
+ * deployment of App Service resources.
+ *
+ * @member {array} [locations] Available regions.
+ * @member {array} [hostingEnvironments] Available App Service Environments
+ * with full descriptions of the environments.
+ * @member {array} [hostingEnvironmentDeploymentInfos] Available App Service
+ * Environments with basic information.
+ */
+export interface DeploymentLocations {
+ locations?: GeoRegion[];
+ hostingEnvironments?: AppServiceEnvironment[];
+ hostingEnvironmentDeploymentInfos?: HostingEnvironmentDeploymentInfo[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the GlobalCsmSkuDescription class.
+ * @constructor
+ * A Global SKU Description.
+ *
+ * @member {string} [name] Name of the resource SKU.
+ * @member {string} [tier] Service Tier of the resource SKU.
+ * @member {string} [size] Size specifier of the resource SKU.
+ * @member {string} [family] Family code of the resource SKU.
+ * @member {object} [capacity] Min, max, and default scale values of the SKU.
+ * @member {number} [capacity.minimum] Minimum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.maximum] Maximum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.default] Default number of workers for this App
+ * Service plan SKU.
+ * @member {string} [capacity.scaleType] Available scale configurations for an
+ * App Service plan.
+ * @member {array} [locations] Locations of the SKU.
+ * @member {array} [capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+export interface GlobalCsmSkuDescription {
+ name?: string;
+ tier?: string;
+ size?: string;
+ family?: string;
+ capacity?: SkuCapacity;
+ locations?: string[];
+ capabilities?: Capability[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PremierAddOnOffer class.
+ * @constructor
+ * Premier add-on offer.
+ *
+ * @member {string} [sku] Premier add on SKU.
+ * @member {string} [product] Premier add on offer Product.
+ * @member {string} [vendor] Premier add on offer Vendor.
+ * @member {string} [premierAddOnOfferName] Premier add on offer Name.
+ * @member {boolean} [promoCodeRequired] true if promotion code is
+ * required; otherwise, false.
+ * @member {number} [quota] Premier add on offer Quota.
+ * @member {string} [webHostingPlanRestrictions] App Service plans this offer
+ * is restricted to. Possible values include: 'None', 'Free', 'Shared',
+ * 'Basic', 'Standard', 'Premium'
+ * @member {string} [privacyPolicyUrl] Privacy policy URL.
+ * @member {string} [legalTermsUrl] Legal terms URL.
+ * @member {string} [marketplacePublisher] Marketplace publisher.
+ * @member {string} [marketplaceOffer] Marketplace offer.
+ */
+export interface PremierAddOnOffer extends ProxyOnlyResource {
+ sku?: string;
+ product?: string;
+ vendor?: string;
+ premierAddOnOfferName?: string;
+ promoCodeRequired?: boolean;
+ quota?: number;
+ webHostingPlanRestrictions?: string;
+ privacyPolicyUrl?: string;
+ legalTermsUrl?: string;
+ marketplacePublisher?: string;
+ marketplaceOffer?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceNameAvailability class.
+ * @constructor
+ * Information regarding availbility of a resource name.
+ *
+ * @member {boolean} [nameAvailable] true indicates name is valid
+ * and available. false indicates the name is invalid,
+ * unavailable, or both.
+ * @member {string} [reason] Invalid indicates the name provided
+ * does not match Azure App Service naming requirements.
+ * AlreadyExists indicates that the name is already in use and is
+ * therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists'
+ * @member {string} [message] If reason == invalid, provide the user with the
+ * reason why the given name is invalid, and provide the resource naming
+ * requirements so that the user can select a valid name. If reason ==
+ * AlreadyExists, explain that resource name is already in use, and direct them
+ * to select a different name.
+ */
+export interface ResourceNameAvailability {
+ nameAvailable?: boolean;
+ reason?: string;
+ message?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceNameAvailabilityRequest class.
+ * @constructor
+ * Resource name availability request content.
+ *
+ * @member {string} name Resource name to verify.
+ * @member {string} type Resource type used for verification. Possible values
+ * include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser',
+ * 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots',
+ * 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers'
+ * @member {boolean} [isFqdn] Is fully qualified domain name.
+ */
+export interface ResourceNameAvailabilityRequest {
+ name: string;
+ type: string;
+ isFqdn?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SkuInfos class.
+ * @constructor
+ * Collection of SKU information.
+ *
+ * @member {string} [resourceType] Resource type that this SKU applies to.
+ * @member {array} [skus] List of SKUs the subscription is able to use.
+ */
+export interface SkuInfos {
+ resourceType?: string;
+ skus?: GlobalCsmSkuDescription[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SourceControl class.
+ * @constructor
+ * The source control OAuth token.
+ *
+ * @member {string} [sourceControlName] Name or source control type.
+ * @member {string} [token] OAuth access token.
+ * @member {string} [tokenSecret] OAuth access token secret.
+ * @member {string} [refreshToken] OAuth refresh token.
+ * @member {date} [expirationTime] OAuth token expiration.
+ */
+export interface SourceControl extends ProxyOnlyResource {
+ sourceControlName?: string;
+ token?: string;
+ tokenSecret?: string;
+ refreshToken?: string;
+ expirationTime?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ValidateRequest class.
+ * @constructor
+ * Resource validation request content.
+ *
+ * @member {string} name Resource name to verify.
+ * @member {string} type Resource type used for verification. Possible values
+ * include: 'ServerFarm', 'Site'
+ * @member {string} location Expected location of the resource.
+ * @member {string} [serverFarmId] ARM resource ID of an App Service plan that
+ * would host the app.
+ * @member {string} [skuName] Name of the target SKU for the App Service plan.
+ * @member {boolean} [needLinuxWorkers] true if App Service plan
+ * is for Linux workers; otherwise, false.
+ * @member {boolean} [isSpot] true if App Service plan is for Spot
+ * instances; otherwise, false.
+ * @member {number} [capacity] Target capacity of the App Service plan (number
+ * of VM's).
+ * @member {string} [hostingEnvironment] Name of App Service Environment where
+ * app or App Service plan should be created.
+ */
+export interface ValidateRequest {
+ name: string;
+ type: string;
+ location: string;
+ serverFarmId?: string;
+ skuName?: string;
+ needLinuxWorkers?: boolean;
+ isSpot?: boolean;
+ capacity?: number;
+ hostingEnvironment?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ValidateResponseError class.
+ * @constructor
+ * Error details for when validation fails.
+ *
+ * @member {string} [code] Validation error code.
+ * @member {string} [message] Validation error message.
+ */
+export interface ValidateResponseError {
+ code?: string;
+ message?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ValidateResponse class.
+ * @constructor
+ * Describes the result of resource validation.
+ *
+ * @member {string} [status] Result of validation.
+ * @member {object} [error] Error details for the case when validation fails.
+ * @member {string} [error.code] Validation error code.
+ * @member {string} [error.message] Validation error message.
+ */
+export interface ValidateResponse {
+ status?: string;
+ error?: ValidateResponseError;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetParameters class.
+ * @constructor
+ * The required set of inputs to validate a VNET
+ *
+ * @member {string} [vnetResourceGroup] The Resource Group of the VNET to be
+ * validated
+ * @member {string} [vnetName] The name of the VNET to be validated
+ * @member {string} [vnetSubnetName] The subnet name to be validated
+ */
+export interface VnetParameters extends ProxyOnlyResource {
+ vnetResourceGroup?: string;
+ vnetName?: string;
+ vnetSubnetName?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetValidationTestFailure class.
+ * @constructor
+ * A class that describes a test that failed during NSG and UDR validation.
+ *
+ * @member {string} [testName] The name of the test that failed.
+ * @member {string} [details] The details of what caused the failure, e.g. the
+ * blocking rule name, etc.
+ */
+export interface VnetValidationTestFailure extends ProxyOnlyResource {
+ testName?: string;
+ details?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the VnetValidationFailureDetails class.
+ * @constructor
+ * A class that describes the reason for a validation failure.
+ *
+ * @member {boolean} [failed] A flag describing whether or not validation
+ * failed.
+ * @member {array} [failedTests] A list of tests that failed in the validation.
+ */
+export interface VnetValidationFailureDetails extends ProxyOnlyResource {
+ failed?: boolean;
+ failedTests?: VnetValidationTestFailure[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the FileSystemApplicationLogsConfig class.
+ * @constructor
+ * Application logs to file system configuration.
+ *
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'. Default value: 'Off' .
+ */
+export interface FileSystemApplicationLogsConfig {
+ level?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AzureTableStorageApplicationLogsConfig class.
+ * @constructor
+ * Application logs to Azure table storage configuration.
+ *
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} sasUrl SAS URL to an Azure table with add/query/delete
+ * permissions.
+ */
+export interface AzureTableStorageApplicationLogsConfig {
+ level?: string;
+ sasUrl: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AzureBlobStorageApplicationLogsConfig class.
+ * @constructor
+ * Application logs azure blob storage configuration.
+ *
+ * @member {string} [level] Log level. Possible values include: 'Off',
+ * 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [sasUrl] SAS url to a azure blob container with
+ * read/write/list/delete permissions.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ */
+export interface AzureBlobStorageApplicationLogsConfig {
+ level?: string;
+ sasUrl?: string;
+ retentionInDays?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ApplicationLogsConfig class.
+ * @constructor
+ * Application logs configuration.
+ *
+ * @member {object} [fileSystem] Application logs to file system configuration.
+ * @member {string} [fileSystem.level] Log level. Possible values include:
+ * 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {object} [azureTableStorage] Application logs to azure table storage
+ * configuration.
+ * @member {string} [azureTableStorage.level] Log level. Possible values
+ * include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [azureTableStorage.sasUrl] SAS URL to an Azure table with
+ * add/query/delete permissions.
+ * @member {object} [azureBlobStorage] Application logs to blob storage
+ * configuration.
+ * @member {string} [azureBlobStorage.level] Log level. Possible values
+ * include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [azureBlobStorage.sasUrl] SAS url to a azure blob container
+ * with read/write/list/delete permissions.
+ * @member {number} [azureBlobStorage.retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ */
+export interface ApplicationLogsConfig {
+ fileSystem?: FileSystemApplicationLogsConfig;
+ azureTableStorage?: AzureTableStorageApplicationLogsConfig;
+ azureBlobStorage?: AzureBlobStorageApplicationLogsConfig;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AzureBlobStorageHttpLogsConfig class.
+ * @constructor
+ * Http logs to azure blob storage configuration.
+ *
+ * @member {string} [sasUrl] SAS url to a azure blob container with
+ * read/write/list/delete permissions.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [enabled] True if configuration is enabled, false if it is
+ * disabled and null if configuration is not set.
+ */
+export interface AzureBlobStorageHttpLogsConfig {
+ sasUrl?: string;
+ retentionInDays?: number;
+ enabled?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DatabaseBackupSetting class.
+ * @constructor
+ * Database backup settings.
+ *
+ * @member {string} databaseType Database type (e.g. SqlAzure / MySql).
+ * Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'
+ * @member {string} [name]
+ * @member {string} [connectionStringName] Contains a connection string name
+ * that is linked to the SiteConfig.ConnectionStrings.
+ * This is used during restore with overwrite connection strings options.
+ * @member {string} [connectionString] Contains a connection string to a
+ * database which is being backed up or restored. If the restore should happen
+ * to a new database, the database name inside is the new one.
+ */
+export interface DatabaseBackupSetting {
+ databaseType: string;
+ name?: string;
+ connectionStringName?: string;
+ connectionString?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BackupItem class.
+ * @constructor
+ * Backup description.
+ *
+ * @member {number} [backupId] Id of the backup.
+ * @member {string} [storageAccountUrl] SAS URL for the storage account
+ * container which contains this backup.
+ * @member {string} [blobName] Name of the blob which contains data for this
+ * backup.
+ * @member {string} [backupItemName] Name of this backup.
+ * @member {string} [status] Backup status. Possible values include:
+ * 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped',
+ * 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted'
+ * @member {number} [sizeInBytes] Size of the backup in bytes.
+ * @member {date} [created] Timestamp of the backup creation.
+ * @member {string} [log] Details regarding this backup. Might contain an error
+ * message.
+ * @member {array} [databases] List of databases included in the backup.
+ * @member {boolean} [scheduled] True if this backup has been created due to a
+ * schedule being triggered.
+ * @member {date} [lastRestoreTimeStamp] Timestamp of a last restore operation
+ * which used this backup.
+ * @member {date} [finishedTimeStamp] Timestamp when this backup finished.
+ * @member {string} [correlationId] Unique correlation identifier. Please use
+ * this along with the timestamp while communicating with Azure support.
+ * @member {number} [websiteSizeInBytes] Size of the original web app which has
+ * been backed up.
+ */
+export interface BackupItem extends ProxyOnlyResource {
+ readonly backupId?: number;
+ readonly storageAccountUrl?: string;
+ readonly blobName?: string;
+ readonly backupItemName?: string;
+ readonly status?: string;
+ readonly sizeInBytes?: number;
+ readonly created?: Date;
+ readonly log?: string;
+ readonly databases?: DatabaseBackupSetting[];
+ readonly scheduled?: boolean;
+ readonly lastRestoreTimeStamp?: Date;
+ readonly finishedTimeStamp?: Date;
+ readonly correlationId?: string;
+ readonly websiteSizeInBytes?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BackupSchedule class.
+ * @constructor
+ * Description of a backup schedule. Describes how often should be the backup
+ * performed and what should be the retention policy.
+ *
+ * @member {number} frequencyInterval How often the backup should be executed
+ * (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be
+ * set to Day). Default value: 7 .
+ * @member {string} frequencyUnit The unit of time for how often the backup
+ * should be executed (e.g. for weekly backup, this should be set to Day and
+ * FrequencyInterval should be set to 7). Possible values include: 'Day',
+ * 'Hour'. Default value: 'Day' .
+ * @member {boolean} keepAtLeastOneBackup True if the retention policy should
+ * always keep at least one backup in the storage account, regardless how old
+ * it is; false otherwise. Default value: true .
+ * @member {number} retentionPeriodInDays After how many days backups should be
+ * deleted. Default value: 30 .
+ * @member {date} [startTime] When the schedule should start working.
+ * @member {date} [lastExecutionTime] Last time when this schedule was
+ * triggered.
+ */
+export interface BackupSchedule {
+ frequencyInterval: number;
+ frequencyUnit: string;
+ keepAtLeastOneBackup: boolean;
+ retentionPeriodInDays: number;
+ startTime?: Date;
+ readonly lastExecutionTime?: Date;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BackupRequest class.
+ * @constructor
+ * Description of a backup which will be performed.
+ *
+ * @member {string} backupRequestName Name of the backup.
+ * @member {boolean} [enabled] True if the backup schedule is enabled (must be
+ * included in that case), false if the backup schedule should be disabled.
+ * @member {string} storageAccountUrl SAS URL to the container.
+ * @member {object} [backupSchedule] Schedule for the backup if it is executed
+ * periodically.
+ * @member {number} [backupSchedule.frequencyInterval] How often the backup
+ * should be executed (e.g. for weekly backup, this should be set to 7 and
+ * FrequencyUnit should be set to Day)
+ * @member {string} [backupSchedule.frequencyUnit] The unit of time for how
+ * often the backup should be executed (e.g. for weekly backup, this should be
+ * set to Day and FrequencyInterval should be set to 7). Possible values
+ * include: 'Day', 'Hour'
+ * @member {boolean} [backupSchedule.keepAtLeastOneBackup] True if the
+ * retention policy should always keep at least one backup in the storage
+ * account, regardless how old it is; false otherwise.
+ * @member {number} [backupSchedule.retentionPeriodInDays] After how many days
+ * backups should be deleted.
+ * @member {date} [backupSchedule.startTime] When the schedule should start
+ * working.
+ * @member {date} [backupSchedule.lastExecutionTime] Last time when this
+ * schedule was triggered.
+ * @member {array} [databases] Databases included in the backup.
+ * @member {string} [backupRequestType] Type of the backup. Possible values
+ * include: 'Default', 'Clone', 'Relocation', 'Snapshot'
+ */
+export interface BackupRequest extends ProxyOnlyResource {
+ backupRequestName: string;
+ enabled?: boolean;
+ storageAccountUrl: string;
+ backupSchedule?: BackupSchedule;
+ databases?: DatabaseBackupSetting[];
+ backupRequestType?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ConnStringValueTypePair class.
+ * @constructor
+ * Database connection string value to type pair.
+ *
+ * @member {string} value Value of pair.
+ * @member {string} type Type of database. Possible values include: 'MySql',
+ * 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus',
+ * 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'
+ */
+export interface ConnStringValueTypePair {
+ value: string;
+ type: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ConnectionStringDictionary class.
+ * @constructor
+ * String dictionary resource.
+ *
+ * @member {object} [properties] Connection strings.
+ */
+export interface ConnectionStringDictionary extends ProxyOnlyResource {
+ properties?: { [propertyName: string]: ConnStringValueTypePair };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ContinuousWebJob class.
+ * @constructor
+ * Continuous Web Job Information.
+ *
+ * @member {string} [status] Job status. Possible values include:
+ * 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped'
+ * @member {string} [detailedStatus] Detailed status.
+ * @member {string} [logUrl] Log URL.
+ * @member {string} [continuousWebJobName] Job name. Used as job identifier in
+ * ARM resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include: 'Continuous',
+ * 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+export interface ContinuousWebJob extends ProxyOnlyResource {
+ status?: string;
+ detailedStatus?: string;
+ logUrl?: string;
+ readonly continuousWebJobName?: string;
+ runCommand?: string;
+ url?: string;
+ extraInfoUrl?: string;
+ jobType?: string;
+ error?: string;
+ usingSdk?: boolean;
+ settings?: { [propertyName: string]: any };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmPublishingProfileOptions class.
+ * @constructor
+ * Publishing options for requested profile.
+ *
+ * @member {string} [format] Name of the format. Valid values are:
+ * FileZilla3
+ * WebDeploy -- default
+ * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'
+ */
+export interface CsmPublishingProfileOptions {
+ format?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmSlotEntity class.
+ * @constructor
+ * Deployment slot parameters.
+ *
+ * @member {string} targetSlot Destination deployment slot during swap
+ * operation.
+ * @member {boolean} preserveVnet true to preserve Virtual Network
+ * to the slot during swap; otherwise, false.
+ */
+export interface CsmSlotEntity {
+ targetSlot: string;
+ preserveVnet: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CustomHostnameAnalysisResult class.
+ * @constructor
+ * Custom domain analysis.
+ *
+ * @member {boolean} [isHostnameAlreadyVerified] true if hostname
+ * is already verified; otherwise, false.
+ * @member {string} [customDomainVerificationTest] DNS verification test
+ * result. Possible values include: 'Passed', 'Failed', 'Skipped'
+ * @member {object} [customDomainVerificationFailureInfo] Raw failure
+ * information if DNS verification fails.
+ * @member {string} [customDomainVerificationFailureInfo.extendedCode] Type of
+ * error.
+ * @member {string} [customDomainVerificationFailureInfo.messageTemplate]
+ * Message template.
+ * @member {array} [customDomainVerificationFailureInfo.parameters] Parameters
+ * for the template.
+ * @member {array} [customDomainVerificationFailureInfo.innerErrors] Inner
+ * errors.
+ * @member {string} [customDomainVerificationFailureInfo.code] Basic error
+ * code.
+ * @member {string} [customDomainVerificationFailureInfo.message] Any details
+ * of the error.
+ * @member {boolean} [hasConflictOnScaleUnit] true if there is a
+ * conflict on a scale unit; otherwise, false.
+ * @member {boolean} [hasConflictAcrossSubscription] true if htere
+ * is a conflict across subscriptions; otherwise, false.
+ * @member {string} [conflictingAppResourceId] Name of the conflicting app on
+ * scale unit if it's within the same subscription.
+ * @member {array} [cNameRecords] CName records controller can see for this
+ * hostname.
+ * @member {array} [txtRecords] TXT records controller can see for this
+ * hostname.
+ * @member {array} [aRecords] A records controller can see for this hostname.
+ * @member {array} [alternateCNameRecords] Alternate CName records controller
+ * can see for this hostname.
+ * @member {array} [alternateTxtRecords] Alternate TXT records controller can
+ * see for this hostname.
+ */
+export interface CustomHostnameAnalysisResult extends ProxyOnlyResource {
+ readonly isHostnameAlreadyVerified?: boolean;
+ readonly customDomainVerificationTest?: string;
+ readonly customDomainVerificationFailureInfo?: ErrorEntity;
+ readonly hasConflictOnScaleUnit?: boolean;
+ readonly hasConflictAcrossSubscription?: boolean;
+ readonly conflictingAppResourceId?: string;
+ cNameRecords?: string[];
+ txtRecords?: string[];
+ aRecords?: string[];
+ alternateCNameRecords?: string[];
+ alternateTxtRecords?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Deployment class.
+ * @constructor
+ * User crendentials used for publishing activity.
+ *
+ * @member {string} [deploymentId] Identifier for deployment.
+ * @member {number} [status] Deployment status.
+ * @member {string} [message] Details about deployment status.
+ * @member {string} [author] Who authored the deployment.
+ * @member {string} [deployer] Who performed the deployment.
+ * @member {string} [authorEmail] Author email.
+ * @member {date} [startTime] Start time.
+ * @member {date} [endTime] End time.
+ * @member {boolean} [active] True if deployment is currently active, false if
+ * completed and null if not started.
+ * @member {string} [details] Details on deployment.
+ */
+export interface Deployment extends ProxyOnlyResource {
+ deploymentId?: string;
+ status?: number;
+ message?: string;
+ author?: string;
+ deployer?: string;
+ authorEmail?: string;
+ startTime?: Date;
+ endTime?: Date;
+ active?: boolean;
+ details?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the EnabledConfig class.
+ * @constructor
+ * Enabled configuration.
+ *
+ * @member {boolean} [enabled] True if configuration is enabled, false if it is
+ * disabled and null if configuration is not set.
+ */
+export interface EnabledConfig {
+ enabled?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the FileSystemHttpLogsConfig class.
+ * @constructor
+ * Http logs to file system configuration.
+ *
+ * @member {number} [retentionInMb] Maximum size in megabytes that http log
+ * files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [enabled] True if configuration is enabled, false if it is
+ * disabled and null if configuration is not set.
+ */
+export interface FileSystemHttpLogsConfig {
+ retentionInMb?: number;
+ retentionInDays?: number;
+ enabled?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the FunctionEnvelope class.
+ * @constructor
+ * Web Job Information.
+ *
+ * @member {string} [functionEnvelopeName] Function name.
+ * @member {string} [functionAppId] Function App ID.
+ * @member {string} [scriptRootPathHref] Script root path URI.
+ * @member {string} [scriptHref] Script URI.
+ * @member {string} [configHref] Config URI.
+ * @member {string} [secretsFileHref] Secrets file URI.
+ * @member {string} [href] Function URI.
+ * @member {object} [config] Config information.
+ * @member {object} [files] File list.
+ * @member {string} [testData] Test data used when testing via the Azure
+ * Portal.
+ */
+export interface FunctionEnvelope extends ProxyOnlyResource {
+ readonly functionEnvelopeName?: string;
+ readonly functionAppId?: string;
+ scriptRootPathHref?: string;
+ scriptHref?: string;
+ configHref?: string;
+ secretsFileHref?: string;
+ href?: string;
+ config?: any;
+ files?: { [propertyName: string]: string };
+ testData?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the FunctionSecrets class.
+ * @constructor
+ * Function secrets.
+ *
+ * @member {string} [key] Secret key.
+ * @member {string} [triggerUrl] Trigger URL.
+ */
+export interface FunctionSecrets extends ProxyOnlyResource {
+ key?: string;
+ triggerUrl?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostNameBinding class.
+ * @constructor
+ * A hostname binding object.
+ *
+ * @member {string} [siteName] App Service app name.
+ * @member {string} [domainId] Fully qualified ARM domain resource URI.
+ * @member {string} [azureResourceName] Azure resource name.
+ * @member {string} [azureResourceType] Azure resource type. Possible values
+ * include: 'Website', 'TrafficManager'
+ * @member {string} [customHostNameDnsRecordType] Custom DNS record type.
+ * Possible values include: 'CName', 'A'
+ * @member {string} [hostNameType] Hostname type. Possible values include:
+ * 'Verified', 'Managed'
+ * @member {string} [sslState] SSL type. Possible values include: 'Disabled',
+ * 'SniEnabled', 'IpBasedEnabled'
+ * @member {string} [thumbprint] SSL certificate thumbprint
+ * @member {string} [virtualIP] Virtual IP address assigned to the hostname if
+ * IP based SSL is enabled.
+ */
+export interface HostNameBinding extends ProxyOnlyResource {
+ siteName?: string;
+ domainId?: string;
+ azureResourceName?: string;
+ azureResourceType?: string;
+ customHostNameDnsRecordType?: string;
+ hostNameType?: string;
+ sslState?: string;
+ thumbprint?: string;
+ readonly virtualIP?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HttpLogsConfig class.
+ * @constructor
+ * Http logs configuration.
+ *
+ * @member {object} [fileSystem] Http logs to file system configuration.
+ * @member {number} [fileSystem.retentionInMb] Maximum size in megabytes that
+ * http log files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [fileSystem.retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [fileSystem.enabled] True if configuration is enabled,
+ * false if it is disabled and null if configuration is not set.
+ * @member {object} [azureBlobStorage] Http logs to azure blob storage
+ * configuration.
+ * @member {string} [azureBlobStorage.sasUrl] SAS url to a azure blob container
+ * with read/write/list/delete permissions.
+ * @member {number} [azureBlobStorage.retentionInDays] Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [azureBlobStorage.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ */
+export interface HttpLogsConfig {
+ fileSystem?: FileSystemHttpLogsConfig;
+ azureBlobStorage?: AzureBlobStorageHttpLogsConfig;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MSDeploy class.
+ * @constructor
+ * MSDeploy ARM PUT information
+ *
+ * @member {string} [packageUri] Package URI
+ * @member {string} [connectionString] SQL Connection String
+ * @member {string} [dbType] Database Type
+ * @member {string} [setParametersXmlFileUri] URI of MSDeploy Parameters file.
+ * Must not be set if SetParameters is used.
+ * @member {object} [setParameters] MSDeploy Parameters. Must not be set if
+ * SetParametersXmlFileUri is used.
+ * @member {boolean} [skipAppData] Controls whether the MSDeploy operation
+ * skips the App_Data directory.
+ * If set to true, the existing App_Data directory on the
+ * destination
+ * will not be deleted, and any App_Data directory in the source will be
+ * ignored.
+ * Setting is false by default.
+ * @member {boolean} [appOffline] Sets the AppOffline rule while the MSDeploy
+ * operation executes.
+ * Setting is false by default.
+ */
+export interface MSDeploy extends ProxyOnlyResource {
+ packageUri?: string;
+ connectionString?: string;
+ dbType?: string;
+ setParametersXmlFileUri?: string;
+ setParameters?: { [propertyName: string]: string };
+ skipAppData?: boolean;
+ appOffline?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MSDeployLogEntry class.
+ * @constructor
+ * MSDeploy log entry
+ *
+ * @member {date} [time] Timestamp of log entry
+ * @member {string} [type] Log entry type. Possible values include: 'Message',
+ * 'Warning', 'Error'
+ * @member {string} [message] Log entry message
+ */
+export interface MSDeployLogEntry {
+ readonly time?: Date;
+ readonly type?: string;
+ readonly message?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MSDeployLog class.
+ * @constructor
+ * MSDeploy log
+ *
+ * @member {array} [entries] List of log entry messages
+ */
+export interface MSDeployLog extends ProxyOnlyResource {
+ readonly entries?: MSDeployLogEntry[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MSDeployStatus class.
+ * @constructor
+ * MSDeploy ARM response
+ *
+ * @member {string} [deployer] Username of deployer
+ * @member {string} [provisioningState] Provisioning state. Possible values
+ * include: 'accepted', 'running', 'succeeded', 'failed', 'canceled'
+ * @member {date} [startTime] Start time of deploy operation
+ * @member {date} [endTime] End time of deploy operation
+ * @member {boolean} [complete] Whether the deployment operation has completed
+ */
+export interface MSDeployStatus extends ProxyOnlyResource {
+ readonly deployer?: string;
+ readonly provisioningState?: string;
+ readonly startTime?: Date;
+ readonly endTime?: Date;
+ readonly complete?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MigrateMySqlRequest class.
+ * @constructor
+ * MySQL migration request.
+ *
+ * @member {string} connectionString Connection string to the remote MySQL
+ * database.
+ * @member {string} migrationType The type of migration operation to be done.
+ * Possible values include: 'LocalToRemote', 'RemoteToLocal'
+ */
+export interface MigrateMySqlRequest extends ProxyOnlyResource {
+ connectionString: string;
+ migrationType: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MigrateMySqlStatus class.
+ * @constructor
+ * MySQL migration status.
+ *
+ * @member {string} [migrationOperationStatus] Status of the migration task.
+ * Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut',
+ * 'Created'
+ * @member {string} [operationId] Operation ID for the migration task.
+ * @member {boolean} [localMySqlEnabled] True if the web app has in app MySql
+ * enabled
+ */
+export interface MigrateMySqlStatus extends ProxyOnlyResource {
+ readonly migrationOperationStatus?: string;
+ readonly operationId?: string;
+ readonly localMySqlEnabled?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RelayServiceConnectionEntity class.
+ * @constructor
+ * Hybrid Connection for an App Service app.
+ *
+ * @member {string} [entityName]
+ * @member {string} [entityConnectionString]
+ * @member {string} [resourceType]
+ * @member {string} [resourceConnectionString]
+ * @member {string} [hostname]
+ * @member {number} [port]
+ * @member {string} [biztalkUri]
+ */
+export interface RelayServiceConnectionEntity extends ProxyOnlyResource {
+ entityName?: string;
+ entityConnectionString?: string;
+ resourceType?: string;
+ resourceConnectionString?: string;
+ hostname?: string;
+ port?: number;
+ biztalkUri?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the NetworkFeatures class.
+ * @constructor
+ * Full view of network features for an app (presently VNET integration and
+ * Hybrid Connections).
+ *
+ * @member {string} [virtualNetworkName] The Virtual Network name.
+ * @member {object} [virtualNetworkConnection] The Virtual Network summary
+ * view.
+ * @member {string} [virtualNetworkConnection.vnetResourceId] The Virtual
+ * Network's resource ID.
+ * @member {string} [virtualNetworkConnection.certThumbprint] The client
+ * certificate thumbprint.
+ * @member {buffer} [virtualNetworkConnection.certBlob] A certificate file
+ * (.cer) blob containing the public key of the private key used to
+ * authenticate a
+ * Point-To-Site VPN connection.
+ * @member {array} [virtualNetworkConnection.routes] The routes that this
+ * Virtual Network connection uses.
+ * @member {boolean} [virtualNetworkConnection.resyncRequired]
+ * true if a resync is required; otherwise, false.
+ * @member {string} [virtualNetworkConnection.dnsServers] DNS servers to be
+ * used by this Virtual Network. This should be a comma-separated list of IP
+ * addresses.
+ * @member {array} [hybridConnections] The Hybrid Connections summary view.
+ * @member {array} [hybridConnectionsV2] The Hybrid Connection V2 (Service Bus)
+ * view.
+ */
+export interface NetworkFeatures extends ProxyOnlyResource {
+ readonly virtualNetworkName?: string;
+ readonly virtualNetworkConnection?: VnetInfo;
+ readonly hybridConnections?: RelayServiceConnectionEntity[];
+ readonly hybridConnectionsV2?: HybridConnection[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PerfMonSample class.
+ * @constructor
+ * Performance monitor sample in a set.
+ *
+ * @member {date} [time] Point in time for which counter was measured.
+ * @member {string} [instanceName] Name of the server on which the measurement
+ * is made.
+ * @member {number} [value] Value of counter at a certain time.
+ * @member {number} [coreCount] Core Count of worker. Not a data member
+ */
+export interface PerfMonSample {
+ time?: Date;
+ instanceName?: string;
+ value?: number;
+ coreCount?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PerfMonSet class.
+ * @constructor
+ * Metric information.
+ *
+ * @member {string} [name] Unique key name of the counter.
+ * @member {date} [startTime] Start time of the period.
+ * @member {date} [endTime] End time of the period.
+ * @member {string} [timeGrain] Presented time grain.
+ * @member {array} [values] Collection of workers that are active during this
+ * time.
+ */
+export interface PerfMonSet {
+ name?: string;
+ startTime?: Date;
+ endTime?: Date;
+ timeGrain?: string;
+ values?: PerfMonSample[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PerfMonResponse class.
+ * @constructor
+ * Performance monitor API response.
+ *
+ * @member {string} [code] The response code.
+ * @member {string} [message] The message.
+ * @member {object} [data] The performance monitor counters.
+ * @member {string} [data.name] Unique key name of the counter.
+ * @member {date} [data.startTime] Start time of the period.
+ * @member {date} [data.endTime] End time of the period.
+ * @member {string} [data.timeGrain] Presented time grain.
+ * @member {array} [data.values] Collection of workers that are active during
+ * this time.
+ */
+export interface PerfMonResponse {
+ code?: string;
+ message?: string;
+ data?: PerfMonSet;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PremierAddOn class.
+ * @constructor
+ * Premier add-on.
+ *
+ * @member {string} [sku] Premier add on SKU.
+ * @member {string} [product] Premier add on Product.
+ * @member {string} [vendor] Premier add on Vendor.
+ * @member {string} [premierAddOnName] Premier add on Name.
+ * @member {string} [premierAddOnLocation] Premier add on Location.
+ * @member {object} [premierAddOnTags] Premier add on Tags.
+ * @member {string} [marketplacePublisher] Premier add on Marketplace
+ * publisher.
+ * @member {string} [marketplaceOffer] Premier add on Marketplace offer.
+ */
+export interface PremierAddOn extends Resource {
+ sku?: string;
+ product?: string;
+ vendor?: string;
+ premierAddOnName?: string;
+ premierAddOnLocation?: string;
+ premierAddOnTags?: { [propertyName: string]: string };
+ marketplacePublisher?: string;
+ marketplaceOffer?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessThreadInfo class.
+ * @constructor
+ * Process Thread Information.
+ *
+ * @member {number} [processThreadInfoId] ARM Identifier for deployment.
+ * @member {string} [href] HRef URI.
+ * @member {string} [process] Process URI.
+ * @member {string} [startAddress] Start address.
+ * @member {number} [currentPriority] Current thread priority.
+ * @member {string} [priorityLevel] Thread priority level.
+ * @member {number} [basePriority] Base priority.
+ * @member {date} [startTime] Start time.
+ * @member {string} [totalProcessorTime] Total processor time.
+ * @member {string} [userProcessorTime] User processor time.
+ * @member {string} [priviledgedProcessorTime] Priviledged processor time.
+ * @member {string} [state] Thread state.
+ * @member {string} [waitReason] Wait reason.
+ */
+export interface ProcessThreadInfo extends ProxyOnlyResource {
+ processThreadInfoId?: number;
+ href?: string;
+ process?: string;
+ startAddress?: string;
+ currentPriority?: number;
+ priorityLevel?: string;
+ basePriority?: number;
+ startTime?: Date;
+ totalProcessorTime?: string;
+ userProcessorTime?: string;
+ priviledgedProcessorTime?: string;
+ state?: string;
+ waitReason?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessModuleInfo class.
+ * @constructor
+ * Process Module Information.
+ *
+ * @member {string} [baseAddress] Base address. Used as module identifier in
+ * ARM resource URI.
+ * @member {string} [fileName] File name.
+ * @member {string} [href] HRef URI.
+ * @member {string} [filePath] File path.
+ * @member {number} [moduleMemorySize] Module memory size.
+ * @member {string} [fileVersion] File version.
+ * @member {string} [fileDescription] File description.
+ * @member {string} [product] Product name.
+ * @member {string} [productVersion] Product version.
+ * @member {boolean} [isDebug] Is debug?
+ * @member {string} [language] Module language (locale).
+ */
+export interface ProcessModuleInfo extends ProxyOnlyResource {
+ baseAddress?: string;
+ fileName?: string;
+ href?: string;
+ filePath?: string;
+ moduleMemorySize?: number;
+ fileVersion?: string;
+ fileDescription?: string;
+ product?: string;
+ productVersion?: string;
+ isDebug?: boolean;
+ language?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessInfo class.
+ * @constructor
+ * Process Information.
+ *
+ * @member {number} [processInfoId] ARM Identifier for deployment.
+ * @member {string} [processInfoName] Deployment name.
+ * @member {string} [href] HRef URI.
+ * @member {string} [miniDump] Minidump URI.
+ * @member {boolean} [isProfileRunning] Is profile running?
+ * @member {boolean} [isIisProfileRunning] Is the IIS Profile running?
+ * @member {number} [iisProfileTimeoutInSeconds] IIS Profile timeout (seconds).
+ * @member {string} [parent] Parent process.
+ * @member {array} [children] Child process list.
+ * @member {array} [threads] Thread list.
+ * @member {array} [openFileHandles] List of open files.
+ * @member {array} [modules] List of modules.
+ * @member {string} [fileName] File name of this process.
+ * @member {string} [commandLine] Command line.
+ * @member {string} [userName] User name.
+ * @member {number} [handleCount] Handle count.
+ * @member {number} [moduleCount] Module count.
+ * @member {number} [threadCount] Thread count.
+ * @member {date} [startTime] Start time.
+ * @member {string} [totalProcessorTime] Total CPU time.
+ * @member {string} [userProcessorTime] User CPU time.
+ * @member {string} [privilegedProcessorTime] Privileged CPU time.
+ * @member {number} [workingSet64] Working set.
+ * @member {number} [peakWorkingSet64] Peak working set.
+ * @member {number} [privateMemorySize64] Private memory size.
+ * @member {number} [virtualMemorySize64] Virtual memory size.
+ * @member {number} [peakVirtualMemorySize64] Peak virtual memory usage.
+ * @member {number} [pagedSystemMemorySize64] Paged system memory.
+ * @member {number} [nonpagedSystemMemorySize64] Non-paged system memory.
+ * @member {number} [pagedMemorySize64] Paged memory.
+ * @member {number} [peakPagedMemorySize64] Peak paged memory.
+ * @member {date} [timeStamp] Time stamp.
+ * @member {object} [environmentVariables] List of environment variables.
+ * @member {boolean} [isScmSite] Is this the SCM site?
+ * @member {boolean} [isWebJob] Is this a Web Job?
+ * @member {string} [description] Description of process.
+ */
+export interface ProcessInfo extends ProxyOnlyResource {
+ processInfoId?: number;
+ processInfoName?: string;
+ href?: string;
+ miniDump?: string;
+ isProfileRunning?: boolean;
+ isIisProfileRunning?: boolean;
+ iisProfileTimeoutInSeconds?: number;
+ parent?: string;
+ children?: string[];
+ threads?: ProcessThreadInfo[];
+ openFileHandles?: string[];
+ modules?: ProcessModuleInfo[];
+ fileName?: string;
+ commandLine?: string;
+ userName?: string;
+ handleCount?: number;
+ moduleCount?: number;
+ threadCount?: number;
+ startTime?: Date;
+ totalProcessorTime?: string;
+ userProcessorTime?: string;
+ privilegedProcessorTime?: string;
+ workingSet64?: number;
+ peakWorkingSet64?: number;
+ privateMemorySize64?: number;
+ virtualMemorySize64?: number;
+ peakVirtualMemorySize64?: number;
+ pagedSystemMemorySize64?: number;
+ nonpagedSystemMemorySize64?: number;
+ pagedMemorySize64?: number;
+ peakPagedMemorySize64?: number;
+ timeStamp?: Date;
+ environmentVariables?: { [propertyName: string]: string };
+ isScmSite?: boolean;
+ isWebJob?: boolean;
+ description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PublicCertificate class.
+ * @constructor
+ * Public certificate object
+ *
+ * @member {buffer} [blob] Public Certificate byte array
+ * @member {string} [publicCertificateLocation] Public Certificate Location.
+ * Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown'
+ * @member {string} [thumbprint] Certificate Thumbprint
+ */
+export interface PublicCertificate extends ProxyOnlyResource {
+ blob?: Buffer;
+ publicCertificateLocation?: string;
+ readonly thumbprint?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RestoreRequest class.
+ * @constructor
+ * Description of a restore request.
+ *
+ * @member {string} storageAccountUrl SAS URL to the container.
+ * @member {string} [blobName] Name of a blob which contains the backup.
+ * @member {boolean} overwrite true if the restore operation can
+ * overwrite target app; otherwise, false. true is
+ * needed if trying to restore over an existing app.
+ * @member {string} [siteName] Name of an app.
+ * @member {array} [databases] Collection of databases which should be
+ * restored. This list has to match the list of databases included in the
+ * backup.
+ * @member {boolean} [ignoreConflictingHostNames] Changes a logic when
+ * restoring an app with custom domains. true to remove custom
+ * domains automatically. If false, custom domains are added to
+ * the app's object when it is being restored, but that might fail due to
+ * conflicts during the operation. Default value: false .
+ * @member {boolean} [ignoreDatabases] Ignore the databases and only restore
+ * the site content. Default value: false .
+ * @member {string} [appServicePlan] Specify app service plan that will own
+ * restored site.
+ * @member {string} [operationType] Operation type. Possible values include:
+ * 'Default', 'Clone', 'Relocation', 'Snapshot'. Default value: 'Default' .
+ * @member {boolean} [adjustConnectionStrings] true if
+ * SiteConfig.ConnectionStrings should be set in new app; otherwise,
+ * false.
+ * @member {string} [hostingEnvironment] App Service Environment name, if
+ * needed (only when restoring an app to an App Service Environment).
+ */
+export interface RestoreRequest extends ProxyOnlyResource {
+ storageAccountUrl: string;
+ blobName?: string;
+ overwrite: boolean;
+ siteName?: string;
+ databases?: DatabaseBackupSetting[];
+ ignoreConflictingHostNames?: boolean;
+ ignoreDatabases?: boolean;
+ appServicePlan?: string;
+ operationType?: string;
+ adjustConnectionStrings?: boolean;
+ hostingEnvironment?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RestoreResponse class.
+ * @constructor
+ * Response for an app restore request.
+ *
+ * @member {string} [operationId] When server starts the restore process, it
+ * will return an operation ID identifying that particular restore operation.
+ */
+export interface RestoreResponse extends ProxyOnlyResource {
+ readonly operationId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteAuthSettings class.
+ * @constructor
+ * Configuration settings for the Azure App Service Authentication /
+ * Authorization feature.
+ *
+ * @member {boolean} [enabled] true if the Authentication /
+ * Authorization feature is enabled for the current app; otherwise,
+ * false.
+ * @member {string} [runtimeVersion] The RuntimeVersion of the Authentication /
+ * Authorization feature in use for the current app.
+ * The setting in this value can control the behavior of certain features in
+ * the Authentication / Authorization module.
+ * @member {string} [unauthenticatedClientAction] The action to take when an
+ * unauthenticated client attempts to access the app. Possible values include:
+ * 'RedirectToLoginPage', 'AllowAnonymous'
+ * @member {boolean} [tokenStoreEnabled] true to durably store
+ * platform-specific security tokens that are obtained during login flows;
+ * otherwise, false.
+ * The default is false.
+ * @member {array} [allowedExternalRedirectUrls] External URLs that can be
+ * redirected to as part of logging in or logging out of the app. Note that the
+ * query string part of the URL is ignored.
+ * This is an advanced setting typically only needed by Windows Store
+ * application backends.
+ * Note that URLs within the current domain are always implicitly allowed.
+ * @member {string} [defaultProvider] The default authentication provider to
+ * use when multiple providers are configured.
+ * This setting is only needed if multiple providers are configured and the
+ * unauthenticated client
+ * action is set to "RedirectToLoginPage". Possible values include:
+ * 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter'
+ * @member {number} [tokenRefreshExtensionHours] The number of hours after
+ * session token expiration that a session token can be used to
+ * call the token refresh API. The default is 72 hours.
+ * @member {string} [clientId] The Client ID of this relying party application,
+ * known as the client_id.
+ * This setting is required for enabling OpenID Connection authentication with
+ * Azure Active Directory or
+ * other 3rd party OpenID Connect providers.
+ * More information on OpenID Connect:
+ * http://openid.net/specs/openid-connect-core-1_0.html
+ * @member {string} [clientSecret] The Client Secret of this relying party
+ * application (in Azure Active Directory, this is also referred to as the
+ * Key).
+ * This setting is optional. If no client secret is configured, the OpenID
+ * Connect implicit auth flow is used to authenticate end users.
+ * Otherwise, the OpenID Connect Authorization Code Flow is used to
+ * authenticate end users.
+ * More information on OpenID Connect:
+ * http://openid.net/specs/openid-connect-core-1_0.html
+ * @member {string} [issuer] The OpenID Connect Issuer URI that represents the
+ * entity which issues access tokens for this application.
+ * When using Azure Active Directory, this value is the URI of the directory
+ * tenant, e.g. https://sts.windows.net/{tenant-guid}/.
+ * This URI is a case-sensitive identifier for the token issuer.
+ * More information on OpenID Connect Discovery:
+ * http://openid.net/specs/openid-connect-discovery-1_0.html
+ * @member {array} [allowedAudiences] Allowed audience values to consider when
+ * validating JWTs issued by
+ * Azure Active Directory. Note that the ClientID value is always
+ * considered an
+ * allowed audience, regardless of this setting.
+ * @member {array} [additionalLoginParams] Login parameters to send to the
+ * OpenID Connect authorization endpoint when
+ * a user logs in. Each parameter must be in the form "key=value".
+ * @member {string} [googleClientId] The OpenID Connect Client ID for the
+ * Google web application.
+ * This setting is required for enabling Google Sign-In.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {string} [googleClientSecret] The client secret associated with the
+ * Google web application.
+ * This setting is required for enabling Google Sign-In.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {array} [googleOAuthScopes] The OAuth 2.0 scopes that will be
+ * requested as part of Google Sign-In authentication.
+ * This setting is optional. If not specified, "openid", "profile", and "email"
+ * are used as default scopes.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {string} [facebookAppId] The App ID of the Facebook app used for
+ * login.
+ * This setting is required for enabling Facebook Login.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {string} [facebookAppSecret] The App Secret of the Facebook app used
+ * for Facebook Login.
+ * This setting is required for enabling Facebook Login.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {array} [facebookOAuthScopes] The OAuth 2.0 scopes that will be
+ * requested as part of Facebook Login authentication.
+ * This setting is optional.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {string} [twitterConsumerKey] The OAuth 1.0a consumer key of the
+ * Twitter application used for sign-in.
+ * This setting is required for enabling Twitter Sign-In.
+ * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
+ * @member {string} [twitterConsumerSecret] The OAuth 1.0a consumer secret of
+ * the Twitter application used for sign-in.
+ * This setting is required for enabling Twitter Sign-In.
+ * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
+ * @member {string} [microsoftAccountClientId] The OAuth 2.0 client ID that was
+ * created for the app used for authentication.
+ * This setting is required for enabling Microsoft Account authentication.
+ * Microsoft Account OAuth documentation:
+ * https://dev.onedrive.com/auth/msa_oauth.htm
+ * @member {string} [microsoftAccountClientSecret] The OAuth 2.0 client secret
+ * that was created for the app used for authentication.
+ * This setting is required for enabling Microsoft Account authentication.
+ * Microsoft Account OAuth documentation:
+ * https://dev.onedrive.com/auth/msa_oauth.htm
+ * @member {array} [microsoftAccountOAuthScopes] The OAuth 2.0 scopes that will
+ * be requested as part of Microsoft Account authentication.
+ * This setting is optional. If not specified, "wl.basic" is used as the
+ * default scope.
+ * Microsoft Account Scopes and permissions documentation:
+ * https://msdn.microsoft.com/en-us/library/dn631845.aspx
+ */
+export interface SiteAuthSettings extends ProxyOnlyResource {
+ enabled?: boolean;
+ runtimeVersion?: string;
+ unauthenticatedClientAction?: string;
+ tokenStoreEnabled?: boolean;
+ allowedExternalRedirectUrls?: string[];
+ defaultProvider?: string;
+ tokenRefreshExtensionHours?: number;
+ clientId?: string;
+ clientSecret?: string;
+ issuer?: string;
+ allowedAudiences?: string[];
+ additionalLoginParams?: string[];
+ googleClientId?: string;
+ googleClientSecret?: string;
+ googleOAuthScopes?: string[];
+ facebookAppId?: string;
+ facebookAppSecret?: string;
+ facebookOAuthScopes?: string[];
+ twitterConsumerKey?: string;
+ twitterConsumerSecret?: string;
+ microsoftAccountClientId?: string;
+ microsoftAccountClientSecret?: string;
+ microsoftAccountOAuthScopes?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteCloneabilityCriterion class.
+ * @constructor
+ * An app cloneability criterion.
+ *
+ * @member {string} [name] Name of criterion.
+ * @member {string} [description] Description of criterion.
+ */
+export interface SiteCloneabilityCriterion {
+ name?: string;
+ description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteCloneability class.
+ * @constructor
+ * Represents whether or not an app is cloneable.
+ *
+ * @member {string} [result] Name of app. Possible values include: 'Cloneable',
+ * 'PartiallyCloneable', 'NotCloneable'
+ * @member {array} [blockingFeatures] List of features enabled on app that
+ * prevent cloning.
+ * @member {array} [unsupportedFeatures] List of features enabled on app that
+ * are non-blocking but cannot be cloned. The app can still be cloned
+ * but the features in this list will not be set up on cloned app.
+ * @member {array} [blockingCharacteristics] List of blocking application
+ * characteristics.
+ */
+export interface SiteCloneability {
+ result?: string;
+ blockingFeatures?: SiteCloneabilityCriterion[];
+ unsupportedFeatures?: SiteCloneabilityCriterion[];
+ blockingCharacteristics?: SiteCloneabilityCriterion[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteConfigResource class.
+ * @constructor
+ * Web app configuration ARM resource.
+ *
+ * @member {number} [numberOfWorkers] Number of workers.
+ * @member {array} [defaultDocuments] Default documents.
+ * @member {string} [netFrameworkVersion] .NET Framework version. Default
+ * value: 'v4.6' .
+ * @member {string} [phpVersion] Version of PHP.
+ * @member {string} [pythonVersion] Version of Python.
+ * @member {string} [nodeVersion] Version of Node.js.
+ * @member {string} [linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [requestTracingEnabled] true if request
+ * tracing is enabled; otherwise, false.
+ * @member {date} [requestTracingExpirationTime] Request tracing expiration
+ * time.
+ * @member {boolean} [remoteDebuggingEnabled] true if remote
+ * debugging is enabled; otherwise, false.
+ * @member {string} [remoteDebuggingVersion] Remote debugging version.
+ * @member {boolean} [httpLoggingEnabled] true if HTTP logging is
+ * enabled; otherwise, false.
+ * @member {number} [logsDirectorySizeLimit] HTTP logs directory size limit.
+ * @member {boolean} [detailedErrorLoggingEnabled] true if
+ * detailed error logging is enabled; otherwise, false.
+ * @member {string} [publishingUsername] Publishing user name.
+ * @member {array} [appSettings] Application settings.
+ * @member {array} [connectionStrings] Connection strings.
+ * @member {object} [machineKey] Site MachineKey.
+ * @member {string} [machineKey.validation] MachineKey validation.
+ * @member {string} [machineKey.validationKey] Validation key.
+ * @member {string} [machineKey.decryption] Algorithm used for decryption.
+ * @member {string} [machineKey.decryptionKey] Decryption key.
+ * @member {array} [handlerMappings] Handler mappings.
+ * @member {string} [documentRoot] Document root.
+ * @member {string} [scmType] SCM type. Possible values include: 'None',
+ * 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [use32BitWorkerProcess] true to use 32-bit
+ * worker process; otherwise, false.
+ * @member {boolean} [webSocketsEnabled] true if WebSocket is
+ * enabled; otherwise, false.
+ * @member {boolean} [alwaysOn] true if Always On is enabled;
+ * otherwise, false.
+ * @member {string} [javaVersion] Java version.
+ * @member {string} [javaContainer] Java container.
+ * @member {string} [javaContainerVersion] Java container version.
+ * @member {string} [appCommandLine] App command line to launch.
+ * @member {string} [managedPipelineMode] Managed pipeline mode. Possible
+ * values include: 'Integrated', 'Classic'
+ * @member {array} [virtualApplications] Virtual applications.
+ * @member {string} [loadBalancing] Site load balancing. Possible values
+ * include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [experiments] This is work around for polymophic types.
+ * @member {array} [experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [limits] Site limits.
+ * @member {number} [limits.maxPercentageCpu] Maximum allowed CPU usage
+ * percentage.
+ * @member {number} [limits.maxMemoryInMb] Maximum allowed memory usage in MB.
+ * @member {number} [limits.maxDiskSizeInMb] Maximum allowed disk size usage in
+ * MB.
+ * @member {boolean} [autoHealEnabled] true if Auto Heal is
+ * enabled; otherwise, false.
+ * @member {object} [autoHealRules] Auto Heal rules.
+ * @member {object} [autoHealRules.triggers] Conditions that describe when to
+ * execute the auto-heal actions.
+ * @member {object} [autoHealRules.triggers.requests] A rule based on total
+ * requests.
+ * @member {number} [autoHealRules.triggers.requests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.requests.timeInterval] Time
+ * interval.
+ * @member {number} [autoHealRules.triggers.privateBytesInKB] A rule based on
+ * private bytes.
+ * @member {array} [autoHealRules.triggers.statusCodes] A rule based on status
+ * codes.
+ * @member {object} [autoHealRules.triggers.slowRequests] A rule based on
+ * request execution time.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [autoHealRules.triggers.slowRequests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [autoHealRules.actions] Actions to be executed when a rule
+ * is triggered.
+ * @member {string} [autoHealRules.actions.actionType] Predefined action to be
+ * taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [autoHealRules.actions.customAction] Custom action to be
+ * taken.
+ * @member {string} [autoHealRules.actions.customAction.exe] Executable to be
+ * run.
+ * @member {string} [autoHealRules.actions.customAction.parameters] Parameters
+ * for the executable.
+ * @member {string} [autoHealRules.actions.minProcessExecutionTime] Minimum
+ * time the process must execute
+ * before taking the action
+ * @member {string} [tracingOptions] Tracing options.
+ * @member {string} [vnetName] Virtual Network name.
+ * @member {object} [cors] Cross-Origin Resource Sharing (CORS) settings.
+ * @member {array} [cors.allowedOrigins] Gets or sets the list of origins that
+ * should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [push] Push endpoint settings.
+ * @member {boolean} [push.isPushEnabled] Gets or sets a flag indicating
+ * whether the Push endpoint is enabled.
+ * @member {string} [push.tagWhitelistJson] Gets or sets a JSON string
+ * containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [push.tagsRequiringAuth] Gets or sets a JSON string
+ * containing a list of tags that require user authentication to be used in the
+ * push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [push.dynamicTagsJson] Gets or sets a JSON string
+ * containing a list of dynamic tags that will be evaluated from user claims in
+ * the push registration endpoint.
+ * @member {object} [apiDefinition] Information about the formal API definition
+ * for the app.
+ * @member {string} [apiDefinition.url] The URL of the API definition.
+ * @member {string} [autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [localMySqlEnabled] true to enable local
+ * MySQL; otherwise, false. Default value: false .
+ * @member {array} [ipSecurityRestrictions] IP security restrictions.
+ * @member {boolean} [http20Enabled] Http20Enabled: configures a web site to
+ * allow clients to connect over http2.0. Default value: true .
+ * @member {string} [minTlsVersion] MinTlsVersion: configures the minimum
+ * version of TLS required for SSL requests. Possible values include: '1.0',
+ * '1.1', '1.2'
+ */
+export interface SiteConfigResource extends ProxyOnlyResource {
+ numberOfWorkers?: number;
+ defaultDocuments?: string[];
+ netFrameworkVersion?: string;
+ phpVersion?: string;
+ pythonVersion?: string;
+ nodeVersion?: string;
+ linuxFxVersion?: string;
+ requestTracingEnabled?: boolean;
+ requestTracingExpirationTime?: Date;
+ remoteDebuggingEnabled?: boolean;
+ remoteDebuggingVersion?: string;
+ httpLoggingEnabled?: boolean;
+ logsDirectorySizeLimit?: number;
+ detailedErrorLoggingEnabled?: boolean;
+ publishingUsername?: string;
+ appSettings?: NameValuePair[];
+ connectionStrings?: ConnStringInfo[];
+ readonly machineKey?: SiteMachineKey;
+ handlerMappings?: HandlerMapping[];
+ documentRoot?: string;
+ scmType?: string;
+ use32BitWorkerProcess?: boolean;
+ webSocketsEnabled?: boolean;
+ alwaysOn?: boolean;
+ javaVersion?: string;
+ javaContainer?: string;
+ javaContainerVersion?: string;
+ appCommandLine?: string;
+ managedPipelineMode?: string;
+ virtualApplications?: VirtualApplication[];
+ loadBalancing?: string;
+ experiments?: Experiments;
+ limits?: SiteLimits;
+ autoHealEnabled?: boolean;
+ autoHealRules?: AutoHealRules;
+ tracingOptions?: string;
+ vnetName?: string;
+ cors?: CorsSettings;
+ push?: PushSettings;
+ apiDefinition?: ApiDefinitionInfo;
+ autoSwapSlotName?: string;
+ localMySqlEnabled?: boolean;
+ ipSecurityRestrictions?: IpSecurityRestriction[];
+ http20Enabled?: boolean;
+ minTlsVersion?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteConfigurationSnapshotInfo class.
+ * @constructor
+ * A snapshot of a web app configuration.
+ *
+ * @member {date} [time] The time the snapshot was taken.
+ * @member {number} [siteConfigurationSnapshotInfoId] The id of the snapshot
+ */
+export interface SiteConfigurationSnapshotInfo extends ProxyOnlyResource {
+ readonly time?: Date;
+ readonly siteConfigurationSnapshotInfoId?: number;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteExtensionInfo class.
+ * @constructor
+ * Site Extension Information.
+ *
+ * @member {string} [siteExtensionInfoId] Site extension ID.
+ * @member {string} [title] Site extension title.
+ * @member {string} [siteExtensionInfoType] Site extension type. Possible
+ * values include: 'Gallery', 'WebRoot'
+ * @member {string} [summary] Summary description.
+ * @member {string} [description] Detailed description.
+ * @member {string} [version] Version information.
+ * @member {string} [extensionUrl] Extension URL.
+ * @member {string} [projectUrl] Project URL.
+ * @member {string} [iconUrl] Icon URL.
+ * @member {string} [licenseUrl] License URL.
+ * @member {string} [feedUrl] Feed URL.
+ * @member {array} [authors] List of authors.
+ * @member {string} [installationArgs] Installer command line parameters.
+ * @member {date} [publishedDateTime] Published timestamp.
+ * @member {number} [downloadCount] Count of downloads.
+ * @member {boolean} [localIsLatestVersion] true if the local
+ * version is the latest version; false otherwise.
+ * @member {string} [localPath] Local path.
+ * @member {date} [installedDateTime] Installed timestamp.
+ * @member {string} [provisioningState] Provisioning state.
+ * @member {string} [comment] Site Extension comment.
+ */
+export interface SiteExtensionInfo extends ProxyOnlyResource {
+ siteExtensionInfoId?: string;
+ title?: string;
+ siteExtensionInfoType?: string;
+ summary?: string;
+ description?: string;
+ version?: string;
+ extensionUrl?: string;
+ projectUrl?: string;
+ iconUrl?: string;
+ licenseUrl?: string;
+ feedUrl?: string;
+ authors?: string[];
+ installationArgs?: string;
+ publishedDateTime?: Date;
+ downloadCount?: number;
+ localIsLatestVersion?: boolean;
+ localPath?: string;
+ installedDateTime?: Date;
+ provisioningState?: string;
+ comment?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteInstance class.
+ * @constructor
+ * Instance of an app.
+ *
+ * @member {string} [siteInstanceName] Name of instance.
+ */
+export interface SiteInstance extends ProxyOnlyResource {
+ readonly siteInstanceName?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteLogsConfig class.
+ * @constructor
+ * Configuration of App Service site logs.
+ *
+ * @member {object} [applicationLogs] Application logs configuration.
+ * @member {object} [applicationLogs.fileSystem] Application logs to file
+ * system configuration.
+ * @member {string} [applicationLogs.fileSystem.level] Log level. Possible
+ * values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {object} [applicationLogs.azureTableStorage] Application logs to
+ * azure table storage configuration.
+ * @member {string} [applicationLogs.azureTableStorage.level] Log level.
+ * Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [applicationLogs.azureTableStorage.sasUrl] SAS URL to an
+ * Azure table with add/query/delete permissions.
+ * @member {object} [applicationLogs.azureBlobStorage] Application logs to blob
+ * storage configuration.
+ * @member {string} [applicationLogs.azureBlobStorage.level] Log level.
+ * Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {string} [applicationLogs.azureBlobStorage.sasUrl] SAS url to a
+ * azure blob container with read/write/list/delete permissions.
+ * @member {number} [applicationLogs.azureBlobStorage.retentionInDays]
+ * Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {object} [httpLogs] HTTP logs configuration.
+ * @member {object} [httpLogs.fileSystem] Http logs to file system
+ * configuration.
+ * @member {number} [httpLogs.fileSystem.retentionInMb] Maximum size in
+ * megabytes that http log files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [httpLogs.fileSystem.retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [httpLogs.fileSystem.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ * @member {object} [httpLogs.azureBlobStorage] Http logs to azure blob storage
+ * configuration.
+ * @member {string} [httpLogs.azureBlobStorage.sasUrl] SAS url to a azure blob
+ * container with read/write/list/delete permissions.
+ * @member {number} [httpLogs.azureBlobStorage.retentionInDays] Retention in
+ * days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [httpLogs.azureBlobStorage.enabled] True if configuration
+ * is enabled, false if it is disabled and null if configuration is not set.
+ * @member {object} [failedRequestsTracing] Failed requests tracing
+ * configuration.
+ * @member {boolean} [failedRequestsTracing.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ * @member {object} [detailedErrorMessages] Detailed error messages
+ * configuration.
+ * @member {boolean} [detailedErrorMessages.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ */
+export interface SiteLogsConfig extends ProxyOnlyResource {
+ applicationLogs?: ApplicationLogsConfig;
+ httpLogs?: HttpLogsConfig;
+ failedRequestsTracing?: EnabledConfig;
+ detailedErrorMessages?: EnabledConfig;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SitePatchResource class.
+ * @constructor
+ * ARM resource for a site.
+ *
+ * @member {string} [state] Current state of the app.
+ * @member {array} [hostNames] Hostnames associated with the app.
+ * @member {string} [repositorySiteName] Name of the repository site.
+ * @member {string} [usageState] State indicating whether the app has exceeded
+ * its quota usage. Read-only. Possible values include: 'Normal', 'Exceeded'
+ * @member {boolean} [enabled] true if the app is enabled;
+ * otherwise, false. Setting this value to false disables the app
+ * (takes the app offline).
+ * @member {array} [enabledHostNames] Enabled hostnames for the app.Hostnames
+ * need to be assigned (see HostNames) AND enabled. Otherwise,
+ * the app is not served on those hostnames.
+ * @member {string} [availabilityState] Management information availability
+ * state for the app. Possible values include: 'Normal', 'Limited',
+ * 'DisasterRecoveryMode'
+ * @member {array} [hostNameSslStates] Hostname SSL states are used to manage
+ * the SSL bindings for app's hostnames.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ * @member {boolean} [reserved] true if reserved; otherwise,
+ * false. Default value: false .
+ * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in UTC.
+ * Read-only.
+ * @member {object} [siteConfig] Configuration of the app.
+ * @member {number} [siteConfig.numberOfWorkers] Number of workers.
+ * @member {array} [siteConfig.defaultDocuments] Default documents.
+ * @member {string} [siteConfig.netFrameworkVersion] .NET Framework version.
+ * @member {string} [siteConfig.phpVersion] Version of PHP.
+ * @member {string} [siteConfig.pythonVersion] Version of Python.
+ * @member {string} [siteConfig.nodeVersion] Version of Node.js.
+ * @member {string} [siteConfig.linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [siteConfig.requestTracingEnabled] true if
+ * request tracing is enabled; otherwise, false.
+ * @member {date} [siteConfig.requestTracingExpirationTime] Request tracing
+ * expiration time.
+ * @member {boolean} [siteConfig.remoteDebuggingEnabled] true if
+ * remote debugging is enabled; otherwise, false.
+ * @member {string} [siteConfig.remoteDebuggingVersion] Remote debugging
+ * version.
+ * @member {boolean} [siteConfig.httpLoggingEnabled] true if HTTP
+ * logging is enabled; otherwise, false.
+ * @member {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory
+ * size limit.
+ * @member {boolean} [siteConfig.detailedErrorLoggingEnabled] true
+ * if detailed error logging is enabled; otherwise, false.
+ * @member {string} [siteConfig.publishingUsername] Publishing user name.
+ * @member {array} [siteConfig.appSettings] Application settings.
+ * @member {array} [siteConfig.connectionStrings] Connection strings.
+ * @member {object} [siteConfig.machineKey] Site MachineKey.
+ * @member {string} [siteConfig.machineKey.validation] MachineKey validation.
+ * @member {string} [siteConfig.machineKey.validationKey] Validation key.
+ * @member {string} [siteConfig.machineKey.decryption] Algorithm used for
+ * decryption.
+ * @member {string} [siteConfig.machineKey.decryptionKey] Decryption key.
+ * @member {array} [siteConfig.handlerMappings] Handler mappings.
+ * @member {string} [siteConfig.documentRoot] Document root.
+ * @member {string} [siteConfig.scmType] SCM type. Possible values include:
+ * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [siteConfig.use32BitWorkerProcess] true to
+ * use 32-bit worker process; otherwise, false.
+ * @member {boolean} [siteConfig.webSocketsEnabled] true if
+ * WebSocket is enabled; otherwise, false.
+ * @member {boolean} [siteConfig.alwaysOn] true if Always On is
+ * enabled; otherwise, false.
+ * @member {string} [siteConfig.javaVersion] Java version.
+ * @member {string} [siteConfig.javaContainer] Java container.
+ * @member {string} [siteConfig.javaContainerVersion] Java container version.
+ * @member {string} [siteConfig.appCommandLine] App command line to launch.
+ * @member {string} [siteConfig.managedPipelineMode] Managed pipeline mode.
+ * Possible values include: 'Integrated', 'Classic'
+ * @member {array} [siteConfig.virtualApplications] Virtual applications.
+ * @member {string} [siteConfig.loadBalancing] Site load balancing. Possible
+ * values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [siteConfig.experiments] This is work around for polymophic
+ * types.
+ * @member {array} [siteConfig.experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [siteConfig.limits] Site limits.
+ * @member {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU
+ * usage percentage.
+ * @member {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory
+ * usage in MB.
+ * @member {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk
+ * size usage in MB.
+ * @member {boolean} [siteConfig.autoHealEnabled] true if Auto
+ * Heal is enabled; otherwise, false.
+ * @member {object} [siteConfig.autoHealRules] Auto Heal rules.
+ * @member {object} [siteConfig.autoHealRules.triggers] Conditions that
+ * describe when to execute the auto-heal actions.
+ * @member {object} [siteConfig.autoHealRules.triggers.requests] A rule based
+ * on total requests.
+ * @member {number} [siteConfig.autoHealRules.triggers.requests.count] Request
+ * Count.
+ * @member {string} [siteConfig.autoHealRules.triggers.requests.timeInterval]
+ * Time interval.
+ * @member {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A rule
+ * based on private bytes.
+ * @member {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule based
+ * on status codes.
+ * @member {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule
+ * based on request execution time.
+ * @member {string} [siteConfig.autoHealRules.triggers.slowRequests.timeTaken]
+ * Time taken.
+ * @member {number} [siteConfig.autoHealRules.triggers.slowRequests.count]
+ * Request Count.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time interval.
+ * @member {object} [siteConfig.autoHealRules.actions] Actions to be executed
+ * when a rule is triggered.
+ * @member {string} [siteConfig.autoHealRules.actions.actionType] Predefined
+ * action to be taken. Possible values include: 'Recycle', 'LogEvent',
+ * 'CustomAction'
+ * @member {object} [siteConfig.autoHealRules.actions.customAction] Custom
+ * action to be taken.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.exe]
+ * Executable to be run.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.parameters]
+ * Parameters for the executable.
+ * @member {string} [siteConfig.autoHealRules.actions.minProcessExecutionTime]
+ * Minimum time the process must execute
+ * before taking the action
+ * @member {string} [siteConfig.tracingOptions] Tracing options.
+ * @member {string} [siteConfig.vnetName] Virtual Network name.
+ * @member {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS)
+ * settings.
+ * @member {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of
+ * origins that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [siteConfig.push] Push endpoint settings.
+ * @member {boolean} [siteConfig.push.isPushEnabled] Gets or sets a flag
+ * indicating whether the Push endpoint is enabled.
+ * @member {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON
+ * string containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON
+ * string containing a list of tags that require user authentication to be used
+ * in the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON
+ * string containing a list of dynamic tags that will be evaluated from user
+ * claims in the push registration endpoint.
+ * @member {object} [siteConfig.apiDefinition] Information about the formal API
+ * definition for the app.
+ * @member {string} [siteConfig.apiDefinition.url] The URL of the API
+ * definition.
+ * @member {string} [siteConfig.autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [siteConfig.localMySqlEnabled] true to enable
+ * local MySQL; otherwise, false.
+ * @member {array} [siteConfig.ipSecurityRestrictions] IP security
+ * restrictions.
+ * @member {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a web
+ * site to allow clients to connect over http2.0
+ * @member {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the
+ * minimum version of TLS required for SSL requests. Possible values include:
+ * '1.0', '1.1', '1.2'
+ * @member {array} [trafficManagerHostNames] Azure Traffic Manager hostnames
+ * associated with the app. Read-only.
+ * @member {boolean} [scmSiteAlsoStopped] true to stop SCM (KUDU)
+ * site when the app is stopped; otherwise, false. The default is
+ * false. Default value: false .
+ * @member {string} [targetSwapSlot] Specifies which deployment slot this app
+ * will swap into. Read-only.
+ * @member {object} [hostingEnvironmentProfile] App Service Environment to use
+ * for the app.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {boolean} [clientAffinityEnabled] true to enable client
+ * affinity; false to stop sending session affinity cookies, which
+ * route client requests in the same session to the same instance. Default is
+ * true.
+ * @member {boolean} [clientCertEnabled] true to enable client
+ * certificate authentication (TLS mutual authentication); otherwise,
+ * false. Default is false.
+ * @member {boolean} [hostNamesDisabled] true to disable the
+ * public hostnames of the app; otherwise, false.
+ * If true, the app is only accessible via API management process.
+ * @member {string} [outboundIpAddresses] List of IP addresses that the app
+ * uses for outbound connections (e.g. database access). Includes VIPs from
+ * tenants that site can be hosted with current settings. Read-only.
+ * @member {string} [possibleOutboundIpAddresses] List of IP addresses that the
+ * app uses for outbound connections (e.g. database access). Includes VIPs from
+ * all tenants. Read-only.
+ * @member {number} [containerSize] Size of the function container.
+ * @member {number} [dailyMemoryTimeQuota] Maximum allowed daily memory-time
+ * quota (applicable on dynamic apps only).
+ * @member {date} [suspendedTill] App suspended till in case memory-time quota
+ * is exceeded.
+ * @member {number} [maxNumberOfWorkers] Maximum number of workers.
+ * This only applies to Functions container.
+ * @member {object} [cloningInfo] If specified during app creation, the app is
+ * cloned from a source app.
+ * @member {uuid} [cloningInfo.correlationId] Correlation ID of cloning
+ * operation. This ID ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [cloningInfo.overwrite] true to overwrite
+ * destination app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneCustomHostNames] true to
+ * clone custom hostnames from source app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneSourceControl] true to
+ * clone source control from source app; otherwise, false.
+ * @member {string} [cloningInfo.sourceWebAppId] ARM resource ID of the source
+ * app. App resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [cloningInfo.hostingEnvironment] App Service Environment.
+ * @member {object} [cloningInfo.appSettingsOverrides] Application setting
+ * overrides for cloned app. If specified, these settings override the settings
+ * cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [cloningInfo.configureLoadBalancing] true to
+ * configure load balancing for source and destination app.
+ * @member {string} [cloningInfo.trafficManagerProfileId] ARM resource ID of
+ * the Traffic Manager profile to use, if it exists. Traffic Manager resource
+ * ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [cloningInfo.trafficManagerProfileName] Name of Traffic
+ * Manager profile to create. This is only needed if Traffic Manager profile
+ * does not already exist.
+ * @member {boolean} [cloningInfo.ignoreQuotas] true if quotas
+ * should be ignored; otherwise, false.
+ * @member {object} [snapshotInfo] If specified during app creation, the app is
+ * created from a previous snapshot.
+ * @member {string} [snapshotInfo.snapshotTime] Point in time in which the app
+ * recovery should be attempted, formatted as a DateTime string.
+ * @member {object} [snapshotInfo.recoveryTarget] Specifies the web app that
+ * snapshot contents will be written to.
+ * @member {string} [snapshotInfo.recoveryTarget.location] Geographical
+ * location of the target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [snapshotInfo.recoveryTarget.id] ARM resource ID of the
+ * target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} [snapshotInfo.overwrite] If true the recovery
+ * operation can overwrite source app; otherwise, false.
+ * @member {boolean} [snapshotInfo.recoverConfiguration] If true, site
+ * configuration, in addition to content, will be reverted.
+ * @member {boolean} [snapshotInfo.ignoreConflictingHostNames] If true, custom
+ * hostname conflicts will be ignored when recovering to a target web app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ * @member {string} [resourceGroup] Name of the resource group the app belongs
+ * to. Read-only.
+ * @member {boolean} [isDefaultContainer] true if the app is a
+ * default container; otherwise, false.
+ * @member {string} [defaultHostName] Default hostname of the app. Read-only.
+ * @member {object} [slotSwapStatus] Status of the last deployment slot swap
+ * operation.
+ * @member {date} [slotSwapStatus.timestampUtc] The time the last successful
+ * slot swap completed.
+ * @member {string} [slotSwapStatus.sourceSlotName] The source slot of the last
+ * swap operation.
+ * @member {string} [slotSwapStatus.destinationSlotName] The destination slot
+ * of the last swap operation.
+ * @member {boolean} [httpsOnly] HttpsOnly: configures a web site to accept
+ * only https requests. Issues redirect for
+ * http requests
+ */
+export interface SitePatchResource extends ProxyOnlyResource {
+ readonly state?: string;
+ readonly hostNames?: string[];
+ readonly repositorySiteName?: string;
+ readonly usageState?: string;
+ enabled?: boolean;
+ readonly enabledHostNames?: string[];
+ readonly availabilityState?: string;
+ hostNameSslStates?: HostNameSslState[];
+ serverFarmId?: string;
+ reserved?: boolean;
+ readonly lastModifiedTimeUtc?: Date;
+ siteConfig?: SiteConfig;
+ readonly trafficManagerHostNames?: string[];
+ scmSiteAlsoStopped?: boolean;
+ readonly targetSwapSlot?: string;
+ hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ clientAffinityEnabled?: boolean;
+ clientCertEnabled?: boolean;
+ hostNamesDisabled?: boolean;
+ readonly outboundIpAddresses?: string;
+ readonly possibleOutboundIpAddresses?: string;
+ containerSize?: number;
+ dailyMemoryTimeQuota?: number;
+ readonly suspendedTill?: Date;
+ readonly maxNumberOfWorkers?: number;
+ cloningInfo?: CloningInfo;
+ snapshotInfo?: SnapshotRecoveryRequest;
+ readonly resourceGroup?: string;
+ readonly isDefaultContainer?: boolean;
+ readonly defaultHostName?: string;
+ readonly slotSwapStatus?: SlotSwapStatus;
+ httpsOnly?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SitePhpErrorLogFlag class.
+ * @constructor
+ * Used for getting PHP error logging flag.
+ *
+ * @member {string} [localLogErrors] Local log_errors setting.
+ * @member {string} [masterLogErrors] Master log_errors setting.
+ * @member {string} [localLogErrorsMaxLength] Local log_errors_max_len setting.
+ * @member {string} [masterLogErrorsMaxLength] Master log_errors_max_len
+ * setting.
+ */
+export interface SitePhpErrorLogFlag extends ProxyOnlyResource {
+ localLogErrors?: string;
+ masterLogErrors?: string;
+ localLogErrorsMaxLength?: string;
+ masterLogErrorsMaxLength?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteSourceControl class.
+ * @constructor
+ * Source control configuration for an app.
+ *
+ * @member {string} [repoUrl] Repository or source control URL.
+ * @member {string} [branch] Name of branch to use for deployment.
+ * @member {boolean} [isManualIntegration] true to limit to manual
+ * integration; false to enable continuous integration (which
+ * configures webhooks into online repos like GitHub).
+ * @member {boolean} [deploymentRollbackEnabled] true to enable
+ * deployment rollback; otherwise, false.
+ * @member {boolean} [isMercurial] true for a Mercurial
+ * repository; false for a Git repository.
+ */
+export interface SiteSourceControl extends ProxyOnlyResource {
+ repoUrl?: string;
+ branch?: string;
+ isManualIntegration?: boolean;
+ deploymentRollbackEnabled?: boolean;
+ isMercurial?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SlotConfigNamesResource class.
+ * @constructor
+ * Slot Config names azure resource.
+ *
+ * @member {array} [connectionStringNames] List of connection string names.
+ * @member {array} [appSettingNames] List of application settings names.
+ */
+export interface SlotConfigNamesResource extends ProxyOnlyResource {
+ connectionStringNames?: string[];
+ appSettingNames?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SlotDifference class.
+ * @constructor
+ * A setting difference between two deployment slots of an app.
+ *
+ * @member {string} [slotDifferenceType] Type of the difference: Information,
+ * Warning or Error.
+ * @member {string} [settingType] The type of the setting: General, AppSetting
+ * or ConnectionString.
+ * @member {string} [diffRule] Rule that describes how to process the setting
+ * difference during a slot swap.
+ * @member {string} [settingName] Name of the setting.
+ * @member {string} [valueInCurrentSlot] Value of the setting in the current
+ * slot.
+ * @member {string} [valueInTargetSlot] Value of the setting in the target
+ * slot.
+ * @member {string} [description] Description of the setting difference.
+ */
+export interface SlotDifference extends ProxyOnlyResource {
+ readonly slotDifferenceType?: string;
+ readonly settingType?: string;
+ readonly diffRule?: string;
+ readonly settingName?: string;
+ readonly valueInCurrentSlot?: string;
+ readonly valueInTargetSlot?: string;
+ readonly description?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Snapshot class.
+ * @constructor
+ * A snapshot of an app.
+ *
+ * @member {string} [time] The time the snapshot was taken.
+ */
+export interface Snapshot extends ProxyOnlyResource {
+ readonly time?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StorageMigrationOptions class.
+ * @constructor
+ * Options for app content migration.
+ *
+ * @member {string} azurefilesConnectionString AzureFiles connection string.
+ * @member {string} azurefilesShare AzureFiles share.
+ * @member {boolean} [switchSiteAfterMigration] trueif the app
+ * should be switched over; otherwise, false. Default value: false
+ * .
+ * @member {boolean} [blockWriteAccessToSite] true if the app
+ * should be read only during copy operation; otherwise, false.
+ * Default value: false .
+ */
+export interface StorageMigrationOptions extends ProxyOnlyResource {
+ azurefilesConnectionString: string;
+ azurefilesShare: string;
+ switchSiteAfterMigration?: boolean;
+ blockWriteAccessToSite?: boolean;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StorageMigrationResponse class.
+ * @constructor
+ * Response for a migration of app content request.
+ *
+ * @member {string} [operationId] When server starts the migration process, it
+ * will return an operation ID identifying that particular migration operation.
+ */
+export interface StorageMigrationResponse extends ProxyOnlyResource {
+ readonly operationId?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StringDictionary class.
+ * @constructor
+ * String dictionary resource.
+ *
+ * @member {object} [properties] Settings.
+ */
+export interface StringDictionary extends ProxyOnlyResource {
+ properties?: { [propertyName: string]: string };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TriggeredJobRun class.
+ * @constructor
+ * Triggered Web Job Run Information.
+ *
+ * @member {string} [triggeredJobRunId] Job ID.
+ * @member {string} [triggeredJobRunName] Job name.
+ * @member {string} [status] Job status. Possible values include: 'Success',
+ * 'Failed', 'Error'
+ * @member {date} [startTime] Start time.
+ * @member {date} [endTime] End time.
+ * @member {string} [duration] Job duration.
+ * @member {string} [outputUrl] Output URL.
+ * @member {string} [errorUrl] Error URL.
+ * @member {string} [url] Job URL.
+ * @member {string} [jobName] Job name.
+ * @member {string} [trigger] Job trigger.
+ */
+export interface TriggeredJobRun extends ProxyOnlyResource {
+ triggeredJobRunId?: string;
+ readonly triggeredJobRunName?: string;
+ status?: string;
+ startTime?: Date;
+ endTime?: Date;
+ duration?: string;
+ outputUrl?: string;
+ errorUrl?: string;
+ url?: string;
+ jobName?: string;
+ trigger?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TriggeredJobHistory class.
+ * @constructor
+ * Triggered Web Job History. List of Triggered Web Job Run Information
+ * elements.
+ *
+ * @member {array} [triggeredJobRuns] List of triggered web job runs.
+ */
+export interface TriggeredJobHistory extends ProxyOnlyResource {
+ triggeredJobRuns?: TriggeredJobRun[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TriggeredWebJob class.
+ * @constructor
+ * Triggered Web Job Information.
+ *
+ * @member {object} [latestRun] Latest job run information.
+ * @member {string} [latestRun.triggeredJobRunId] Job ID.
+ * @member {string} [latestRun.triggeredJobRunName] Job name.
+ * @member {string} [latestRun.status] Job status. Possible values include:
+ * 'Success', 'Failed', 'Error'
+ * @member {date} [latestRun.startTime] Start time.
+ * @member {date} [latestRun.endTime] End time.
+ * @member {string} [latestRun.duration] Job duration.
+ * @member {string} [latestRun.outputUrl] Output URL.
+ * @member {string} [latestRun.errorUrl] Error URL.
+ * @member {string} [latestRun.url] Job URL.
+ * @member {string} [latestRun.jobName] Job name.
+ * @member {string} [latestRun.trigger] Job trigger.
+ * @member {string} [historyUrl] History URL.
+ * @member {string} [schedulerLogsUrl] Scheduler Logs URL.
+ * @member {string} [triggeredWebJobName] Job name. Used as job identifier in
+ * ARM resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include: 'Continuous',
+ * 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+export interface TriggeredWebJob extends ProxyOnlyResource {
+ latestRun?: TriggeredJobRun;
+ historyUrl?: string;
+ schedulerLogsUrl?: string;
+ readonly triggeredWebJobName?: string;
+ runCommand?: string;
+ url?: string;
+ extraInfoUrl?: string;
+ jobType?: string;
+ error?: string;
+ usingSdk?: boolean;
+ settings?: { [propertyName: string]: any };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WebJob class.
+ * @constructor
+ * Web Job Information.
+ *
+ * @member {string} [webJobName] Job name. Used as job identifier in ARM
+ * resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include: 'Continuous',
+ * 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+export interface WebJob extends ProxyOnlyResource {
+ readonly webJobName?: string;
+ runCommand?: string;
+ url?: string;
+ extraInfoUrl?: string;
+ jobType?: string;
+ error?: string;
+ usingSdk?: boolean;
+ settings?: { [propertyName: string]: any };
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AddressResponse class.
+ * @constructor
+ * Describes main public IP address and any extra virtual IPs.
+ *
+ * @member {string} [serviceIpAddress] Main public virtual IP.
+ * @member {string} [internalIpAddress] Virtual Network internal IP address of
+ * the App Service Environment if it is in internal load-balancing mode.
+ * @member {array} [outboundIpAddresses] IP addresses appearing on outbound
+ * connections.
+ * @member {array} [vipMappings] Additional virtual IPs.
+ */
+export interface AddressResponse {
+ serviceIpAddress?: string;
+ internalIpAddress?: string;
+ outboundIpAddresses?: string[];
+ vipMappings?: VirtualIPMapping[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceEnvironmentResource class.
+ * @constructor
+ * App Service Environment ARM resource.
+ *
+ * @member {string} appServiceEnvironmentResourceName Name of the App Service
+ * Environment.
+ * @member {string} appServiceEnvironmentResourceLocation Location of the App
+ * Service Environment, e.g. "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App Service
+ * Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved for
+ * the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for the
+ * App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action on
+ * the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the App
+ * Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results of
+ * the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account associated
+ * with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment can
+ * be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended e.g.
+ * when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the behavior
+ * of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to whitelist
+ * on ASE db
+ */
+export interface AppServiceEnvironmentResource extends Resource {
+ appServiceEnvironmentResourceName: string;
+ appServiceEnvironmentResourceLocation: string;
+ readonly provisioningState?: string;
+ readonly status?: string;
+ vnetName?: string;
+ vnetResourceGroupName?: string;
+ vnetSubnetName?: string;
+ virtualNetwork: VirtualNetworkProfile;
+ internalLoadBalancingMode?: string;
+ multiSize?: string;
+ multiRoleCount?: number;
+ workerPools: WorkerPool[];
+ ipsslAddressCount?: number;
+ readonly databaseEdition?: string;
+ readonly databaseServiceObjective?: string;
+ readonly upgradeDomains?: number;
+ readonly subscriptionId?: string;
+ dnsSuffix?: string;
+ readonly lastAction?: string;
+ readonly lastActionResult?: string;
+ readonly allowedMultiSizes?: string;
+ readonly allowedWorkerSizes?: string;
+ readonly maximumNumberOfMachines?: number;
+ readonly vipMappings?: VirtualIPMapping[];
+ readonly environmentCapacities?: StampCapacity[];
+ networkAccessControlList?: NetworkAccessControlEntry[];
+ readonly environmentIsHealthy?: boolean;
+ readonly environmentStatus?: string;
+ readonly resourceGroup?: string;
+ frontEndScaleFactor?: number;
+ readonly defaultFrontEndScaleFactor?: number;
+ apiManagementAccountId?: string;
+ suspended?: boolean;
+ dynamicCacheEnabled?: boolean;
+ clusterSettings?: NameValuePair[];
+ userWhitelistedIpRanges?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceEnvironmentPatchResource class.
+ * @constructor
+ * ARM resource for a app service enviroment.
+ *
+ * @member {string} appServiceEnvironmentPatchResourceName Name of the App
+ * Service Environment.
+ * @member {string} location Location of the App Service Environment, e.g.
+ * "West US".
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ * @member {string} [status] Current status of the App Service Environment.
+ * Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
+ * @member {string} [vnetName] Name of the Virtual Network for the App Service
+ * Environment.
+ * @member {string} [vnetResourceGroupName] Resource group of the Virtual
+ * Network.
+ * @member {string} [vnetSubnetName] Subnet of the Virtual Network.
+ * @member {object} virtualNetwork Description of the Virtual Network.
+ * @member {string} [virtualNetwork.id] Resource id of the Virtual Network.
+ * @member {string} [virtualNetwork.name] Name of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.type] Resource type of the Virtual Network
+ * (read-only).
+ * @member {string} [virtualNetwork.subnet] Subnet within the Virtual Network.
+ * @member {string} [internalLoadBalancingMode] Specifies which endpoints to
+ * serve internally in the Virtual Network for the App Service Environment.
+ * Possible values include: 'None', 'Web', 'Publishing'
+ * @member {string} [multiSize] Front-end VM size, e.g. "Medium", "Large".
+ * @member {number} [multiRoleCount] Number of front-end instances.
+ * @member {array} workerPools Description of worker pools with worker size
+ * IDs, VM sizes, and number of workers in each pool.
+ * @member {number} [ipsslAddressCount] Number of IP SSL addresses reserved for
+ * the App Service Environment.
+ * @member {string} [databaseEdition] Edition of the metadata database for the
+ * App Service Environment, e.g. "Standard".
+ * @member {string} [databaseServiceObjective] Service objective of the
+ * metadata database for the App Service Environment, e.g. "S0".
+ * @member {number} [upgradeDomains] Number of upgrade domains of the App
+ * Service Environment.
+ * @member {string} [subscriptionId] Subscription of the App Service
+ * Environment.
+ * @member {string} [dnsSuffix] DNS suffix of the App Service Environment.
+ * @member {string} [lastAction] Last deployment action on the App Service
+ * Environment.
+ * @member {string} [lastActionResult] Result of the last deployment action on
+ * the App Service Environment.
+ * @member {string} [allowedMultiSizes] List of comma separated strings
+ * describing which VM sizes are allowed for front-ends.
+ * @member {string} [allowedWorkerSizes] List of comma separated strings
+ * describing which VM sizes are allowed for workers.
+ * @member {number} [maximumNumberOfMachines] Maximum number of VMs in the App
+ * Service Environment.
+ * @member {array} [vipMappings] Description of IP SSL mapping for the App
+ * Service Environment.
+ * @member {array} [environmentCapacities] Current total, used, and available
+ * worker capacities.
+ * @member {array} [networkAccessControlList] Access control list for
+ * controlling traffic to the App Service Environment.
+ * @member {boolean} [environmentIsHealthy] True/false indicating whether the
+ * App Service Environment is healthy.
+ * @member {string} [environmentStatus] Detailed message about with results of
+ * the last check of the App Service Environment.
+ * @member {string} [resourceGroup] Resource group of the App Service
+ * Environment.
+ * @member {number} [frontEndScaleFactor] Scale factor for front-ends.
+ * @member {number} [defaultFrontEndScaleFactor] Default Scale Factor for
+ * FrontEnds.
+ * @member {string} [apiManagementAccountId] API Management Account associated
+ * with the App Service Environment.
+ * @member {boolean} [suspended] true if the App Service
+ * Environment is suspended; otherwise, false. The environment can
+ * be suspended, e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {boolean} [dynamicCacheEnabled] True/false indicating whether the
+ * App Service Environment is suspended. The environment can be suspended e.g.
+ * when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ * @member {array} [clusterSettings] Custom settings for changing the behavior
+ * of the App Service Environment.
+ * @member {array} [userWhitelistedIpRanges] User added ip ranges to whitelist
+ * on ASE db
+ */
+export interface AppServiceEnvironmentPatchResource extends ProxyOnlyResource {
+ appServiceEnvironmentPatchResourceName: string;
+ location: string;
+ readonly provisioningState?: string;
+ readonly status?: string;
+ vnetName?: string;
+ vnetResourceGroupName?: string;
+ vnetSubnetName?: string;
+ virtualNetwork: VirtualNetworkProfile;
+ internalLoadBalancingMode?: string;
+ multiSize?: string;
+ multiRoleCount?: number;
+ workerPools: WorkerPool[];
+ ipsslAddressCount?: number;
+ readonly databaseEdition?: string;
+ readonly databaseServiceObjective?: string;
+ readonly upgradeDomains?: number;
+ readonly subscriptionId?: string;
+ dnsSuffix?: string;
+ readonly lastAction?: string;
+ readonly lastActionResult?: string;
+ readonly allowedMultiSizes?: string;
+ readonly allowedWorkerSizes?: string;
+ readonly maximumNumberOfMachines?: number;
+ readonly vipMappings?: VirtualIPMapping[];
+ readonly environmentCapacities?: StampCapacity[];
+ networkAccessControlList?: NetworkAccessControlEntry[];
+ readonly environmentIsHealthy?: boolean;
+ readonly environmentStatus?: string;
+ readonly resourceGroup?: string;
+ frontEndScaleFactor?: number;
+ readonly defaultFrontEndScaleFactor?: number;
+ apiManagementAccountId?: string;
+ suspended?: boolean;
+ dynamicCacheEnabled?: boolean;
+ clusterSettings?: NameValuePair[];
+ userWhitelistedIpRanges?: string[];
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostingEnvironmentDiagnostics class.
+ * @constructor
+ * Diagnostics for an App Service Environment.
+ *
+ * @member {string} [name] Name/identifier of the diagnostics.
+ * @member {string} [diagnosicsOutput] Diagnostics output.
+ */
+export interface HostingEnvironmentDiagnostics {
+ name?: string;
+ diagnosicsOutput?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MetricAvailabilily class.
+ * @constructor
+ * Metric availability and retention.
+ *
+ * @member {string} [timeGrain] Time grain.
+ * @member {string} [retention] Retention period for the current time grain.
+ */
+export interface MetricAvailabilily {
+ timeGrain?: string;
+ retention?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the MetricDefinition class.
+ * @constructor
+ * Metadata for a metric.
+ *
+ * @member {string} [metricDefinitionName] Name of the metric.
+ * @member {string} [unit] Unit of the metric.
+ * @member {string} [primaryAggregationType] Primary aggregation type.
+ * @member {array} [metricAvailabilities] List of time grains supported for the
+ * metric together with retention period.
+ * @member {string} [displayName] Friendly name shown in the UI.
+ */
+export interface MetricDefinition extends ProxyOnlyResource {
+ readonly metricDefinitionName?: string;
+ readonly unit?: string;
+ readonly primaryAggregationType?: string;
+ readonly metricAvailabilities?: MetricAvailabilily[];
+ readonly displayName?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SkuInfo class.
+ * @constructor
+ * SKU discovery information.
+ *
+ * @member {string} [resourceType] Resource type that this SKU applies to.
+ * @member {object} [sku] Name and tier of the SKU.
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to the
+ * resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of the
+ * SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale configurations
+ * for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ * @member {object} [capacity] Min, max, and default scale values of the SKU.
+ * @member {number} [capacity.minimum] Minimum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.maximum] Maximum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.default] Default number of workers for this App
+ * Service plan SKU.
+ * @member {string} [capacity.scaleType] Available scale configurations for an
+ * App Service plan.
+ */
+export interface SkuInfo {
+ resourceType?: string;
+ sku?: SkuDescription;
+ capacity?: SkuCapacity;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the Usage class.
+ * @constructor
+ * Usage of the quota resource.
+ *
+ * @member {string} [displayName] Friendly name shown in the UI.
+ * @member {string} [usageName] Name of the quota.
+ * @member {string} [resourceName] Name of the quota resource.
+ * @member {string} [unit] Units of measurement for the quota resource.
+ * @member {number} [currentValue] The current value of the resource counter.
+ * @member {number} [limit] The resource limit.
+ * @member {date} [nextResetTime] Next reset time for the resource counter.
+ * @member {string} [computeMode] Compute mode used for this usage. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [siteMode] Site mode used for this usage.
+ */
+export interface Usage extends ProxyOnlyResource {
+ readonly displayName?: string;
+ readonly usageName?: string;
+ readonly resourceName?: string;
+ readonly unit?: string;
+ readonly currentValue?: number;
+ readonly limit?: number;
+ readonly nextResetTime?: Date;
+ readonly computeMode?: string;
+ readonly siteMode?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WorkerPoolResource class.
+ * @constructor
+ * Worker pool of an App Service Environment ARM resource.
+ *
+ * @member {number} [workerSizeId] Worker size ID for referencing this worker
+ * pool.
+ * @member {string} [computeMode] Shared or dedicated app hosting. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] VM size of the worker pool instances.
+ * @member {number} [workerCount] Number of instances in the worker pool.
+ * @member {array} [instanceNames] Names of all instances in the worker pool
+ * (read only).
+ * @member {object} [sku]
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to the
+ * resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of the
+ * SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale configurations
+ * for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+export interface WorkerPoolResource extends ProxyOnlyResource {
+ workerSizeId?: number;
+ computeMode?: string;
+ workerSize?: string;
+ workerCount?: number;
+ readonly instanceNames?: string[];
+ sku?: SkuDescription;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServicePlanPatchResource class.
+ * @constructor
+ * ARM resource for a app service plan.
+ *
+ * @member {string} appServicePlanPatchResourceName Name for the App Service
+ * plan.
+ * @member {string} [workerTierName] Target worker tier assigned to the App
+ * Service plan.
+ * @member {string} [status] App Service plan status. Possible values include:
+ * 'Ready', 'Pending', 'Creating'
+ * @member {string} [subscription] App Service plan subscription.
+ * @member {string} [adminSiteName] App Service plan administration site.
+ * @member {object} [hostingEnvironmentProfile] Specification for the App
+ * Service Environment to use for the App Service plan.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {number} [maximumNumberOfWorkers] Maximum number of instances that
+ * can be assigned to this App Service plan.
+ * @member {string} [geoRegion] Geographical location for the App Service plan.
+ * @member {boolean} [perSiteScaling] If true, apps assigned to
+ * this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan. Default value: false .
+ * @member {number} [numberOfSites] Number of apps assigned to this App Service
+ * plan.
+ * @member {boolean} [isSpot] If true, this App Service Plan owns
+ * spot instances.
+ * @member {date} [spotExpirationTime] The time when the server farm expires.
+ * Valid only if it is a spot server farm.
+ * @member {string} [resourceGroup] Resource group of the App Service plan.
+ * @member {boolean} [reserved] If Linux app service plan true,
+ * false otherwise. Default value: false .
+ * @member {number} [targetWorkerCount] Scaling worker count.
+ * @member {number} [targetWorkerSizeId] Scaling worker size ID.
+ * @member {string} [provisioningState] Provisioning state of the App Service
+ * Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled',
+ * 'InProgress', 'Deleting'
+ */
+export interface AppServicePlanPatchResource extends ProxyOnlyResource {
+ appServicePlanPatchResourceName: string;
+ workerTierName?: string;
+ readonly status?: string;
+ readonly subscription?: string;
+ adminSiteName?: string;
+ hostingEnvironmentProfile?: HostingEnvironmentProfile;
+ readonly maximumNumberOfWorkers?: number;
+ readonly geoRegion?: string;
+ perSiteScaling?: boolean;
+ readonly numberOfSites?: number;
+ isSpot?: boolean;
+ spotExpirationTime?: Date;
+ readonly resourceGroup?: string;
+ reserved?: boolean;
+ targetWorkerCount?: number;
+ targetWorkerSizeId?: number;
+ readonly provisioningState?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HybridConnectionLimits class.
+ * @constructor
+ * Hybrid Connection limits contract. This is used to return the plan limits of
+ * Hybrid Connections.
+ *
+ * @member {number} [current] The current number of Hybrid Connections.
+ * @member {number} [maximum] The maximum number of Hybrid Connections allowed.
+ */
+export interface HybridConnectionLimits extends ProxyOnlyResource {
+ readonly current?: number;
+ readonly maximum?: number;
+}
+
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificateOrderCollection class.
+ * @constructor
+ * Collection of certitificate orders.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface AppServiceCertificateOrderCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceCertificateCollection class.
+ * @constructor
+ * Collection of certitificateorder certificates.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface AppServiceCertificateCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmOperationCollection class.
+ * @constructor
+ * Collection of Azure resource manager operation metadata.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface CsmOperationCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainCollection class.
+ * @constructor
+ * Collection of domains.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DomainCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the NameIdentifierCollection class.
+ * @constructor
+ * Collection of domain name identifiers.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface NameIdentifierCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DomainOwnershipIdentifierCollection class.
+ * @constructor
+ * Collection of domain ownership identifiers.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DomainOwnershipIdentifierCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TopLevelDomainCollection class.
+ * @constructor
+ * Collection of Top-level domains.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface TopLevelDomainCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TldLegalAgreementCollection class.
+ * @constructor
+ * Collection of top-level domain legal agreements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface TldLegalAgreementCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CertificateCollection class.
+ * @constructor
+ * Collection of certificates.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface CertificateCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DeletedWebAppCollection class.
+ * @constructor
+ * Collection of deleted apps.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DeletedWebAppCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticCategoryCollection class.
+ * @constructor
+ * Collection of Diagnostic Categories
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DiagnosticCategoryCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticAnalysisCollection class.
+ * @constructor
+ * Collection of Diagnostic Analyses
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DiagnosticAnalysisCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DiagnosticDetectorCollection class.
+ * @constructor
+ * Collection of Diagnostic Detectors
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DiagnosticDetectorCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ApplicationStackCollection class.
+ * @constructor
+ * Collection of Application Stacks
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ApplicationStackCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the RecommendationCollection class.
+ * @constructor
+ * Collection of recommendations.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface RecommendationCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceHealthMetadataCollection class.
+ * @constructor
+ * Collection of resource health metadata.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ResourceHealthMetadataCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SourceControlCollection class.
+ * @constructor
+ * Collection of source controls.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SourceControlCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the GeoRegionCollection class.
+ * @constructor
+ * Collection of geographical regions.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface GeoRegionCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the IdentifierCollection class.
+ * @constructor
+ * Collection of identifiers.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface IdentifierCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PremierAddOnOfferCollection class.
+ * @constructor
+ * Collection of premier add-on offers.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface PremierAddOnOfferCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BillingMeterCollection class.
+ * @constructor
+ * Collection of Billing Meters
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface BillingMeterCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WebAppCollection class.
+ * @constructor
+ * Collection of App Service apps.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface WebAppCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the BackupItemCollection class.
+ * @constructor
+ * Collection of backup items.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface BackupItemCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteConfigResourceCollection class.
+ * @constructor
+ * Collection of site configurations.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SiteConfigResourceCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteConfigurationSnapshotInfoCollection class.
+ * @constructor
+ * Collection of metadata for the app configuration snapshots that can be
+ * restored.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SiteConfigurationSnapshotInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ContinuousWebJobCollection class.
+ * @constructor
+ * Collection of Kudu continuous web job information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ContinuousWebJobCollection extends Array {
+ nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the DeploymentCollection class.
+ * @constructor
+ * Collection of app deployments.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface DeploymentCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the FunctionEnvelopeCollection class.
+ * @constructor
+ * Collection of Kudu function information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface FunctionEnvelopeCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HostNameBindingCollection class.
+ * @constructor
+ * Collection of hostname bindings.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface HostNameBindingCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WebAppInstanceCollection class.
+ * @constructor
+ * Collection of app instances.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface WebAppInstanceCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessInfoCollection class.
+ * @constructor
+ * Collection of Kudu process information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ProcessInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessModuleInfoCollection class.
+ * @constructor
+ * Collection of Kudu thread information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ProcessModuleInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ProcessThreadInfoCollection class.
+ * @constructor
+ * Collection of Kudu thread information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ProcessThreadInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricDefinitionCollection class.
+ * @constructor
+ * Collection of metric definitions.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ResourceMetricDefinitionCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceMetricCollection class.
+ * @constructor
+ * Collection of metric responses.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ResourceMetricCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PerfMonCounterCollection class.
+ * @constructor
+ * Collection of performance monitor counters.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface PerfMonCounterCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the PublicCertificateCollection class.
+ * @constructor
+ * Collection of public certificates
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface PublicCertificateCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SiteExtensionInfoCollection class.
+ * @constructor
+ * Collection of Kudu site extension information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SiteExtensionInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SlotDifferenceCollection class.
+ * @constructor
+ * Collection of slot differences.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SlotDifferenceCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SnapshotCollection class.
+ * @constructor
+ * Collection of snapshots which can be used to revert an app to a previous
+ * time.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SnapshotCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TriggeredWebJobCollection class.
+ * @constructor
+ * Collection of Kudu continuous web job information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface TriggeredWebJobCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the TriggeredJobHistoryCollection class.
+ * @constructor
+ * Collection of Kudu continuous web job information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface TriggeredJobHistoryCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the CsmUsageQuotaCollection class.
+ * @constructor
+ * Collection of CSM usage quotas.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface CsmUsageQuotaCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WebJobCollection class.
+ * @constructor
+ * Collection of Kudu web job information elements.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface WebJobCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServiceEnvironmentCollection class.
+ * @constructor
+ * Collection of App Service Environments.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface AppServiceEnvironmentCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the StampCapacityCollection class.
+ * @constructor
+ * Collection of stamp capacities.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface StampCapacityCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the WorkerPoolCollection class.
+ * @constructor
+ * Collection of worker pools.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface WorkerPoolCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the SkuInfoCollection class.
+ * @constructor
+ * Collection of SKU information.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface SkuInfoCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the UsageCollection class.
+ * @constructor
+ * Collection of usages.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface UsageCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the AppServicePlanCollection class.
+ * @constructor
+ * Collection of App Service plans.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface AppServicePlanCollection extends Array {
+ nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the ResourceCollection class.
+ * @constructor
+ * Collection of resources.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface ResourceCollection extends Array {
+ readonly nextLink?: string;
+}
+
+/**
+ * @class
+ * Initializes a new instance of the HybridConnectionCollection class.
+ * @constructor
+ * Collection of hostname bindings.
+ *
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+export interface HybridConnectionCollection extends Array {
+ readonly nextLink?: string;
+}
diff --git a/lib/services/websiteManagement2/lib/lib/models/index.js b/lib/services/websiteManagement2/lib/lib/models/index.js
new file mode 100644
index 0000000000..af2e518523
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/index.js
@@ -0,0 +1,278 @@
+/*
+ * 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.
+ */
+
+/* jshint latedef:false */
+/* jshint forin:false */
+/* jshint noempty:false */
+
+'use strict';
+
+var msRestAzure = require('ms-rest-azure');
+
+exports.BaseResource = msRestAzure.BaseResource;
+exports.CloudError = msRestAzure.CloudError;
+exports.AppServiceCertificate = require('./appServiceCertificate');
+exports.Resource = require('./resource');
+exports.AppServiceCertificateResource = require('./appServiceCertificateResource');
+exports.CertificateDetails = require('./certificateDetails');
+exports.AppServiceCertificateOrder = require('./appServiceCertificateOrder');
+exports.ProxyOnlyResource = require('./proxyOnlyResource');
+exports.AppServiceCertificateOrderPatchResource = require('./appServiceCertificateOrderPatchResource');
+exports.AppServiceCertificatePatchResource = require('./appServiceCertificatePatchResource');
+exports.CertificateEmail = require('./certificateEmail');
+exports.CertificateOrderAction = require('./certificateOrderAction');
+exports.ReissueCertificateOrderRequest = require('./reissueCertificateOrderRequest');
+exports.RenewCertificateOrderRequest = require('./renewCertificateOrderRequest');
+exports.SiteSeal = require('./siteSeal');
+exports.SiteSealRequest = require('./siteSealRequest');
+exports.VnetRoute = require('./vnetRoute');
+exports.VnetInfo = require('./vnetInfo');
+exports.VnetGateway = require('./vnetGateway');
+exports.User = require('./user');
+exports.SnapshotRecoveryTarget = require('./snapshotRecoveryTarget');
+exports.SnapshotRecoveryRequest = require('./snapshotRecoveryRequest');
+exports.ResourceMetricAvailability = require('./resourceMetricAvailability');
+exports.ResourceMetricName = require('./resourceMetricName');
+exports.ResourceMetricDefinition = require('./resourceMetricDefinition');
+exports.PushSettings = require('./pushSettings');
+exports.Identifier = require('./identifier');
+exports.HybridConnectionKey = require('./hybridConnectionKey');
+exports.HybridConnection = require('./hybridConnection');
+exports.ManagedServiceIdentity = require('./managedServiceIdentity');
+exports.SlotSwapStatus = require('./slotSwapStatus');
+exports.CloningInfo = require('./cloningInfo');
+exports.HostingEnvironmentProfile = require('./hostingEnvironmentProfile');
+exports.IpSecurityRestriction = require('./ipSecurityRestriction');
+exports.ApiDefinitionInfo = require('./apiDefinitionInfo');
+exports.CorsSettings = require('./corsSettings');
+exports.AutoHealCustomAction = require('./autoHealCustomAction');
+exports.AutoHealActions = require('./autoHealActions');
+exports.SlowRequestsBasedTrigger = require('./slowRequestsBasedTrigger');
+exports.StatusCodesBasedTrigger = require('./statusCodesBasedTrigger');
+exports.RequestsBasedTrigger = require('./requestsBasedTrigger');
+exports.AutoHealTriggers = require('./autoHealTriggers');
+exports.AutoHealRules = require('./autoHealRules');
+exports.SiteLimits = require('./siteLimits');
+exports.RampUpRule = require('./rampUpRule');
+exports.Experiments = require('./experiments');
+exports.VirtualDirectory = require('./virtualDirectory');
+exports.VirtualApplication = require('./virtualApplication');
+exports.HandlerMapping = require('./handlerMapping');
+exports.SiteMachineKey = require('./siteMachineKey');
+exports.ConnStringInfo = require('./connStringInfo');
+exports.NameValuePair = require('./nameValuePair');
+exports.SiteConfig = require('./siteConfig');
+exports.HostNameSslState = require('./hostNameSslState');
+exports.Site = require('./site');
+exports.Capability = require('./capability');
+exports.SkuCapacity = require('./skuCapacity');
+exports.SkuDescription = require('./skuDescription');
+exports.AppServicePlan = require('./appServicePlan');
+exports.NameIdentifier = require('./nameIdentifier');
+exports.MetricAvailability = require('./metricAvailability');
+exports.Dimension = require('./dimension');
+exports.MetricSpecification = require('./metricSpecification');
+exports.ServiceSpecification = require('./serviceSpecification');
+exports.CsmOperationDescriptionProperties = require('./csmOperationDescriptionProperties');
+exports.CsmOperationDisplay = require('./csmOperationDisplay');
+exports.CsmOperationDescription = require('./csmOperationDescription');
+exports.Address = require('./address');
+exports.Contact = require('./contact');
+exports.HostName = require('./hostName');
+exports.DomainPurchaseConsent = require('./domainPurchaseConsent');
+exports.Domain = require('./domain');
+exports.DomainAvailablilityCheckResult = require('./domainAvailablilityCheckResult');
+exports.DomainControlCenterSsoRequest = require('./domainControlCenterSsoRequest');
+exports.DomainOwnershipIdentifier = require('./domainOwnershipIdentifier');
+exports.DomainPatchResource = require('./domainPatchResource');
+exports.DomainRecommendationSearchParameters = require('./domainRecommendationSearchParameters');
+exports.ErrorResponse = require('./errorResponse');
+exports.TldLegalAgreement = require('./tldLegalAgreement');
+exports.TopLevelDomain = require('./topLevelDomain');
+exports.TopLevelDomainAgreementOption = require('./topLevelDomainAgreementOption');
+exports.Certificate = require('./certificate');
+exports.CertificatePatchResource = require('./certificatePatchResource');
+exports.VirtualNetworkProfile = require('./virtualNetworkProfile');
+exports.WorkerPool = require('./workerPool');
+exports.VirtualIPMapping = require('./virtualIPMapping');
+exports.StampCapacity = require('./stampCapacity');
+exports.NetworkAccessControlEntry = require('./networkAccessControlEntry');
+exports.AppServiceEnvironment = require('./appServiceEnvironment');
+exports.LocalizableString = require('./localizableString');
+exports.CsmUsageQuota = require('./csmUsageQuota');
+exports.ErrorEntity = require('./errorEntity');
+exports.DefaultErrorResponseErrorDetailsItem = require('./defaultErrorResponseErrorDetailsItem');
+exports.DefaultErrorResponseError = require('./defaultErrorResponseError');
+exports.DefaultErrorResponse = require('./defaultErrorResponse');
+exports.Operation = require('./operation');
+exports.ResourceMetricProperty = require('./resourceMetricProperty');
+exports.ResourceMetricValue = require('./resourceMetricValue');
+exports.ResourceMetric = require('./resourceMetric');
+exports.DeletedSite = require('./deletedSite');
+exports.Solution = require('./solution');
+exports.DetectorAbnormalTimePeriod = require('./detectorAbnormalTimePeriod');
+exports.AbnormalTimePeriod = require('./abnormalTimePeriod');
+exports.DetectorDefinition = require('./detectorDefinition');
+exports.DiagnosticMetricSample = require('./diagnosticMetricSample');
+exports.DiagnosticMetricSet = require('./diagnosticMetricSet');
+exports.DataSource = require('./dataSource');
+exports.ResponseMetaData = require('./responseMetaData');
+exports.AnalysisData = require('./analysisData');
+exports.AnalysisDefinition = require('./analysisDefinition');
+exports.DiagnosticAnalysis = require('./diagnosticAnalysis');
+exports.DiagnosticCategory = require('./diagnosticCategory');
+exports.DiagnosticDetectorResponse = require('./diagnosticDetectorResponse');
+exports.StackMinorVersion = require('./stackMinorVersion');
+exports.StackMajorVersion = require('./stackMajorVersion');
+exports.ApplicationStack = require('./applicationStack');
+exports.Recommendation = require('./recommendation');
+exports.RecommendationRule = require('./recommendationRule');
+exports.ResourceHealthMetadata = require('./resourceHealthMetadata');
+exports.BillingMeter = require('./billingMeter');
+exports.CsmMoveResourceEnvelope = require('./csmMoveResourceEnvelope');
+exports.GeoRegion = require('./geoRegion');
+exports.HostingEnvironmentDeploymentInfo = require('./hostingEnvironmentDeploymentInfo');
+exports.DeploymentLocations = require('./deploymentLocations');
+exports.GlobalCsmSkuDescription = require('./globalCsmSkuDescription');
+exports.PremierAddOnOffer = require('./premierAddOnOffer');
+exports.ResourceNameAvailability = require('./resourceNameAvailability');
+exports.ResourceNameAvailabilityRequest = require('./resourceNameAvailabilityRequest');
+exports.SkuInfos = require('./skuInfos');
+exports.SourceControl = require('./sourceControl');
+exports.ValidateRequest = require('./validateRequest');
+exports.ValidateResponseError = require('./validateResponseError');
+exports.ValidateResponse = require('./validateResponse');
+exports.VnetParameters = require('./vnetParameters');
+exports.VnetValidationTestFailure = require('./vnetValidationTestFailure');
+exports.VnetValidationFailureDetails = require('./vnetValidationFailureDetails');
+exports.FileSystemApplicationLogsConfig = require('./fileSystemApplicationLogsConfig');
+exports.AzureTableStorageApplicationLogsConfig = require('./azureTableStorageApplicationLogsConfig');
+exports.AzureBlobStorageApplicationLogsConfig = require('./azureBlobStorageApplicationLogsConfig');
+exports.ApplicationLogsConfig = require('./applicationLogsConfig');
+exports.AzureBlobStorageHttpLogsConfig = require('./azureBlobStorageHttpLogsConfig');
+exports.DatabaseBackupSetting = require('./databaseBackupSetting');
+exports.BackupItem = require('./backupItem');
+exports.BackupSchedule = require('./backupSchedule');
+exports.BackupRequest = require('./backupRequest');
+exports.ConnStringValueTypePair = require('./connStringValueTypePair');
+exports.ConnectionStringDictionary = require('./connectionStringDictionary');
+exports.ContinuousWebJob = require('./continuousWebJob');
+exports.CsmPublishingProfileOptions = require('./csmPublishingProfileOptions');
+exports.CsmSlotEntity = require('./csmSlotEntity');
+exports.CustomHostnameAnalysisResult = require('./customHostnameAnalysisResult');
+exports.Deployment = require('./deployment');
+exports.EnabledConfig = require('./enabledConfig');
+exports.FileSystemHttpLogsConfig = require('./fileSystemHttpLogsConfig');
+exports.FunctionEnvelope = require('./functionEnvelope');
+exports.FunctionSecrets = require('./functionSecrets');
+exports.HostNameBinding = require('./hostNameBinding');
+exports.HttpLogsConfig = require('./httpLogsConfig');
+exports.MSDeploy = require('./mSDeploy');
+exports.MSDeployLogEntry = require('./mSDeployLogEntry');
+exports.MSDeployLog = require('./mSDeployLog');
+exports.MSDeployStatus = require('./mSDeployStatus');
+exports.MigrateMySqlRequest = require('./migrateMySqlRequest');
+exports.MigrateMySqlStatus = require('./migrateMySqlStatus');
+exports.RelayServiceConnectionEntity = require('./relayServiceConnectionEntity');
+exports.NetworkFeatures = require('./networkFeatures');
+exports.PerfMonSample = require('./perfMonSample');
+exports.PerfMonSet = require('./perfMonSet');
+exports.PerfMonResponse = require('./perfMonResponse');
+exports.PremierAddOn = require('./premierAddOn');
+exports.ProcessThreadInfo = require('./processThreadInfo');
+exports.ProcessModuleInfo = require('./processModuleInfo');
+exports.ProcessInfo = require('./processInfo');
+exports.PublicCertificate = require('./publicCertificate');
+exports.RestoreRequest = require('./restoreRequest');
+exports.RestoreResponse = require('./restoreResponse');
+exports.SiteAuthSettings = require('./siteAuthSettings');
+exports.SiteCloneabilityCriterion = require('./siteCloneabilityCriterion');
+exports.SiteCloneability = require('./siteCloneability');
+exports.SiteConfigResource = require('./siteConfigResource');
+exports.SiteConfigurationSnapshotInfo = require('./siteConfigurationSnapshotInfo');
+exports.SiteExtensionInfo = require('./siteExtensionInfo');
+exports.SiteInstance = require('./siteInstance');
+exports.SiteLogsConfig = require('./siteLogsConfig');
+exports.SitePatchResource = require('./sitePatchResource');
+exports.SitePhpErrorLogFlag = require('./sitePhpErrorLogFlag');
+exports.SiteSourceControl = require('./siteSourceControl');
+exports.SlotConfigNamesResource = require('./slotConfigNamesResource');
+exports.SlotDifference = require('./slotDifference');
+exports.Snapshot = require('./snapshot');
+exports.StorageMigrationOptions = require('./storageMigrationOptions');
+exports.StorageMigrationResponse = require('./storageMigrationResponse');
+exports.StringDictionary = require('./stringDictionary');
+exports.TriggeredJobRun = require('./triggeredJobRun');
+exports.TriggeredJobHistory = require('./triggeredJobHistory');
+exports.TriggeredWebJob = require('./triggeredWebJob');
+exports.WebJob = require('./webJob');
+exports.AddressResponse = require('./addressResponse');
+exports.AppServiceEnvironmentResource = require('./appServiceEnvironmentResource');
+exports.AppServiceEnvironmentPatchResource = require('./appServiceEnvironmentPatchResource');
+exports.HostingEnvironmentDiagnostics = require('./hostingEnvironmentDiagnostics');
+exports.MetricAvailabilily = require('./metricAvailabilily');
+exports.MetricDefinition = require('./metricDefinition');
+exports.SkuInfo = require('./skuInfo');
+exports.Usage = require('./usage');
+exports.WorkerPoolResource = require('./workerPoolResource');
+exports.AppServicePlanPatchResource = require('./appServicePlanPatchResource');
+exports.HybridConnectionLimits = require('./hybridConnectionLimits');
+exports.AppServiceCertificateOrderCollection = require('./appServiceCertificateOrderCollection');
+exports.AppServiceCertificateCollection = require('./appServiceCertificateCollection');
+exports.CsmOperationCollection = require('./csmOperationCollection');
+exports.DomainCollection = require('./domainCollection');
+exports.NameIdentifierCollection = require('./nameIdentifierCollection');
+exports.DomainOwnershipIdentifierCollection = require('./domainOwnershipIdentifierCollection');
+exports.TopLevelDomainCollection = require('./topLevelDomainCollection');
+exports.TldLegalAgreementCollection = require('./tldLegalAgreementCollection');
+exports.CertificateCollection = require('./certificateCollection');
+exports.DeletedWebAppCollection = require('./deletedWebAppCollection');
+exports.DiagnosticCategoryCollection = require('./diagnosticCategoryCollection');
+exports.DiagnosticAnalysisCollection = require('./diagnosticAnalysisCollection');
+exports.DiagnosticDetectorCollection = require('./diagnosticDetectorCollection');
+exports.ApplicationStackCollection = require('./applicationStackCollection');
+exports.RecommendationCollection = require('./recommendationCollection');
+exports.ResourceHealthMetadataCollection = require('./resourceHealthMetadataCollection');
+exports.SourceControlCollection = require('./sourceControlCollection');
+exports.GeoRegionCollection = require('./geoRegionCollection');
+exports.IdentifierCollection = require('./identifierCollection');
+exports.PremierAddOnOfferCollection = require('./premierAddOnOfferCollection');
+exports.BillingMeterCollection = require('./billingMeterCollection');
+exports.WebAppCollection = require('./webAppCollection');
+exports.BackupItemCollection = require('./backupItemCollection');
+exports.SiteConfigResourceCollection = require('./siteConfigResourceCollection');
+exports.SiteConfigurationSnapshotInfoCollection = require('./siteConfigurationSnapshotInfoCollection');
+exports.ContinuousWebJobCollection = require('./continuousWebJobCollection');
+exports.DeploymentCollection = require('./deploymentCollection');
+exports.FunctionEnvelopeCollection = require('./functionEnvelopeCollection');
+exports.HostNameBindingCollection = require('./hostNameBindingCollection');
+exports.WebAppInstanceCollection = require('./webAppInstanceCollection');
+exports.ProcessInfoCollection = require('./processInfoCollection');
+exports.ProcessModuleInfoCollection = require('./processModuleInfoCollection');
+exports.ProcessThreadInfoCollection = require('./processThreadInfoCollection');
+exports.ResourceMetricDefinitionCollection = require('./resourceMetricDefinitionCollection');
+exports.ResourceMetricCollection = require('./resourceMetricCollection');
+exports.PerfMonCounterCollection = require('./perfMonCounterCollection');
+exports.PublicCertificateCollection = require('./publicCertificateCollection');
+exports.SiteExtensionInfoCollection = require('./siteExtensionInfoCollection');
+exports.SlotDifferenceCollection = require('./slotDifferenceCollection');
+exports.SnapshotCollection = require('./snapshotCollection');
+exports.TriggeredWebJobCollection = require('./triggeredWebJobCollection');
+exports.TriggeredJobHistoryCollection = require('./triggeredJobHistoryCollection');
+exports.CsmUsageQuotaCollection = require('./csmUsageQuotaCollection');
+exports.WebJobCollection = require('./webJobCollection');
+exports.AppServiceEnvironmentCollection = require('./appServiceEnvironmentCollection');
+exports.StampCapacityCollection = require('./stampCapacityCollection');
+exports.WorkerPoolCollection = require('./workerPoolCollection');
+exports.SkuInfoCollection = require('./skuInfoCollection');
+exports.UsageCollection = require('./usageCollection');
+exports.AppServicePlanCollection = require('./appServicePlanCollection');
+exports.ResourceCollection = require('./resourceCollection');
+exports.HybridConnectionCollection = require('./hybridConnectionCollection');
diff --git a/lib/services/websiteManagement2/lib/lib/models/ipSecurityRestriction.js b/lib/services/websiteManagement2/lib/lib/models/ipSecurityRestriction.js
new file mode 100644
index 0000000000..c9589edfc8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/ipSecurityRestriction.js
@@ -0,0 +1,62 @@
+/*
+ * 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';
+
+/**
+ * IP security restriction on an app.
+ *
+ */
+class IpSecurityRestriction {
+ /**
+ * Create a IpSecurityRestriction.
+ * @member {string} ipAddress IP address the security restriction is valid
+ * for.
+ * @member {string} [subnetMask] Subnet mask for the range of IP addresses
+ * the restriction is valid for.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of IpSecurityRestriction
+ *
+ * @returns {object} metadata of IpSecurityRestriction
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'IpSecurityRestriction',
+ type: {
+ name: 'Composite',
+ className: 'IpSecurityRestriction',
+ modelProperties: {
+ ipAddress: {
+ required: true,
+ serializedName: 'ipAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ subnetMask: {
+ required: false,
+ serializedName: 'subnetMask',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = IpSecurityRestriction;
diff --git a/lib/services/websiteManagement2/lib/lib/models/localizableString.js b/lib/services/websiteManagement2/lib/lib/models/localizableString.js
new file mode 100644
index 0000000000..0f464c7fe5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/localizableString.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Localizable string object containing the name and a localized value.
+ *
+ */
+class LocalizableString {
+ /**
+ * Create a LocalizableString.
+ * @member {string} [value] Non-localized name.
+ * @member {string} [localizedValue] Localized name.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of LocalizableString
+ *
+ * @returns {object} metadata of LocalizableString
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'LocalizableString',
+ type: {
+ name: 'Composite',
+ className: 'LocalizableString',
+ modelProperties: {
+ value: {
+ required: false,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ },
+ localizedValue: {
+ required: false,
+ serializedName: 'localizedValue',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = LocalizableString;
diff --git a/lib/services/websiteManagement2/lib/lib/models/mSDeploy.js b/lib/services/websiteManagement2/lib/lib/models/mSDeploy.js
new file mode 100644
index 0000000000..89bfbd351f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/mSDeploy.js
@@ -0,0 +1,152 @@
+/*
+ * 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');
+
+/**
+ * MSDeploy ARM PUT information
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MSDeploy extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MSDeploy.
+ * @member {string} [packageUri] Package URI
+ * @member {string} [connectionString] SQL Connection String
+ * @member {string} [dbType] Database Type
+ * @member {string} [setParametersXmlFileUri] URI of MSDeploy Parameters
+ * file. Must not be set if SetParameters is used.
+ * @member {object} [setParameters] MSDeploy Parameters. Must not be set if
+ * SetParametersXmlFileUri is used.
+ * @member {boolean} [skipAppData] Controls whether the MSDeploy operation
+ * skips the App_Data directory.
+ * If set to true, the existing App_Data directory on the
+ * destination
+ * will not be deleted, and any App_Data directory in the source will be
+ * ignored.
+ * Setting is false by default.
+ * @member {boolean} [appOffline] Sets the AppOffline rule while the MSDeploy
+ * operation executes.
+ * Setting is false by default.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MSDeploy
+ *
+ * @returns {object} metadata of MSDeploy
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MSDeploy',
+ type: {
+ name: 'Composite',
+ className: 'MSDeploy',
+ 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'
+ }
+ },
+ packageUri: {
+ required: false,
+ serializedName: 'properties.packageUri',
+ type: {
+ name: 'String'
+ }
+ },
+ connectionString: {
+ required: false,
+ serializedName: 'properties.connectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ dbType: {
+ required: false,
+ serializedName: 'properties.dbType',
+ type: {
+ name: 'String'
+ }
+ },
+ setParametersXmlFileUri: {
+ required: false,
+ serializedName: 'properties.setParametersXmlFileUri',
+ type: {
+ name: 'String'
+ }
+ },
+ setParameters: {
+ required: false,
+ serializedName: 'properties.setParameters',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ skipAppData: {
+ required: false,
+ serializedName: 'properties.skipAppData',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ appOffline: {
+ required: false,
+ serializedName: 'properties.appOffline',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MSDeploy;
diff --git a/lib/services/websiteManagement2/lib/lib/models/mSDeployLog.js b/lib/services/websiteManagement2/lib/lib/models/mSDeployLog.js
new file mode 100644
index 0000000000..c4128e119d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/mSDeployLog.js
@@ -0,0 +1,96 @@
+/*
+ * 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');
+
+/**
+ * MSDeploy log
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MSDeployLog extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MSDeployLog.
+ * @member {array} [entries] List of log entry messages
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MSDeployLog
+ *
+ * @returns {object} metadata of MSDeployLog
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MSDeployLog',
+ type: {
+ name: 'Composite',
+ className: 'MSDeployLog',
+ 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'
+ }
+ },
+ entries: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.entries',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'MSDeployLogEntryElementType',
+ type: {
+ name: 'Composite',
+ className: 'MSDeployLogEntry'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MSDeployLog;
diff --git a/lib/services/websiteManagement2/lib/lib/models/mSDeployLogEntry.js b/lib/services/websiteManagement2/lib/lib/models/mSDeployLogEntry.js
new file mode 100644
index 0000000000..dca0c93378
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/mSDeployLogEntry.js
@@ -0,0 +1,73 @@
+/*
+ * 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';
+
+/**
+ * MSDeploy log entry
+ *
+ */
+class MSDeployLogEntry {
+ /**
+ * Create a MSDeployLogEntry.
+ * @member {date} [time] Timestamp of log entry
+ * @member {string} [type] Log entry type. Possible values include:
+ * 'Message', 'Warning', 'Error'
+ * @member {string} [message] Log entry message
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of MSDeployLogEntry
+ *
+ * @returns {object} metadata of MSDeployLogEntry
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MSDeployLogEntry',
+ type: {
+ name: 'Composite',
+ className: 'MSDeployLogEntry',
+ modelProperties: {
+ time: {
+ required: false,
+ readOnly: true,
+ serializedName: 'time',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Message', 'Warning', 'Error' ]
+ }
+ },
+ message: {
+ required: false,
+ readOnly: true,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MSDeployLogEntry;
diff --git a/lib/services/websiteManagement2/lib/lib/models/mSDeployStatus.js b/lib/services/websiteManagement2/lib/lib/models/mSDeployStatus.js
new file mode 100644
index 0000000000..3fedbf49cf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/mSDeployStatus.js
@@ -0,0 +1,127 @@
+/*
+ * 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');
+
+/**
+ * MSDeploy ARM response
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MSDeployStatus extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MSDeployStatus.
+ * @member {string} [deployer] Username of deployer
+ * @member {string} [provisioningState] Provisioning state. Possible values
+ * include: 'accepted', 'running', 'succeeded', 'failed', 'canceled'
+ * @member {date} [startTime] Start time of deploy operation
+ * @member {date} [endTime] End time of deploy operation
+ * @member {boolean} [complete] Whether the deployment operation has
+ * completed
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MSDeployStatus
+ *
+ * @returns {object} metadata of MSDeployStatus
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MSDeployStatus',
+ type: {
+ name: 'Composite',
+ className: 'MSDeployStatus',
+ 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'
+ }
+ },
+ deployer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.deployer',
+ type: {
+ name: 'String'
+ }
+ },
+ provisioningState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'accepted', 'running', 'succeeded', 'failed', 'canceled' ]
+ }
+ },
+ startTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ complete: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.complete',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MSDeployStatus;
diff --git a/lib/services/websiteManagement2/lib/lib/models/managedServiceIdentity.js b/lib/services/websiteManagement2/lib/lib/models/managedServiceIdentity.js
new file mode 100644
index 0000000000..1b38e8c693
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/managedServiceIdentity.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';
+
+/**
+ * Managed service identity.
+ *
+ */
+class ManagedServiceIdentity {
+ /**
+ * Create a ManagedServiceIdentity.
+ * @member {string} [type] Type of managed service identity. Possible values
+ * include: 'SystemAssigned'
+ * @member {string} [tenantId] Tenant of managed service identity.
+ * @member {string} [principalId] Principal Id of managed service identity.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ManagedServiceIdentity
+ *
+ * @returns {object} metadata of ManagedServiceIdentity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ManagedServiceIdentity',
+ type: {
+ name: 'Composite',
+ className: 'ManagedServiceIdentity',
+ modelProperties: {
+ type: {
+ required: false,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tenantId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'tenantId',
+ type: {
+ name: 'String'
+ }
+ },
+ principalId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'principalId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ManagedServiceIdentity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/metricAvailabilily.js b/lib/services/websiteManagement2/lib/lib/models/metricAvailabilily.js
new file mode 100644
index 0000000000..7957ab3882
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/metricAvailabilily.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Metric availability and retention.
+ *
+ */
+class MetricAvailabilily {
+ /**
+ * Create a MetricAvailabilily.
+ * @member {string} [timeGrain] Time grain.
+ * @member {string} [retention] Retention period for the current time grain.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of MetricAvailabilily
+ *
+ * @returns {object} metadata of MetricAvailabilily
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MetricAvailabilily',
+ type: {
+ name: 'Composite',
+ className: 'MetricAvailabilily',
+ modelProperties: {
+ timeGrain: {
+ required: false,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ retention: {
+ required: false,
+ serializedName: 'retention',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MetricAvailabilily;
diff --git a/lib/services/websiteManagement2/lib/lib/models/metricAvailability.js b/lib/services/websiteManagement2/lib/lib/models/metricAvailability.js
new file mode 100644
index 0000000000..84a9285bd4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/metricAvailability.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Retention policy of a resource metric.
+ *
+ */
+class MetricAvailability {
+ /**
+ * Create a MetricAvailability.
+ * @member {string} [timeGrain]
+ * @member {string} [blobDuration]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of MetricAvailability
+ *
+ * @returns {object} metadata of MetricAvailability
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MetricAvailability',
+ type: {
+ name: 'Composite',
+ className: 'MetricAvailability',
+ modelProperties: {
+ timeGrain: {
+ required: false,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ blobDuration: {
+ required: false,
+ serializedName: 'blobDuration',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MetricAvailability;
diff --git a/lib/services/websiteManagement2/lib/lib/models/metricDefinition.js b/lib/services/websiteManagement2/lib/lib/models/metricDefinition.js
new file mode 100644
index 0000000000..7ef23aa4c1
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/metricDefinition.js
@@ -0,0 +1,133 @@
+/*
+ * 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');
+
+/**
+ * Metadata for a metric.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MetricDefinition extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MetricDefinition.
+ * @member {string} [metricDefinitionName] Name of the metric.
+ * @member {string} [unit] Unit of the metric.
+ * @member {string} [primaryAggregationType] Primary aggregation type.
+ * @member {array} [metricAvailabilities] List of time grains supported for
+ * the metric together with retention period.
+ * @member {string} [displayName] Friendly name shown in the UI.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MetricDefinition
+ *
+ * @returns {object} metadata of MetricDefinition
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MetricDefinition',
+ type: {
+ name: 'Composite',
+ className: 'MetricDefinition',
+ 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'
+ }
+ },
+ metricDefinitionName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ unit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.unit',
+ type: {
+ name: 'String'
+ }
+ },
+ primaryAggregationType: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.primaryAggregationType',
+ type: {
+ name: 'String'
+ }
+ },
+ metricAvailabilities: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.metricAvailabilities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'MetricAvailabililyElementType',
+ type: {
+ name: 'Composite',
+ className: 'MetricAvailabilily'
+ }
+ }
+ }
+ },
+ displayName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MetricDefinition;
diff --git a/lib/services/websiteManagement2/lib/lib/models/metricSpecification.js b/lib/services/websiteManagement2/lib/lib/models/metricSpecification.js
new file mode 100644
index 0000000000..f181fc189b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/metricSpecification.js
@@ -0,0 +1,182 @@
+/*
+ * 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');
+
+/**
+ * Definition of a single resource metric.
+ *
+ */
+class MetricSpecification {
+ /**
+ * Create a MetricSpecification.
+ * @member {string} [name]
+ * @member {string} [displayName]
+ * @member {string} [displayDescription]
+ * @member {string} [unit]
+ * @member {string} [aggregationType]
+ * @member {boolean} [supportsInstanceLevelAggregation]
+ * @member {boolean} [enableRegionalMdmAccount]
+ * @member {string} [sourceMdmAccount]
+ * @member {string} [sourceMdmNamespace]
+ * @member {string} [metricFilterPattern]
+ * @member {boolean} [fillGapWithZero]
+ * @member {boolean} [isInternal]
+ * @member {array} [dimensions]
+ * @member {string} [category]
+ * @member {array} [availabilities]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of MetricSpecification
+ *
+ * @returns {object} metadata of MetricSpecification
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MetricSpecification',
+ type: {
+ name: 'Composite',
+ className: 'MetricSpecification',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ displayName: {
+ required: false,
+ serializedName: 'displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ displayDescription: {
+ required: false,
+ serializedName: 'displayDescription',
+ type: {
+ name: 'String'
+ }
+ },
+ unit: {
+ required: false,
+ serializedName: 'unit',
+ type: {
+ name: 'String'
+ }
+ },
+ aggregationType: {
+ required: false,
+ serializedName: 'aggregationType',
+ type: {
+ name: 'String'
+ }
+ },
+ supportsInstanceLevelAggregation: {
+ required: false,
+ serializedName: 'supportsInstanceLevelAggregation',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ enableRegionalMdmAccount: {
+ required: false,
+ serializedName: 'enableRegionalMdmAccount',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ sourceMdmAccount: {
+ required: false,
+ serializedName: 'sourceMdmAccount',
+ type: {
+ name: 'String'
+ }
+ },
+ sourceMdmNamespace: {
+ required: false,
+ serializedName: 'sourceMdmNamespace',
+ type: {
+ name: 'String'
+ }
+ },
+ metricFilterPattern: {
+ required: false,
+ serializedName: 'metricFilterPattern',
+ type: {
+ name: 'String'
+ }
+ },
+ fillGapWithZero: {
+ required: false,
+ serializedName: 'fillGapWithZero',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isInternal: {
+ required: false,
+ serializedName: 'isInternal',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ dimensions: {
+ required: false,
+ serializedName: 'dimensions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DimensionElementType',
+ type: {
+ name: 'Composite',
+ className: 'Dimension'
+ }
+ }
+ }
+ },
+ category: {
+ required: false,
+ serializedName: 'category',
+ type: {
+ name: 'String'
+ }
+ },
+ availabilities: {
+ required: false,
+ serializedName: 'availabilities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'MetricAvailabilityElementType',
+ type: {
+ name: 'Composite',
+ className: 'MetricAvailability'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MetricSpecification;
diff --git a/lib/services/websiteManagement2/lib/lib/models/migrateMySqlRequest.js b/lib/services/websiteManagement2/lib/lib/models/migrateMySqlRequest.js
new file mode 100644
index 0000000000..3f5a50472d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/migrateMySqlRequest.js
@@ -0,0 +1,98 @@
+/*
+ * 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');
+
+/**
+ * MySQL migration request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MigrateMySqlRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MigrateMySqlRequest.
+ * @member {string} connectionString Connection string to the remote MySQL
+ * database.
+ * @member {string} migrationType The type of migration operation to be done.
+ * Possible values include: 'LocalToRemote', 'RemoteToLocal'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MigrateMySqlRequest
+ *
+ * @returns {object} metadata of MigrateMySqlRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MigrateMySqlRequest',
+ type: {
+ name: 'Composite',
+ className: 'MigrateMySqlRequest',
+ 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'
+ }
+ },
+ connectionString: {
+ required: true,
+ serializedName: 'properties.connectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ migrationType: {
+ required: true,
+ serializedName: 'properties.migrationType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'LocalToRemote', 'RemoteToLocal' ]
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MigrateMySqlRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/migrateMySqlStatus.js b/lib/services/websiteManagement2/lib/lib/models/migrateMySqlStatus.js
new file mode 100644
index 0000000000..614da5a007
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/migrateMySqlStatus.js
@@ -0,0 +1,110 @@
+/*
+ * 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');
+
+/**
+ * MySQL migration status.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class MigrateMySqlStatus extends models['ProxyOnlyResource'] {
+ /**
+ * Create a MigrateMySqlStatus.
+ * @member {string} [migrationOperationStatus] Status of the migration task.
+ * Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut',
+ * 'Created'
+ * @member {string} [operationId] Operation ID for the migration task.
+ * @member {boolean} [localMySqlEnabled] True if the web app has in app MySql
+ * enabled
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of MigrateMySqlStatus
+ *
+ * @returns {object} metadata of MigrateMySqlStatus
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'MigrateMySqlStatus',
+ type: {
+ name: 'Composite',
+ className: 'MigrateMySqlStatus',
+ 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'
+ }
+ },
+ migrationOperationStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.migrationOperationStatus',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' ]
+ }
+ },
+ operationId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.operationId',
+ type: {
+ name: 'String'
+ }
+ },
+ localMySqlEnabled: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.localMySqlEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = MigrateMySqlStatus;
diff --git a/lib/services/websiteManagement2/lib/lib/models/nameIdentifier.js b/lib/services/websiteManagement2/lib/lib/models/nameIdentifier.js
new file mode 100644
index 0000000000..2147dc71dc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/nameIdentifier.js
@@ -0,0 +1,52 @@
+/*
+ * 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';
+
+/**
+ * Identifies an object.
+ *
+ */
+class NameIdentifier {
+ /**
+ * Create a NameIdentifier.
+ * @member {string} [name] Name of the object.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of NameIdentifier
+ *
+ * @returns {object} metadata of NameIdentifier
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'NameIdentifier',
+ type: {
+ name: 'Composite',
+ className: 'NameIdentifier',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = NameIdentifier;
diff --git a/lib/services/websiteManagement2/lib/lib/models/nameIdentifierCollection.js b/lib/services/websiteManagement2/lib/lib/models/nameIdentifierCollection.js
new file mode 100644
index 0000000000..ea628630e0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/nameIdentifierCollection.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 domain name identifiers.
+ */
+class NameIdentifierCollection extends Array {
+ /**
+ * Create a NameIdentifierCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of NameIdentifierCollection
+ *
+ * @returns {object} metadata of NameIdentifierCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'NameIdentifierCollection',
+ type: {
+ name: 'Composite',
+ className: 'NameIdentifierCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameIdentifierElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameIdentifier'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = NameIdentifierCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/nameValuePair.js b/lib/services/websiteManagement2/lib/lib/models/nameValuePair.js
new file mode 100644
index 0000000000..5e3cdf77c2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/nameValuePair.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Name value pair.
+ *
+ */
+class NameValuePair {
+ /**
+ * Create a NameValuePair.
+ * @member {string} [name] Pair name.
+ * @member {string} [value] Pair value.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of NameValuePair
+ *
+ * @returns {object} metadata of NameValuePair
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'NameValuePair',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ value: {
+ required: false,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = NameValuePair;
diff --git a/lib/services/websiteManagement2/lib/lib/models/networkAccessControlEntry.js b/lib/services/websiteManagement2/lib/lib/models/networkAccessControlEntry.js
new file mode 100644
index 0000000000..841e6205dd
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/networkAccessControlEntry.js
@@ -0,0 +1,79 @@
+/*
+ * 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';
+
+/**
+ * Network access control entry.
+ *
+ */
+class NetworkAccessControlEntry {
+ /**
+ * Create a NetworkAccessControlEntry.
+ * @member {string} [action] Action object. Possible values include:
+ * 'Permit', 'Deny'
+ * @member {string} [description] Description of network access control
+ * entry.
+ * @member {number} [order] Order of precedence.
+ * @member {string} [remoteSubnet] Remote subnet.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of NetworkAccessControlEntry
+ *
+ * @returns {object} metadata of NetworkAccessControlEntry
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'NetworkAccessControlEntry',
+ type: {
+ name: 'Composite',
+ className: 'NetworkAccessControlEntry',
+ modelProperties: {
+ action: {
+ required: false,
+ serializedName: 'action',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Permit', 'Deny' ]
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'description',
+ type: {
+ name: 'String'
+ }
+ },
+ order: {
+ required: false,
+ serializedName: 'order',
+ type: {
+ name: 'Number'
+ }
+ },
+ remoteSubnet: {
+ required: false,
+ serializedName: 'remoteSubnet',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = NetworkAccessControlEntry;
diff --git a/lib/services/websiteManagement2/lib/lib/models/networkFeatures.js b/lib/services/websiteManagement2/lib/lib/models/networkFeatures.js
new file mode 100644
index 0000000000..8d3d2959a8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/networkFeatures.js
@@ -0,0 +1,150 @@
+/*
+ * 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');
+
+/**
+ * Full view of network features for an app (presently VNET integration and
+ * Hybrid Connections).
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class NetworkFeatures extends models['ProxyOnlyResource'] {
+ /**
+ * Create a NetworkFeatures.
+ * @member {string} [virtualNetworkName] The Virtual Network name.
+ * @member {object} [virtualNetworkConnection] The Virtual Network summary
+ * view.
+ * @member {string} [virtualNetworkConnection.vnetResourceId] The Virtual
+ * Network's resource ID.
+ * @member {string} [virtualNetworkConnection.certThumbprint] The client
+ * certificate thumbprint.
+ * @member {buffer} [virtualNetworkConnection.certBlob] A certificate file
+ * (.cer) blob containing the public key of the private key used to
+ * authenticate a
+ * Point-To-Site VPN connection.
+ * @member {array} [virtualNetworkConnection.routes] The routes that this
+ * Virtual Network connection uses.
+ * @member {boolean} [virtualNetworkConnection.resyncRequired]
+ * true if a resync is required; otherwise, false.
+ * @member {string} [virtualNetworkConnection.dnsServers] DNS servers to be
+ * used by this Virtual Network. This should be a comma-separated list of IP
+ * addresses.
+ * @member {array} [hybridConnections] The Hybrid Connections summary view.
+ * @member {array} [hybridConnectionsV2] The Hybrid Connection V2 (Service
+ * Bus) view.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of NetworkFeatures
+ *
+ * @returns {object} metadata of NetworkFeatures
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'NetworkFeatures',
+ type: {
+ name: 'Composite',
+ className: 'NetworkFeatures',
+ 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'
+ }
+ },
+ virtualNetworkName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.virtualNetworkName',
+ type: {
+ name: 'String'
+ }
+ },
+ virtualNetworkConnection: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.virtualNetworkConnection',
+ type: {
+ name: 'Composite',
+ className: 'VnetInfo'
+ }
+ },
+ hybridConnections: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hybridConnections',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'RelayServiceConnectionEntityElementType',
+ type: {
+ name: 'Composite',
+ className: 'RelayServiceConnectionEntity'
+ }
+ }
+ }
+ },
+ hybridConnectionsV2: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hybridConnectionsV2',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HybridConnectionElementType',
+ type: {
+ name: 'Composite',
+ className: 'HybridConnection'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = NetworkFeatures;
diff --git a/lib/services/websiteManagement2/lib/lib/models/operation.js b/lib/services/websiteManagement2/lib/lib/models/operation.js
new file mode 100644
index 0000000000..4a24b281f8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/operation.js
@@ -0,0 +1,121 @@
+/*
+ * 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');
+
+/**
+ * An operation on a resource.
+ *
+ */
+class Operation {
+ /**
+ * Create a Operation.
+ * @member {string} [id] Operation ID.
+ * @member {string} [name] Operation name.
+ * @member {string} [status] The current status of the operation. Possible
+ * values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'
+ * @member {array} [errors] Any errors associate with the operation.
+ * @member {date} [createdTime] Time when operation has started.
+ * @member {date} [modifiedTime] Time when operation has been updated.
+ * @member {date} [expirationTime] Time when operation will expire.
+ * @member {uuid} [geoMasterOperationId] Applicable only for stamp operation
+ * ids.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Operation
+ *
+ * @returns {object} metadata of Operation
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Operation',
+ type: {
+ name: 'Composite',
+ className: 'Operation',
+ modelProperties: {
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ serializedName: 'status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' ]
+ }
+ },
+ errors: {
+ required: false,
+ serializedName: 'errors',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ErrorEntityElementType',
+ type: {
+ name: 'Composite',
+ className: 'ErrorEntity'
+ }
+ }
+ }
+ },
+ createdTime: {
+ required: false,
+ serializedName: 'createdTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ modifiedTime: {
+ required: false,
+ serializedName: 'modifiedTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ expirationTime: {
+ required: false,
+ serializedName: 'expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ geoMasterOperationId: {
+ required: false,
+ serializedName: 'geoMasterOperationId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Operation;
diff --git a/lib/services/websiteManagement2/lib/lib/models/perfMonCounterCollection.js b/lib/services/websiteManagement2/lib/lib/models/perfMonCounterCollection.js
new file mode 100644
index 0000000000..f14a13dbff
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/perfMonCounterCollection.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 performance monitor counters.
+ */
+class PerfMonCounterCollection extends Array {
+ /**
+ * Create a PerfMonCounterCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PerfMonCounterCollection
+ *
+ * @returns {object} metadata of PerfMonCounterCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PerfMonCounterCollection',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonCounterCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'PerfMonResponseElementType',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonResponse'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PerfMonCounterCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/perfMonResponse.js b/lib/services/websiteManagement2/lib/lib/models/perfMonResponse.js
new file mode 100644
index 0000000000..a4badd3919
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/perfMonResponse.js
@@ -0,0 +1,77 @@
+/*
+ * 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');
+
+/**
+ * Performance monitor API response.
+ *
+ */
+class PerfMonResponse {
+ /**
+ * Create a PerfMonResponse.
+ * @member {string} [code] The response code.
+ * @member {string} [message] The message.
+ * @member {object} [data] The performance monitor counters.
+ * @member {string} [data.name] Unique key name of the counter.
+ * @member {date} [data.startTime] Start time of the period.
+ * @member {date} [data.endTime] End time of the period.
+ * @member {string} [data.timeGrain] Presented time grain.
+ * @member {array} [data.values] Collection of workers that are active during
+ * this time.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of PerfMonResponse
+ *
+ * @returns {object} metadata of PerfMonResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PerfMonResponse',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonResponse',
+ modelProperties: {
+ code: {
+ required: false,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ },
+ data: {
+ required: false,
+ serializedName: 'data',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonSet'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PerfMonResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/perfMonSample.js b/lib/services/websiteManagement2/lib/lib/models/perfMonSample.js
new file mode 100644
index 0000000000..f7882a7d2e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/perfMonSample.js
@@ -0,0 +1,77 @@
+/*
+ * 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';
+
+/**
+ * Performance monitor sample in a set.
+ *
+ */
+class PerfMonSample {
+ /**
+ * Create a PerfMonSample.
+ * @member {date} [time] Point in time for which counter was measured.
+ * @member {string} [instanceName] Name of the server on which the
+ * measurement is made.
+ * @member {number} [value] Value of counter at a certain time.
+ * @member {number} [coreCount] Core Count of worker. Not a data member
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of PerfMonSample
+ *
+ * @returns {object} metadata of PerfMonSample
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PerfMonSample',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonSample',
+ modelProperties: {
+ time: {
+ required: false,
+ serializedName: 'time',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ instanceName: {
+ required: false,
+ serializedName: 'instanceName',
+ type: {
+ name: 'String'
+ }
+ },
+ value: {
+ required: false,
+ serializedName: 'value',
+ type: {
+ name: 'Number'
+ }
+ },
+ coreCount: {
+ required: false,
+ serializedName: 'coreCount',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PerfMonSample;
diff --git a/lib/services/websiteManagement2/lib/lib/models/perfMonSet.js b/lib/services/websiteManagement2/lib/lib/models/perfMonSet.js
new file mode 100644
index 0000000000..8a24e0d373
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/perfMonSet.js
@@ -0,0 +1,95 @@
+/*
+ * 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');
+
+/**
+ * Metric information.
+ *
+ */
+class PerfMonSet {
+ /**
+ * Create a PerfMonSet.
+ * @member {string} [name] Unique key name of the counter.
+ * @member {date} [startTime] Start time of the period.
+ * @member {date} [endTime] End time of the period.
+ * @member {string} [timeGrain] Presented time grain.
+ * @member {array} [values] Collection of workers that are active during this
+ * time.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of PerfMonSet
+ *
+ * @returns {object} metadata of PerfMonSet
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PerfMonSet',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonSet',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ timeGrain: {
+ required: false,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ values: {
+ required: false,
+ serializedName: 'values',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'PerfMonSampleElementType',
+ type: {
+ name: 'Composite',
+ className: 'PerfMonSample'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PerfMonSet;
diff --git a/lib/services/websiteManagement2/lib/lib/models/premierAddOn.js b/lib/services/websiteManagement2/lib/lib/models/premierAddOn.js
new file mode 100644
index 0000000000..ac3d6c9e2f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/premierAddOn.js
@@ -0,0 +1,172 @@
+/*
+ * 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');
+
+/**
+ * Premier add-on.
+ *
+ * @extends models['Resource']
+ */
+class PremierAddOn extends models['Resource'] {
+ /**
+ * Create a PremierAddOn.
+ * @member {string} [sku] Premier add on SKU.
+ * @member {string} [product] Premier add on Product.
+ * @member {string} [vendor] Premier add on Vendor.
+ * @member {string} [premierAddOnName] Premier add on Name.
+ * @member {string} [premierAddOnLocation] Premier add on Location.
+ * @member {object} [premierAddOnTags] Premier add on Tags.
+ * @member {string} [marketplacePublisher] Premier add on Marketplace
+ * publisher.
+ * @member {string} [marketplaceOffer] Premier add on Marketplace offer.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PremierAddOn
+ *
+ * @returns {object} metadata of PremierAddOn
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PremierAddOn',
+ type: {
+ name: 'Composite',
+ className: 'PremierAddOn',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ sku: {
+ required: false,
+ serializedName: 'properties.sku',
+ type: {
+ name: 'String'
+ }
+ },
+ product: {
+ required: false,
+ serializedName: 'properties.product',
+ type: {
+ name: 'String'
+ }
+ },
+ vendor: {
+ required: false,
+ serializedName: 'properties.vendor',
+ type: {
+ name: 'String'
+ }
+ },
+ premierAddOnName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ premierAddOnLocation: {
+ required: false,
+ serializedName: 'properties.location',
+ type: {
+ name: 'String'
+ }
+ },
+ premierAddOnTags: {
+ required: false,
+ serializedName: 'properties.tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ marketplacePublisher: {
+ required: false,
+ serializedName: 'properties.marketplacePublisher',
+ type: {
+ name: 'String'
+ }
+ },
+ marketplaceOffer: {
+ required: false,
+ serializedName: 'properties.marketplaceOffer',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PremierAddOn;
diff --git a/lib/services/websiteManagement2/lib/lib/models/premierAddOnOffer.js b/lib/services/websiteManagement2/lib/lib/models/premierAddOnOffer.js
new file mode 100644
index 0000000000..2252e8969a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/premierAddOnOffer.js
@@ -0,0 +1,171 @@
+/*
+ * 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');
+
+/**
+ * Premier add-on offer.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class PremierAddOnOffer extends models['ProxyOnlyResource'] {
+ /**
+ * Create a PremierAddOnOffer.
+ * @member {string} [sku] Premier add on SKU.
+ * @member {string} [product] Premier add on offer Product.
+ * @member {string} [vendor] Premier add on offer Vendor.
+ * @member {string} [premierAddOnOfferName] Premier add on offer Name.
+ * @member {boolean} [promoCodeRequired] true if promotion code
+ * is required; otherwise, false.
+ * @member {number} [quota] Premier add on offer Quota.
+ * @member {string} [webHostingPlanRestrictions] App Service plans this offer
+ * is restricted to. Possible values include: 'None', 'Free', 'Shared',
+ * 'Basic', 'Standard', 'Premium'
+ * @member {string} [privacyPolicyUrl] Privacy policy URL.
+ * @member {string} [legalTermsUrl] Legal terms URL.
+ * @member {string} [marketplacePublisher] Marketplace publisher.
+ * @member {string} [marketplaceOffer] Marketplace offer.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PremierAddOnOffer
+ *
+ * @returns {object} metadata of PremierAddOnOffer
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PremierAddOnOffer',
+ type: {
+ name: 'Composite',
+ className: 'PremierAddOnOffer',
+ 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'
+ }
+ },
+ sku: {
+ required: false,
+ serializedName: 'properties.sku',
+ type: {
+ name: 'String'
+ }
+ },
+ product: {
+ required: false,
+ serializedName: 'properties.product',
+ type: {
+ name: 'String'
+ }
+ },
+ vendor: {
+ required: false,
+ serializedName: 'properties.vendor',
+ type: {
+ name: 'String'
+ }
+ },
+ premierAddOnOfferName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ promoCodeRequired: {
+ required: false,
+ serializedName: 'properties.promoCodeRequired',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ quota: {
+ required: false,
+ serializedName: 'properties.quota',
+ type: {
+ name: 'Number'
+ }
+ },
+ webHostingPlanRestrictions: {
+ required: false,
+ serializedName: 'properties.webHostingPlanRestrictions',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' ]
+ }
+ },
+ privacyPolicyUrl: {
+ required: false,
+ serializedName: 'properties.privacyPolicyUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ legalTermsUrl: {
+ required: false,
+ serializedName: 'properties.legalTermsUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ marketplacePublisher: {
+ required: false,
+ serializedName: 'properties.marketplacePublisher',
+ type: {
+ name: 'String'
+ }
+ },
+ marketplaceOffer: {
+ required: false,
+ serializedName: 'properties.marketplaceOffer',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PremierAddOnOffer;
diff --git a/lib/services/websiteManagement2/lib/lib/models/premierAddOnOfferCollection.js b/lib/services/websiteManagement2/lib/lib/models/premierAddOnOfferCollection.js
new file mode 100644
index 0000000000..ceecaa63c2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/premierAddOnOfferCollection.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 premier add-on offers.
+ */
+class PremierAddOnOfferCollection extends Array {
+ /**
+ * Create a PremierAddOnOfferCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PremierAddOnOfferCollection
+ *
+ * @returns {object} metadata of PremierAddOnOfferCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PremierAddOnOfferCollection',
+ type: {
+ name: 'Composite',
+ className: 'PremierAddOnOfferCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'PremierAddOnOfferElementType',
+ type: {
+ name: 'Composite',
+ className: 'PremierAddOnOffer'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PremierAddOnOfferCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processInfo.js b/lib/services/websiteManagement2/lib/lib/models/processInfo.js
new file mode 100644
index 0000000000..094583fabf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processInfo.js
@@ -0,0 +1,405 @@
+/*
+ * 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');
+
+/**
+ * Process Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ProcessInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ProcessInfo.
+ * @member {number} [processInfoId] ARM Identifier for deployment.
+ * @member {string} [processInfoName] Deployment name.
+ * @member {string} [href] HRef URI.
+ * @member {string} [miniDump] Minidump URI.
+ * @member {boolean} [isProfileRunning] Is profile running?
+ * @member {boolean} [isIisProfileRunning] Is the IIS Profile running?
+ * @member {number} [iisProfileTimeoutInSeconds] IIS Profile timeout
+ * (seconds).
+ * @member {string} [parent] Parent process.
+ * @member {array} [children] Child process list.
+ * @member {array} [threads] Thread list.
+ * @member {array} [openFileHandles] List of open files.
+ * @member {array} [modules] List of modules.
+ * @member {string} [fileName] File name of this process.
+ * @member {string} [commandLine] Command line.
+ * @member {string} [userName] User name.
+ * @member {number} [handleCount] Handle count.
+ * @member {number} [moduleCount] Module count.
+ * @member {number} [threadCount] Thread count.
+ * @member {date} [startTime] Start time.
+ * @member {string} [totalProcessorTime] Total CPU time.
+ * @member {string} [userProcessorTime] User CPU time.
+ * @member {string} [privilegedProcessorTime] Privileged CPU time.
+ * @member {number} [workingSet64] Working set.
+ * @member {number} [peakWorkingSet64] Peak working set.
+ * @member {number} [privateMemorySize64] Private memory size.
+ * @member {number} [virtualMemorySize64] Virtual memory size.
+ * @member {number} [peakVirtualMemorySize64] Peak virtual memory usage.
+ * @member {number} [pagedSystemMemorySize64] Paged system memory.
+ * @member {number} [nonpagedSystemMemorySize64] Non-paged system memory.
+ * @member {number} [pagedMemorySize64] Paged memory.
+ * @member {number} [peakPagedMemorySize64] Peak paged memory.
+ * @member {date} [timeStamp] Time stamp.
+ * @member {object} [environmentVariables] List of environment variables.
+ * @member {boolean} [isScmSite] Is this the SCM site?
+ * @member {boolean} [isWebJob] Is this a Web Job?
+ * @member {string} [description] Description of process.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessInfo
+ *
+ * @returns {object} metadata of ProcessInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessInfo',
+ type: {
+ name: 'Composite',
+ className: 'ProcessInfo',
+ 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'
+ }
+ },
+ processInfoId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'Number'
+ }
+ },
+ processInfoName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ href: {
+ required: false,
+ serializedName: 'properties.href',
+ type: {
+ name: 'String'
+ }
+ },
+ miniDump: {
+ required: false,
+ serializedName: 'properties.miniDump',
+ type: {
+ name: 'String'
+ }
+ },
+ isProfileRunning: {
+ required: false,
+ serializedName: 'properties.isProfileRunning',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isIisProfileRunning: {
+ required: false,
+ serializedName: 'properties.isIisProfileRunning',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ iisProfileTimeoutInSeconds: {
+ required: false,
+ serializedName: 'properties.iisProfileTimeoutInSeconds',
+ type: {
+ name: 'Number'
+ }
+ },
+ parent: {
+ required: false,
+ serializedName: 'properties.parent',
+ type: {
+ name: 'String'
+ }
+ },
+ children: {
+ required: false,
+ serializedName: 'properties.children',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ threads: {
+ required: false,
+ serializedName: 'properties.threads',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ProcessThreadInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ProcessThreadInfo'
+ }
+ }
+ }
+ },
+ openFileHandles: {
+ required: false,
+ serializedName: 'properties.openFileHandles',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ modules: {
+ required: false,
+ serializedName: 'properties.modules',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ProcessModuleInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ProcessModuleInfo'
+ }
+ }
+ }
+ },
+ fileName: {
+ required: false,
+ serializedName: 'properties.fileName',
+ type: {
+ name: 'String'
+ }
+ },
+ commandLine: {
+ required: false,
+ serializedName: 'properties.commandLine',
+ type: {
+ name: 'String'
+ }
+ },
+ userName: {
+ required: false,
+ serializedName: 'properties.userName',
+ type: {
+ name: 'String'
+ }
+ },
+ handleCount: {
+ required: false,
+ serializedName: 'properties.handleCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ moduleCount: {
+ required: false,
+ serializedName: 'properties.moduleCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ threadCount: {
+ required: false,
+ serializedName: 'properties.threadCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ totalProcessorTime: {
+ required: false,
+ serializedName: 'properties.totalProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ userProcessorTime: {
+ required: false,
+ serializedName: 'properties.userProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ privilegedProcessorTime: {
+ required: false,
+ serializedName: 'properties.privilegedProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ workingSet64: {
+ required: false,
+ serializedName: 'properties.workingSet64',
+ type: {
+ name: 'Number'
+ }
+ },
+ peakWorkingSet64: {
+ required: false,
+ serializedName: 'properties.peakWorkingSet64',
+ type: {
+ name: 'Number'
+ }
+ },
+ privateMemorySize64: {
+ required: false,
+ serializedName: 'properties.privateMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ virtualMemorySize64: {
+ required: false,
+ serializedName: 'properties.virtualMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ peakVirtualMemorySize64: {
+ required: false,
+ serializedName: 'properties.peakVirtualMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ pagedSystemMemorySize64: {
+ required: false,
+ serializedName: 'properties.pagedSystemMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ nonpagedSystemMemorySize64: {
+ required: false,
+ serializedName: 'properties.nonpagedSystemMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ pagedMemorySize64: {
+ required: false,
+ serializedName: 'properties.pagedMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ peakPagedMemorySize64: {
+ required: false,
+ serializedName: 'properties.peakPagedMemorySize64',
+ type: {
+ name: 'Number'
+ }
+ },
+ timeStamp: {
+ required: false,
+ serializedName: 'properties.timeStamp',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ environmentVariables: {
+ required: false,
+ serializedName: 'properties.environmentVariables',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ isScmSite: {
+ required: false,
+ serializedName: 'properties.isScmSite',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isWebJob: {
+ required: false,
+ serializedName: 'properties.isWebJob',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/processInfoCollection.js
new file mode 100644
index 0000000000..7ebd35ee09
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processInfoCollection.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 Kudu process information elements.
+ */
+class ProcessInfoCollection extends Array {
+ /**
+ * Create a ProcessInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessInfoCollection
+ *
+ * @returns {object} metadata of ProcessInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'ProcessInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ProcessInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ProcessInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processModuleInfo.js b/lib/services/websiteManagement2/lib/lib/models/processModuleInfo.js
new file mode 100644
index 0000000000..54334a64cf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processModuleInfo.js
@@ -0,0 +1,168 @@
+/*
+ * 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');
+
+/**
+ * Process Module Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ProcessModuleInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ProcessModuleInfo.
+ * @member {string} [baseAddress] Base address. Used as module identifier in
+ * ARM resource URI.
+ * @member {string} [fileName] File name.
+ * @member {string} [href] HRef URI.
+ * @member {string} [filePath] File path.
+ * @member {number} [moduleMemorySize] Module memory size.
+ * @member {string} [fileVersion] File version.
+ * @member {string} [fileDescription] File description.
+ * @member {string} [product] Product name.
+ * @member {string} [productVersion] Product version.
+ * @member {boolean} [isDebug] Is debug?
+ * @member {string} [language] Module language (locale).
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessModuleInfo
+ *
+ * @returns {object} metadata of ProcessModuleInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessModuleInfo',
+ type: {
+ name: 'Composite',
+ className: 'ProcessModuleInfo',
+ 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'
+ }
+ },
+ baseAddress: {
+ required: false,
+ serializedName: 'properties.baseAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ fileName: {
+ required: false,
+ serializedName: 'properties.fileName',
+ type: {
+ name: 'String'
+ }
+ },
+ href: {
+ required: false,
+ serializedName: 'properties.href',
+ type: {
+ name: 'String'
+ }
+ },
+ filePath: {
+ required: false,
+ serializedName: 'properties.filePath',
+ type: {
+ name: 'String'
+ }
+ },
+ moduleMemorySize: {
+ required: false,
+ serializedName: 'properties.moduleMemorySize',
+ type: {
+ name: 'Number'
+ }
+ },
+ fileVersion: {
+ required: false,
+ serializedName: 'properties.fileVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ fileDescription: {
+ required: false,
+ serializedName: 'properties.fileDescription',
+ type: {
+ name: 'String'
+ }
+ },
+ product: {
+ required: false,
+ serializedName: 'properties.product',
+ type: {
+ name: 'String'
+ }
+ },
+ productVersion: {
+ required: false,
+ serializedName: 'properties.productVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ isDebug: {
+ required: false,
+ serializedName: 'properties.isDebug',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ language: {
+ required: false,
+ serializedName: 'properties.language',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessModuleInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processModuleInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/processModuleInfoCollection.js
new file mode 100644
index 0000000000..3ce4dec596
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processModuleInfoCollection.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 Kudu thread information elements.
+ */
+class ProcessModuleInfoCollection extends Array {
+ /**
+ * Create a ProcessModuleInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessModuleInfoCollection
+ *
+ * @returns {object} metadata of ProcessModuleInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessModuleInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'ProcessModuleInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ProcessModuleInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ProcessModuleInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessModuleInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processThreadInfo.js b/lib/services/websiteManagement2/lib/lib/models/processThreadInfo.js
new file mode 100644
index 0000000000..ec227556b0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processThreadInfo.js
@@ -0,0 +1,183 @@
+/*
+ * 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');
+
+/**
+ * Process Thread Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ProcessThreadInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ProcessThreadInfo.
+ * @member {number} [processThreadInfoId] ARM Identifier for deployment.
+ * @member {string} [href] HRef URI.
+ * @member {string} [process] Process URI.
+ * @member {string} [startAddress] Start address.
+ * @member {number} [currentPriority] Current thread priority.
+ * @member {string} [priorityLevel] Thread priority level.
+ * @member {number} [basePriority] Base priority.
+ * @member {date} [startTime] Start time.
+ * @member {string} [totalProcessorTime] Total processor time.
+ * @member {string} [userProcessorTime] User processor time.
+ * @member {string} [priviledgedProcessorTime] Priviledged processor time.
+ * @member {string} [state] Thread state.
+ * @member {string} [waitReason] Wait reason.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessThreadInfo
+ *
+ * @returns {object} metadata of ProcessThreadInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessThreadInfo',
+ type: {
+ name: 'Composite',
+ className: 'ProcessThreadInfo',
+ 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'
+ }
+ },
+ processThreadInfoId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'Number'
+ }
+ },
+ href: {
+ required: false,
+ serializedName: 'properties.href',
+ type: {
+ name: 'String'
+ }
+ },
+ process: {
+ required: false,
+ serializedName: 'properties.process',
+ type: {
+ name: 'String'
+ }
+ },
+ startAddress: {
+ required: false,
+ serializedName: 'properties.startAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ currentPriority: {
+ required: false,
+ serializedName: 'properties.currentPriority',
+ type: {
+ name: 'Number'
+ }
+ },
+ priorityLevel: {
+ required: false,
+ serializedName: 'properties.priorityLevel',
+ type: {
+ name: 'String'
+ }
+ },
+ basePriority: {
+ required: false,
+ serializedName: 'properties.basePriority',
+ type: {
+ name: 'Number'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ totalProcessorTime: {
+ required: false,
+ serializedName: 'properties.totalProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ userProcessorTime: {
+ required: false,
+ serializedName: 'properties.userProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ priviledgedProcessorTime: {
+ required: false,
+ serializedName: 'properties.priviledgedProcessorTime',
+ type: {
+ name: 'String'
+ }
+ },
+ state: {
+ required: false,
+ serializedName: 'properties.state',
+ type: {
+ name: 'String'
+ }
+ },
+ waitReason: {
+ required: false,
+ serializedName: 'properties.waitReason',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessThreadInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/processThreadInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/processThreadInfoCollection.js
new file mode 100644
index 0000000000..5b6c63e1c9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/processThreadInfoCollection.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 Kudu thread information elements.
+ */
+class ProcessThreadInfoCollection extends Array {
+ /**
+ * Create a ProcessThreadInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProcessThreadInfoCollection
+ *
+ * @returns {object} metadata of ProcessThreadInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProcessThreadInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'ProcessThreadInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ProcessThreadInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ProcessThreadInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProcessThreadInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/proxyOnlyResource.js b/lib/services/websiteManagement2/lib/lib/models/proxyOnlyResource.js
new file mode 100644
index 0000000000..ce25dbcdd7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/proxyOnlyResource.js
@@ -0,0 +1,84 @@
+/*
+ * 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');
+
+/**
+ * Azure proxy only resource. This resource is not tracked by Azure Resource
+ * Manager.
+ *
+ * @extends models['BaseResource']
+ */
+class ProxyOnlyResource extends models['BaseResource'] {
+ /**
+ * Create a ProxyOnlyResource.
+ * @member {string} [id] Resource Id.
+ * @member {string} [name] Resource Name.
+ * @member {string} [kind] Kind of resource.
+ * @member {string} [type] Resource type.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ProxyOnlyResource
+ *
+ * @returns {object} metadata of ProxyOnlyResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ProxyOnlyResource',
+ type: {
+ name: 'Composite',
+ className: 'ProxyOnlyResource',
+ 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'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ProxyOnlyResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/publicCertificate.js b/lib/services/websiteManagement2/lib/lib/models/publicCertificate.js
new file mode 100644
index 0000000000..7d26d5e11a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/publicCertificate.js
@@ -0,0 +1,106 @@
+/*
+ * 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');
+
+/**
+ * Public certificate object
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class PublicCertificate extends models['ProxyOnlyResource'] {
+ /**
+ * Create a PublicCertificate.
+ * @member {buffer} [blob] Public Certificate byte array
+ * @member {string} [publicCertificateLocation] Public Certificate Location.
+ * Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown'
+ * @member {string} [thumbprint] Certificate Thumbprint
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PublicCertificate
+ *
+ * @returns {object} metadata of PublicCertificate
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PublicCertificate',
+ type: {
+ name: 'Composite',
+ className: 'PublicCertificate',
+ 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'
+ }
+ },
+ blob: {
+ required: false,
+ serializedName: 'properties.blob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ publicCertificateLocation: {
+ required: false,
+ serializedName: 'properties.publicCertificateLocation',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'CurrentUserMy', 'LocalMachineMy', 'Unknown' ]
+ }
+ },
+ thumbprint: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.thumbprint',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PublicCertificate;
diff --git a/lib/services/websiteManagement2/lib/lib/models/publicCertificateCollection.js b/lib/services/websiteManagement2/lib/lib/models/publicCertificateCollection.js
new file mode 100644
index 0000000000..39be88acc4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/publicCertificateCollection.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 public certificates
+ */
+class PublicCertificateCollection extends Array {
+ /**
+ * Create a PublicCertificateCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PublicCertificateCollection
+ *
+ * @returns {object} metadata of PublicCertificateCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PublicCertificateCollection',
+ type: {
+ name: 'Composite',
+ className: 'PublicCertificateCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'PublicCertificateElementType',
+ type: {
+ name: 'Composite',
+ className: 'PublicCertificate'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PublicCertificateCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/pushSettings.js b/lib/services/websiteManagement2/lib/lib/models/pushSettings.js
new file mode 100644
index 0000000000..9c8bb1ec4e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/pushSettings.js
@@ -0,0 +1,121 @@
+/*
+ * 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');
+
+/**
+ * Push settings for the App.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class PushSettings extends models['ProxyOnlyResource'] {
+ /**
+ * Create a PushSettings.
+ * @member {boolean} isPushEnabled Gets or sets a flag indicating whether the
+ * Push endpoint is enabled.
+ * @member {string} [tagWhitelistJson] Gets or sets a JSON string containing
+ * a list of tags that are whitelisted for use by the push registration
+ * endpoint.
+ * @member {string} [tagsRequiringAuth] Gets or sets a JSON string containing
+ * a list of tags that require user authentication to be used in the push
+ * registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [dynamicTagsJson] Gets or sets a JSON string containing a
+ * list of dynamic tags that will be evaluated from user claims in the push
+ * registration endpoint.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of PushSettings
+ *
+ * @returns {object} metadata of PushSettings
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'PushSettings',
+ type: {
+ name: 'Composite',
+ className: 'PushSettings',
+ 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'
+ }
+ },
+ isPushEnabled: {
+ required: true,
+ serializedName: 'properties.isPushEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ tagWhitelistJson: {
+ required: false,
+ serializedName: 'properties.tagWhitelistJson',
+ type: {
+ name: 'String'
+ }
+ },
+ tagsRequiringAuth: {
+ required: false,
+ serializedName: 'properties.tagsRequiringAuth',
+ type: {
+ name: 'String'
+ }
+ },
+ dynamicTagsJson: {
+ required: false,
+ serializedName: 'properties.dynamicTagsJson',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = PushSettings;
diff --git a/lib/services/websiteManagement2/lib/lib/models/rampUpRule.js b/lib/services/websiteManagement2/lib/lib/models/rampUpRule.js
new file mode 100644
index 0000000000..97701d5a8a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/rampUpRule.js
@@ -0,0 +1,125 @@
+/*
+ * 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';
+
+/**
+ * Routing rules for ramp up testing. This rule allows to redirect static
+ * traffic % to a slot or to gradually change routing % based on performance.
+ *
+ */
+class RampUpRule {
+ /**
+ * Create a RampUpRule.
+ * @member {string} [actionHostName] Hostname of a slot to which the traffic
+ * will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
+ * @member {number} [reroutePercentage] Percentage of the traffic which will
+ * be redirected to ActionHostName.
+ * @member {number} [changeStep] In auto ramp up scenario this is the step to
+ * to add/remove from ReroutePercentage until it reaches
+ * MinReroutePercentage or MaxReroutePercentage.
+ * Site metrics are checked every N minutes specificed in
+ * ChangeIntervalInMinutes.
+ * Custom decision algorithm can be provided in TiPCallback site extension
+ * which URL can be specified in ChangeDecisionCallbackUrl.
+ * @member {number} [changeIntervalInMinutes] Specifies interval in mimuntes
+ * to reevaluate ReroutePercentage.
+ * @member {number} [minReroutePercentage] Specifies lower boundary above
+ * which ReroutePercentage will stay.
+ * @member {number} [maxReroutePercentage] Specifies upper boundary below
+ * which ReroutePercentage will stay.
+ * @member {string} [changeDecisionCallbackUrl] Custom decision algorithm can
+ * be provided in TiPCallback site extension which URL can be specified. See
+ * TiPCallback site extension for the scaffold and contracts.
+ * https://www.siteextensions.net/packages/TiPCallback/
+ * @member {string} [name] Name of the routing rule. The recommended name
+ * would be to point to the slot which will receive the traffic in the
+ * experiment.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of RampUpRule
+ *
+ * @returns {object} metadata of RampUpRule
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RampUpRule',
+ type: {
+ name: 'Composite',
+ className: 'RampUpRule',
+ modelProperties: {
+ actionHostName: {
+ required: false,
+ serializedName: 'actionHostName',
+ type: {
+ name: 'String'
+ }
+ },
+ reroutePercentage: {
+ required: false,
+ serializedName: 'reroutePercentage',
+ type: {
+ name: 'Number'
+ }
+ },
+ changeStep: {
+ required: false,
+ serializedName: 'changeStep',
+ type: {
+ name: 'Number'
+ }
+ },
+ changeIntervalInMinutes: {
+ required: false,
+ serializedName: 'changeIntervalInMinutes',
+ type: {
+ name: 'Number'
+ }
+ },
+ minReroutePercentage: {
+ required: false,
+ serializedName: 'minReroutePercentage',
+ type: {
+ name: 'Number'
+ }
+ },
+ maxReroutePercentage: {
+ required: false,
+ serializedName: 'maxReroutePercentage',
+ type: {
+ name: 'Number'
+ }
+ },
+ changeDecisionCallbackUrl: {
+ required: false,
+ serializedName: 'changeDecisionCallbackUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RampUpRule;
diff --git a/lib/services/websiteManagement2/lib/lib/models/recommendation.js b/lib/services/websiteManagement2/lib/lib/models/recommendation.js
new file mode 100644
index 0000000000..665993eaba
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/recommendation.js
@@ -0,0 +1,274 @@
+/*
+ * 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');
+
+/**
+ * Represents a recommendation result generated by the recommendation engine.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class Recommendation extends models['ProxyOnlyResource'] {
+ /**
+ * Create a Recommendation.
+ * @member {date} [creationTime] Timestamp when this instance was created.
+ * @member {uuid} [recommendationId] A GUID value that each recommendation
+ * object is associated with.
+ * @member {string} [resourceId] Full ARM resource ID string that this
+ * recommendation object is associated with.
+ * @member {string} [resourceScope] Name of a resource type this
+ * recommendation applies, e.g. Subscription, ServerFarm, Site. Possible
+ * values include: 'ServerFarm', 'Subscription', 'WebSite'
+ * @member {string} [ruleName] Unique name of the rule.
+ * @member {string} [displayName] UI friendly name of the rule (may not be
+ * unique).
+ * @member {string} [message] Recommendation text.
+ * @member {string} [level] Level indicating how critical this recommendation
+ * can impact. Possible values include: 'Critical', 'Warning', 'Information',
+ * 'NonUrgentSuggestion'
+ * @member {string} [channels] List of channels that this recommendation can
+ * apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook',
+ * 'All'
+ * @member {array} [tags] The list of category tags that this recommendation
+ * belongs to.
+ * @member {string} [actionName] Name of action recommended by this object.
+ * @member {date} [startTime] The beginning time in UTC of a range that the
+ * recommendation refers to.
+ * @member {date} [endTime] The end time in UTC of a range that the
+ * recommendation refers to.
+ * @member {date} [nextNotificationTime] When to notify this recommendation
+ * next in UTC. Null means that this will never be notified anymore.
+ * @member {date} [notificationExpirationTime] Date and time in UTC when this
+ * notification expires.
+ * @member {date} [notifiedTime] Last timestamp in UTC this instance was
+ * actually notified. Null means that this recommendation hasn't been
+ * notified yet.
+ * @member {number} [score] A metric value measured by the rule.
+ * @member {boolean} [isDynamic] True if this is associated with a
+ * dynamically added rule
+ * @member {string} [extensionName] Extension name of the portal if exists.
+ * @member {string} [bladeName] Deep link to a blade on the portal.
+ * @member {string} [forwardLink] Forward link to an external document
+ * associated with the rule.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Recommendation
+ *
+ * @returns {object} metadata of Recommendation
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Recommendation',
+ type: {
+ name: 'Composite',
+ className: 'Recommendation',
+ 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'
+ }
+ },
+ creationTime: {
+ required: false,
+ serializedName: 'properties.creationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ recommendationId: {
+ required: false,
+ serializedName: 'properties.recommendationId',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceId: {
+ required: false,
+ serializedName: 'properties.resourceId',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceScope: {
+ required: false,
+ serializedName: 'properties.resourceScope',
+ type: {
+ name: 'String'
+ }
+ },
+ ruleName: {
+ required: false,
+ serializedName: 'properties.ruleName',
+ type: {
+ name: 'String'
+ }
+ },
+ displayName: {
+ required: false,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'properties.message',
+ type: {
+ name: 'String'
+ }
+ },
+ level: {
+ required: false,
+ serializedName: 'properties.level',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' ]
+ }
+ },
+ channels: {
+ required: false,
+ serializedName: 'properties.channels',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Notification', 'Api', 'Email', 'Webhook', 'All' ]
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'properties.tags',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ actionName: {
+ required: false,
+ serializedName: 'properties.actionName',
+ type: {
+ name: 'String'
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ nextNotificationTime: {
+ required: false,
+ serializedName: 'properties.nextNotificationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ notificationExpirationTime: {
+ required: false,
+ serializedName: 'properties.notificationExpirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ notifiedTime: {
+ required: false,
+ serializedName: 'properties.notifiedTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ score: {
+ required: false,
+ serializedName: 'properties.score',
+ type: {
+ name: 'Number'
+ }
+ },
+ isDynamic: {
+ required: false,
+ serializedName: 'properties.isDynamic',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ extensionName: {
+ required: false,
+ serializedName: 'properties.extensionName',
+ type: {
+ name: 'String'
+ }
+ },
+ bladeName: {
+ required: false,
+ serializedName: 'properties.bladeName',
+ type: {
+ name: 'String'
+ }
+ },
+ forwardLink: {
+ required: false,
+ serializedName: 'properties.forwardLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Recommendation;
diff --git a/lib/services/websiteManagement2/lib/lib/models/recommendationCollection.js b/lib/services/websiteManagement2/lib/lib/models/recommendationCollection.js
new file mode 100644
index 0000000000..e85014b66e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/recommendationCollection.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 recommendations.
+ */
+class RecommendationCollection extends Array {
+ /**
+ * Create a RecommendationCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RecommendationCollection
+ *
+ * @returns {object} metadata of RecommendationCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RecommendationCollection',
+ type: {
+ name: 'Composite',
+ className: 'RecommendationCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'RecommendationElementType',
+ type: {
+ name: 'Composite',
+ className: 'Recommendation'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RecommendationCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/recommendationRule.js b/lib/services/websiteManagement2/lib/lib/models/recommendationRule.js
new file mode 100644
index 0000000000..6e35b0c290
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/recommendationRule.js
@@ -0,0 +1,203 @@
+/*
+ * 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');
+
+/**
+ * Represents a recommendation rule that the recommendation engine can perform.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class RecommendationRule extends models['ProxyOnlyResource'] {
+ /**
+ * Create a RecommendationRule.
+ * @member {string} [recommendationRuleName] Unique name of the rule.
+ * @member {string} [displayName] UI friendly name of the rule.
+ * @member {string} [message] Localized name of the rule (Good for UI).
+ * @member {uuid} [recommendationId] Recommendation ID of an associated
+ * recommendation object tied to the rule, if exists.
+ * If such an object doesn't exist, it is set to null.
+ * @member {string} [description] Localized detailed description of the rule.
+ * @member {string} [actionName] Name of action that is recommended by this
+ * rule in string.
+ * @member {string} [level] Level of impact indicating how critical this rule
+ * is. Possible values include: 'Critical', 'Warning', 'Information',
+ * 'NonUrgentSuggestion'
+ * @member {string} [channels] List of available channels that this rule
+ * applies. Possible values include: 'Notification', 'Api', 'Email',
+ * 'Webhook', 'All'
+ * @member {array} [tags] An array of category tags that the rule contains.
+ * @member {boolean} [isDynamic] True if this is associated with a
+ * dynamically added rule
+ * @member {string} [extensionName] Extension name of the portal if exists.
+ * Applicable to dynamic rule only.
+ * @member {string} [bladeName] Deep link to a blade on the portal.
+ * Applicable to dynamic rule only.
+ * @member {string} [forwardLink] Forward link to an external document
+ * associated with the rule. Applicable to dynamic rule only.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RecommendationRule
+ *
+ * @returns {object} metadata of RecommendationRule
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RecommendationRule',
+ type: {
+ name: 'Composite',
+ className: 'RecommendationRule',
+ 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'
+ }
+ },
+ recommendationRuleName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ displayName: {
+ required: false,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'properties.message',
+ type: {
+ name: 'String'
+ }
+ },
+ recommendationId: {
+ required: false,
+ serializedName: 'properties.recommendationId',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ },
+ actionName: {
+ required: false,
+ serializedName: 'properties.actionName',
+ type: {
+ name: 'String'
+ }
+ },
+ level: {
+ required: false,
+ serializedName: 'properties.level',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' ]
+ }
+ },
+ channels: {
+ required: false,
+ serializedName: 'properties.channels',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Notification', 'Api', 'Email', 'Webhook', 'All' ]
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'properties.tags',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ isDynamic: {
+ required: false,
+ serializedName: 'properties.isDynamic',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ extensionName: {
+ required: false,
+ serializedName: 'properties.extensionName',
+ type: {
+ name: 'String'
+ }
+ },
+ bladeName: {
+ required: false,
+ serializedName: 'properties.bladeName',
+ type: {
+ name: 'String'
+ }
+ },
+ forwardLink: {
+ required: false,
+ serializedName: 'properties.forwardLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RecommendationRule;
diff --git a/lib/services/websiteManagement2/lib/lib/models/reissueCertificateOrderRequest.js b/lib/services/websiteManagement2/lib/lib/models/reissueCertificateOrderRequest.js
new file mode 100644
index 0000000000..b7a796250c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/reissueCertificateOrderRequest.js
@@ -0,0 +1,113 @@
+/*
+ * 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 certificate reissue request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ReissueCertificateOrderRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ReissueCertificateOrderRequest.
+ * @member {number} [keySize] Certificate Key Size.
+ * @member {number} [delayExistingRevokeInHours] Delay in hours to revoke
+ * existing certificate after the new certificate is issued.
+ * @member {string} [csr] Csr to be used for re-key operation.
+ * @member {boolean} [isPrivateKeyExternal] Should we change the ASC type
+ * (from managed private key to external private key and vice versa).
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ReissueCertificateOrderRequest
+ *
+ * @returns {object} metadata of ReissueCertificateOrderRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ReissueCertificateOrderRequest',
+ type: {
+ name: 'Composite',
+ className: 'ReissueCertificateOrderRequest',
+ 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'
+ }
+ },
+ keySize: {
+ required: false,
+ serializedName: 'properties.keySize',
+ type: {
+ name: 'Number'
+ }
+ },
+ delayExistingRevokeInHours: {
+ required: false,
+ serializedName: 'properties.delayExistingRevokeInHours',
+ type: {
+ name: 'Number'
+ }
+ },
+ csr: {
+ required: false,
+ serializedName: 'properties.csr',
+ type: {
+ name: 'String'
+ }
+ },
+ isPrivateKeyExternal: {
+ required: false,
+ serializedName: 'properties.isPrivateKeyExternal',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ReissueCertificateOrderRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/relayServiceConnectionEntity.js b/lib/services/websiteManagement2/lib/lib/models/relayServiceConnectionEntity.js
new file mode 100644
index 0000000000..c54c71585a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/relayServiceConnectionEntity.js
@@ -0,0 +1,135 @@
+/*
+ * 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');
+
+/**
+ * Hybrid Connection for an App Service app.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class RelayServiceConnectionEntity extends models['ProxyOnlyResource'] {
+ /**
+ * Create a RelayServiceConnectionEntity.
+ * @member {string} [entityName]
+ * @member {string} [entityConnectionString]
+ * @member {string} [resourceType]
+ * @member {string} [resourceConnectionString]
+ * @member {string} [hostname]
+ * @member {number} [port]
+ * @member {string} [biztalkUri]
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RelayServiceConnectionEntity
+ *
+ * @returns {object} metadata of RelayServiceConnectionEntity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RelayServiceConnectionEntity',
+ type: {
+ name: 'Composite',
+ className: 'RelayServiceConnectionEntity',
+ 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'
+ }
+ },
+ entityName: {
+ required: false,
+ serializedName: 'properties.entityName',
+ type: {
+ name: 'String'
+ }
+ },
+ entityConnectionString: {
+ required: false,
+ serializedName: 'properties.entityConnectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceType: {
+ required: false,
+ serializedName: 'properties.resourceType',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceConnectionString: {
+ required: false,
+ serializedName: 'properties.resourceConnectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ hostname: {
+ required: false,
+ serializedName: 'properties.hostname',
+ type: {
+ name: 'String'
+ }
+ },
+ port: {
+ required: false,
+ serializedName: 'properties.port',
+ type: {
+ name: 'Number'
+ }
+ },
+ biztalkUri: {
+ required: false,
+ serializedName: 'properties.biztalkUri',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RelayServiceConnectionEntity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/renewCertificateOrderRequest.js b/lib/services/websiteManagement2/lib/lib/models/renewCertificateOrderRequest.js
new file mode 100644
index 0000000000..b72c6763f4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/renewCertificateOrderRequest.js
@@ -0,0 +1,104 @@
+/*
+ * 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 certificate renew request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class RenewCertificateOrderRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a RenewCertificateOrderRequest.
+ * @member {number} [keySize] Certificate Key Size.
+ * @member {string} [csr] Csr to be used for re-key operation.
+ * @member {boolean} [isPrivateKeyExternal] Should we change the ASC type
+ * (from managed private key to external private key and vice versa).
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RenewCertificateOrderRequest
+ *
+ * @returns {object} metadata of RenewCertificateOrderRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RenewCertificateOrderRequest',
+ type: {
+ name: 'Composite',
+ className: 'RenewCertificateOrderRequest',
+ 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'
+ }
+ },
+ keySize: {
+ required: false,
+ serializedName: 'properties.keySize',
+ type: {
+ name: 'Number'
+ }
+ },
+ csr: {
+ required: false,
+ serializedName: 'properties.csr',
+ type: {
+ name: 'String'
+ }
+ },
+ isPrivateKeyExternal: {
+ required: false,
+ serializedName: 'properties.isPrivateKeyExternal',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RenewCertificateOrderRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/requestsBasedTrigger.js b/lib/services/websiteManagement2/lib/lib/models/requestsBasedTrigger.js
new file mode 100644
index 0000000000..60c548d329
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/requestsBasedTrigger.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Trigger based on total requests.
+ *
+ */
+class RequestsBasedTrigger {
+ /**
+ * Create a RequestsBasedTrigger.
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of RequestsBasedTrigger
+ *
+ * @returns {object} metadata of RequestsBasedTrigger
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RequestsBasedTrigger',
+ type: {
+ name: 'Composite',
+ className: 'RequestsBasedTrigger',
+ modelProperties: {
+ count: {
+ required: false,
+ serializedName: 'count',
+ type: {
+ name: 'Number'
+ }
+ },
+ timeInterval: {
+ required: false,
+ serializedName: 'timeInterval',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RequestsBasedTrigger;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resource.js b/lib/services/websiteManagement2/lib/lib/models/resource.js
new file mode 100644
index 0000000000..ee72e3156a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resource.js
@@ -0,0 +1,106 @@
+/*
+ * 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');
+
+/**
+ * Azure resource. This resource is tracked in Azure Resource Manager
+ *
+ * @extends models['BaseResource']
+ */
+class Resource extends models['BaseResource'] {
+ /**
+ * Create a Resource.
+ * @member {string} [id] Resource Id.
+ * @member {string} [name] Resource Name.
+ * @member {string} [kind] Kind of resource.
+ * @member {string} location Resource Location.
+ * @member {string} [type] Resource type.
+ * @member {object} [tags] Resource tags.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Resource
+ *
+ * @returns {object} metadata of Resource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Resource',
+ type: {
+ name: 'Composite',
+ className: 'Resource',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Resource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceCollection.js b/lib/services/websiteManagement2/lib/lib/models/resourceCollection.js
new file mode 100644
index 0000000000..d49a0d8fec
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceCollection.js
@@ -0,0 +1,67 @@
+/*
+ * 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 resources.
+ */
+class ResourceCollection extends Array {
+ /**
+ * Create a ResourceCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceCollection
+ *
+ * @returns {object} metadata of ResourceCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceCollection',
+ type: {
+ name: 'Composite',
+ className: 'ResourceCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadata.js b/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadata.js
new file mode 100644
index 0000000000..7c8d1c457d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadata.js
@@ -0,0 +1,97 @@
+/*
+ * 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');
+
+/**
+ * Used for getting ResourceHealthCheck settings.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ResourceHealthMetadata extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ResourceHealthMetadata.
+ * @member {string} [category] The category that the resource matches in the
+ * RHC Policy File
+ * @member {boolean} [signalAvailability] Is there a health signal for the
+ * resource
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceHealthMetadata
+ *
+ * @returns {object} metadata of ResourceHealthMetadata
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceHealthMetadata',
+ type: {
+ name: 'Composite',
+ className: 'ResourceHealthMetadata',
+ 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'
+ }
+ },
+ category: {
+ required: false,
+ serializedName: 'properties.category',
+ type: {
+ name: 'String'
+ }
+ },
+ signalAvailability: {
+ required: false,
+ serializedName: 'properties.signalAvailability',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceHealthMetadata;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadataCollection.js b/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadataCollection.js
new file mode 100644
index 0000000000..b4be12e889
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceHealthMetadataCollection.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 resource health metadata.
+ */
+class ResourceHealthMetadataCollection extends Array {
+ /**
+ * Create a ResourceHealthMetadataCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceHealthMetadataCollection
+ *
+ * @returns {object} metadata of ResourceHealthMetadataCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceHealthMetadataCollection',
+ type: {
+ name: 'Composite',
+ className: 'ResourceHealthMetadataCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceHealthMetadataElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceHealthMetadata'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceHealthMetadataCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetric.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetric.js
new file mode 100644
index 0000000000..bc89c6dc3d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetric.js
@@ -0,0 +1,146 @@
+/*
+ * 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');
+
+/**
+ * Object representing a metric for any resource .
+ *
+ */
+class ResourceMetric {
+ /**
+ * Create a ResourceMetric.
+ * @member {object} [name] Name of metric.
+ * @member {string} [name.value] metric name value.
+ * @member {string} [name.localizedValue] Localized metric name value.
+ * @member {string} [unit] Metric unit.
+ * @member {string} [timeGrain] Metric granularity. E.g PT1H, PT5M, P1D
+ * @member {date} [startTime] Metric start time.
+ * @member {date} [endTime] Metric end time.
+ * @member {string} [resourceId] Metric resource Id.
+ * @member {string} [id] Resource Id.
+ * @member {array} [metricValues] Metric values.
+ * @member {array} [properties] Resource metric properties collection.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceMetric
+ *
+ * @returns {object} metadata of ResourceMetric
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetric',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetric',
+ modelProperties: {
+ name: {
+ required: false,
+ readOnly: true,
+ serializedName: 'name',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricName'
+ }
+ },
+ unit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'unit',
+ type: {
+ name: 'String'
+ }
+ },
+ timeGrain: {
+ required: false,
+ readOnly: true,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ startTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ resourceId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'resourceId',
+ type: {
+ name: 'String'
+ }
+ },
+ id: {
+ required: false,
+ readOnly: true,
+ serializedName: 'id',
+ type: {
+ name: 'String'
+ }
+ },
+ metricValues: {
+ required: false,
+ readOnly: true,
+ serializedName: 'metricValues',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricValueElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricValue'
+ }
+ }
+ }
+ },
+ properties: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricPropertyElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricProperty'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetric;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricAvailability.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricAvailability.js
new file mode 100644
index 0000000000..477e5bb26c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricAvailability.js
@@ -0,0 +1,62 @@
+/*
+ * 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';
+
+/**
+ * Metrics availability and retention.
+ *
+ */
+class ResourceMetricAvailability {
+ /**
+ * Create a ResourceMetricAvailability.
+ * @member {string} [timeGrain] Time grain .
+ * @member {string} [retention] Retention period for the current time grain.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricAvailability
+ *
+ * @returns {object} metadata of ResourceMetricAvailability
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricAvailability',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricAvailability',
+ modelProperties: {
+ timeGrain: {
+ required: false,
+ readOnly: true,
+ serializedName: 'timeGrain',
+ type: {
+ name: 'String'
+ }
+ },
+ retention: {
+ required: false,
+ readOnly: true,
+ serializedName: 'retention',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricAvailability;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricCollection.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricCollection.js
new file mode 100644
index 0000000000..579749b9a4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricCollection.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 metric responses.
+ */
+class ResourceMetricCollection extends Array {
+ /**
+ * Create a ResourceMetricCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricCollection
+ *
+ * @returns {object} metadata of ResourceMetricCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricCollection',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetric'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinition.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinition.js
new file mode 100644
index 0000000000..86464c5423
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinition.js
@@ -0,0 +1,162 @@
+/*
+ * 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');
+
+/**
+ * Metadata for the metrics.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class ResourceMetricDefinition extends models['ProxyOnlyResource'] {
+ /**
+ * Create a ResourceMetricDefinition.
+ * @member {object} [resourceMetricDefinitionName] Name of the metric.
+ * @member {string} [resourceMetricDefinitionName.value] metric name value.
+ * @member {string} [resourceMetricDefinitionName.localizedValue] Localized
+ * metric name value.
+ * @member {string} [unit] Unit of the metric.
+ * @member {string} [primaryAggregationType] Primary aggregation type.
+ * @member {array} [metricAvailabilities] List of time grains supported for
+ * the metric together with retention period.
+ * @member {string} [resourceUri] Resource URI.
+ * @member {string} [resourceMetricDefinitionId] Resource ID.
+ * @member {object} [properties] Resource metric definition properties.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricDefinition
+ *
+ * @returns {object} metadata of ResourceMetricDefinition
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricDefinition',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricDefinition',
+ 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'
+ }
+ },
+ resourceMetricDefinitionName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricName'
+ }
+ },
+ unit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.unit',
+ type: {
+ name: 'String'
+ }
+ },
+ primaryAggregationType: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.primaryAggregationType',
+ type: {
+ name: 'String'
+ }
+ },
+ metricAvailabilities: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.metricAvailabilities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricAvailabilityElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricAvailability'
+ }
+ }
+ }
+ },
+ resourceUri: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceUri',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceMetricDefinitionId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.id',
+ type: {
+ name: 'String'
+ }
+ },
+ properties: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.properties',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricDefinition;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinitionCollection.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinitionCollection.js
new file mode 100644
index 0000000000..5de7ff20bf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricDefinitionCollection.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 metric definitions.
+ */
+class ResourceMetricDefinitionCollection extends Array {
+ /**
+ * Create a ResourceMetricDefinitionCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricDefinitionCollection
+ *
+ * @returns {object} metadata of ResourceMetricDefinitionCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricDefinitionCollection',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricDefinitionCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricDefinitionElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricDefinition'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricDefinitionCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricName.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricName.js
new file mode 100644
index 0000000000..8aea96ba4a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricName.js
@@ -0,0 +1,62 @@
+/*
+ * 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';
+
+/**
+ * Name of a metric for any resource .
+ *
+ */
+class ResourceMetricName {
+ /**
+ * Create a ResourceMetricName.
+ * @member {string} [value] metric name value.
+ * @member {string} [localizedValue] Localized metric name value.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricName
+ *
+ * @returns {object} metadata of ResourceMetricName
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricName',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricName',
+ modelProperties: {
+ value: {
+ required: false,
+ readOnly: true,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ },
+ localizedValue: {
+ required: false,
+ readOnly: true,
+ serializedName: 'localizedValue',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricName;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricProperty.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricProperty.js
new file mode 100644
index 0000000000..e1c189544b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricProperty.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Resource metric property.
+ *
+ */
+class ResourceMetricProperty {
+ /**
+ * Create a ResourceMetricProperty.
+ * @member {string} [key] Key for resource metric property.
+ * @member {string} [value] Value of pair.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricProperty
+ *
+ * @returns {object} metadata of ResourceMetricProperty
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricProperty',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricProperty',
+ modelProperties: {
+ key: {
+ required: false,
+ serializedName: 'key',
+ type: {
+ name: 'String'
+ }
+ },
+ value: {
+ required: false,
+ serializedName: 'value',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricProperty;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceMetricValue.js b/lib/services/websiteManagement2/lib/lib/models/resourceMetricValue.js
new file mode 100644
index 0000000000..6bc292af85
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceMetricValue.js
@@ -0,0 +1,117 @@
+/*
+ * 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');
+
+/**
+ * Value of resource metric.
+ *
+ */
+class ResourceMetricValue {
+ /**
+ * Create a ResourceMetricValue.
+ * @member {string} [timestamp] Value timestamp.
+ * @member {number} [average] Value average.
+ * @member {number} [minimum] Value minimum.
+ * @member {number} [maximum] Value maximum.
+ * @member {number} [total] Value total.
+ * @member {number} [count] Value count.
+ * @member {array} [properties] Resource metric properties collection.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceMetricValue
+ *
+ * @returns {object} metadata of ResourceMetricValue
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceMetricValue',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricValue',
+ modelProperties: {
+ timestamp: {
+ required: false,
+ readOnly: true,
+ serializedName: 'timestamp',
+ type: {
+ name: 'String'
+ }
+ },
+ average: {
+ required: false,
+ readOnly: true,
+ serializedName: 'average',
+ type: {
+ name: 'Number'
+ }
+ },
+ minimum: {
+ required: false,
+ readOnly: true,
+ serializedName: 'minimum',
+ type: {
+ name: 'Number'
+ }
+ },
+ maximum: {
+ required: false,
+ readOnly: true,
+ serializedName: 'maximum',
+ type: {
+ name: 'Number'
+ }
+ },
+ total: {
+ required: false,
+ readOnly: true,
+ serializedName: 'total',
+ type: {
+ name: 'Number'
+ }
+ },
+ count: {
+ required: false,
+ readOnly: true,
+ serializedName: 'count',
+ type: {
+ name: 'Number'
+ }
+ },
+ properties: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ResourceMetricPropertyElementType',
+ type: {
+ name: 'Composite',
+ className: 'ResourceMetricProperty'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceMetricValue;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailability.js b/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailability.js
new file mode 100644
index 0000000000..a733bc7a1e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailability.js
@@ -0,0 +1,78 @@
+/*
+ * 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';
+
+/**
+ * Information regarding availbility of a resource name.
+ *
+ */
+class ResourceNameAvailability {
+ /**
+ * Create a ResourceNameAvailability.
+ * @member {boolean} [nameAvailable] true indicates name is
+ * valid and available. false indicates the name is invalid,
+ * unavailable, or both.
+ * @member {string} [reason] Invalid indicates the name provided
+ * does not match Azure App Service naming requirements.
+ * AlreadyExists indicates that the name is already in use and
+ * is therefore unavailable. Possible values include: 'Invalid',
+ * 'AlreadyExists'
+ * @member {string} [message] If reason == invalid, provide the user with the
+ * reason why the given name is invalid, and provide the resource naming
+ * requirements so that the user can select a valid name. If reason ==
+ * AlreadyExists, explain that resource name is already in use, and direct
+ * them to select a different name.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceNameAvailability
+ *
+ * @returns {object} metadata of ResourceNameAvailability
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceNameAvailability',
+ type: {
+ name: 'Composite',
+ className: 'ResourceNameAvailability',
+ modelProperties: {
+ nameAvailable: {
+ required: false,
+ serializedName: 'nameAvailable',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ reason: {
+ required: false,
+ serializedName: 'reason',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceNameAvailability;
diff --git a/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailabilityRequest.js b/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailabilityRequest.js
new file mode 100644
index 0000000000..fceb2c2a08
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/resourceNameAvailabilityRequest.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';
+
+/**
+ * Resource name availability request content.
+ *
+ */
+class ResourceNameAvailabilityRequest {
+ /**
+ * Create a ResourceNameAvailabilityRequest.
+ * @member {string} name Resource name to verify.
+ * @member {string} type Resource type used for verification. Possible values
+ * include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser',
+ * 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots',
+ * 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers'
+ * @member {boolean} [isFqdn] Is fully qualified domain name.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResourceNameAvailabilityRequest
+ *
+ * @returns {object} metadata of ResourceNameAvailabilityRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResourceNameAvailabilityRequest',
+ type: {
+ name: 'Composite',
+ className: 'ResourceNameAvailabilityRequest',
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ isFqdn: {
+ required: false,
+ serializedName: 'isFqdn',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResourceNameAvailabilityRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/responseMetaData.js b/lib/services/websiteManagement2/lib/lib/models/responseMetaData.js
new file mode 100644
index 0000000000..1887a5d84a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/responseMetaData.js
@@ -0,0 +1,57 @@
+/*
+ * 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 a ResponseMetaData.
+ */
+class ResponseMetaData {
+ /**
+ * Create a ResponseMetaData.
+ * @member {object} [dataSource] Source of the Data
+ * @member {array} [dataSource.instructions] Instrunctions if any for the
+ * data source
+ * @member {array} [dataSource.dataSourceUri] Datasource Uri Links
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ResponseMetaData
+ *
+ * @returns {object} metadata of ResponseMetaData
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ResponseMetaData',
+ type: {
+ name: 'Composite',
+ className: 'ResponseMetaData',
+ modelProperties: {
+ dataSource: {
+ required: false,
+ serializedName: 'dataSource',
+ type: {
+ name: 'Composite',
+ className: 'DataSource'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ResponseMetaData;
diff --git a/lib/services/websiteManagement2/lib/lib/models/restoreRequest.js b/lib/services/websiteManagement2/lib/lib/models/restoreRequest.js
new file mode 100644
index 0000000000..ed24bafc6a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/restoreRequest.js
@@ -0,0 +1,193 @@
+/*
+ * 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');
+
+/**
+ * Description of a restore request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class RestoreRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a RestoreRequest.
+ * @member {string} storageAccountUrl SAS URL to the container.
+ * @member {string} [blobName] Name of a blob which contains the backup.
+ * @member {boolean} overwrite true if the restore operation can
+ * overwrite target app; otherwise, false. true is
+ * needed if trying to restore over an existing app.
+ * @member {string} [siteName] Name of an app.
+ * @member {array} [databases] Collection of databases which should be
+ * restored. This list has to match the list of databases included in the
+ * backup.
+ * @member {boolean} [ignoreConflictingHostNames] Changes a logic when
+ * restoring an app with custom domains. true to remove custom
+ * domains automatically. If false, custom domains are added to
+ * the app's object when it is being restored, but that might fail due to
+ * conflicts during the operation. Default value: false .
+ * @member {boolean} [ignoreDatabases] Ignore the databases and only restore
+ * the site content. Default value: false .
+ * @member {string} [appServicePlan] Specify app service plan that will own
+ * restored site.
+ * @member {string} [operationType] Operation type. Possible values include:
+ * 'Default', 'Clone', 'Relocation', 'Snapshot'. Default value: 'Default' .
+ * @member {boolean} [adjustConnectionStrings] true if
+ * SiteConfig.ConnectionStrings should be set in new app; otherwise,
+ * false.
+ * @member {string} [hostingEnvironment] App Service Environment name, if
+ * needed (only when restoring an app to an App Service Environment).
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RestoreRequest
+ *
+ * @returns {object} metadata of RestoreRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RestoreRequest',
+ type: {
+ name: 'Composite',
+ className: 'RestoreRequest',
+ 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'
+ }
+ },
+ storageAccountUrl: {
+ required: true,
+ serializedName: 'properties.storageAccountUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ blobName: {
+ required: false,
+ serializedName: 'properties.blobName',
+ type: {
+ name: 'String'
+ }
+ },
+ overwrite: {
+ required: true,
+ serializedName: 'properties.overwrite',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ siteName: {
+ required: false,
+ serializedName: 'properties.siteName',
+ type: {
+ name: 'String'
+ }
+ },
+ databases: {
+ required: false,
+ serializedName: 'properties.databases',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'DatabaseBackupSettingElementType',
+ type: {
+ name: 'Composite',
+ className: 'DatabaseBackupSetting'
+ }
+ }
+ }
+ },
+ ignoreConflictingHostNames: {
+ required: false,
+ serializedName: 'properties.ignoreConflictingHostNames',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ ignoreDatabases: {
+ required: false,
+ serializedName: 'properties.ignoreDatabases',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ appServicePlan: {
+ required: false,
+ serializedName: 'properties.appServicePlan',
+ type: {
+ name: 'String'
+ }
+ },
+ operationType: {
+ required: false,
+ serializedName: 'properties.operationType',
+ defaultValue: 'Default',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Default', 'Clone', 'Relocation', 'Snapshot' ]
+ }
+ },
+ adjustConnectionStrings: {
+ required: false,
+ serializedName: 'properties.adjustConnectionStrings',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ hostingEnvironment: {
+ required: false,
+ serializedName: 'properties.hostingEnvironment',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RestoreRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/restoreResponse.js b/lib/services/websiteManagement2/lib/lib/models/restoreResponse.js
new file mode 100644
index 0000000000..a3f06ae56a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/restoreResponse.js
@@ -0,0 +1,89 @@
+/*
+ * 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');
+
+/**
+ * Response for an app restore request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class RestoreResponse extends models['ProxyOnlyResource'] {
+ /**
+ * Create a RestoreResponse.
+ * @member {string} [operationId] When server starts the restore process, it
+ * will return an operation ID identifying that particular restore operation.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of RestoreResponse
+ *
+ * @returns {object} metadata of RestoreResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'RestoreResponse',
+ type: {
+ name: 'Composite',
+ className: 'RestoreResponse',
+ 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'
+ }
+ },
+ operationId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.operationId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = RestoreResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/serviceSpecification.js b/lib/services/websiteManagement2/lib/lib/models/serviceSpecification.js
new file mode 100644
index 0000000000..ebb2a7b9a3
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/serviceSpecification.js
@@ -0,0 +1,62 @@
+/*
+ * 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');
+
+/**
+ * Resource metrics service provided by Microsoft.Insights resource provider.
+ *
+ */
+class ServiceSpecification {
+ /**
+ * Create a ServiceSpecification.
+ * @member {array} [metricSpecifications]
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ServiceSpecification
+ *
+ * @returns {object} metadata of ServiceSpecification
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ServiceSpecification',
+ type: {
+ name: 'Composite',
+ className: 'ServiceSpecification',
+ modelProperties: {
+ metricSpecifications: {
+ required: false,
+ serializedName: 'metricSpecifications',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'MetricSpecificationElementType',
+ type: {
+ name: 'Composite',
+ className: 'MetricSpecification'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ServiceSpecification;
diff --git a/lib/services/websiteManagement2/lib/lib/models/site.js b/lib/services/websiteManagement2/lib/lib/models/site.js
new file mode 100644
index 0000000000..daa121c8ae
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/site.js
@@ -0,0 +1,671 @@
+/*
+ * 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');
+
+/**
+ * A web app, a mobile app backend, or an API app.
+ *
+ * @extends models['Resource']
+ */
+class Site extends models['Resource'] {
+ /**
+ * Create a Site.
+ * @member {string} [state] Current state of the app.
+ * @member {array} [hostNames] Hostnames associated with the app.
+ * @member {string} [repositorySiteName] Name of the repository site.
+ * @member {string} [usageState] State indicating whether the app has
+ * exceeded its quota usage. Read-only. Possible values include: 'Normal',
+ * 'Exceeded'
+ * @member {boolean} [enabled] true if the app is enabled;
+ * otherwise, false. Setting this value to false disables the
+ * app (takes the app offline).
+ * @member {array} [enabledHostNames] Enabled hostnames for the app.Hostnames
+ * need to be assigned (see HostNames) AND enabled. Otherwise,
+ * the app is not served on those hostnames.
+ * @member {string} [availabilityState] Management information availability
+ * state for the app. Possible values include: 'Normal', 'Limited',
+ * 'DisasterRecoveryMode'
+ * @member {array} [hostNameSslStates] Hostname SSL states are used to manage
+ * the SSL bindings for app's hostnames.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ * @member {boolean} [reserved] true if reserved; otherwise,
+ * false. Default value: false .
+ * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in
+ * UTC. Read-only.
+ * @member {object} [siteConfig] Configuration of the app.
+ * @member {number} [siteConfig.numberOfWorkers] Number of workers.
+ * @member {array} [siteConfig.defaultDocuments] Default documents.
+ * @member {string} [siteConfig.netFrameworkVersion] .NET Framework version.
+ * @member {string} [siteConfig.phpVersion] Version of PHP.
+ * @member {string} [siteConfig.pythonVersion] Version of Python.
+ * @member {string} [siteConfig.nodeVersion] Version of Node.js.
+ * @member {string} [siteConfig.linuxFxVersion] Linux App Framework and
+ * version
+ * @member {boolean} [siteConfig.requestTracingEnabled] true if
+ * request tracing is enabled; otherwise, false.
+ * @member {date} [siteConfig.requestTracingExpirationTime] Request tracing
+ * expiration time.
+ * @member {boolean} [siteConfig.remoteDebuggingEnabled] true if
+ * remote debugging is enabled; otherwise, false.
+ * @member {string} [siteConfig.remoteDebuggingVersion] Remote debugging
+ * version.
+ * @member {boolean} [siteConfig.httpLoggingEnabled] true if
+ * HTTP logging is enabled; otherwise, false.
+ * @member {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory
+ * size limit.
+ * @member {boolean} [siteConfig.detailedErrorLoggingEnabled]
+ * true if detailed error logging is enabled; otherwise,
+ * false.
+ * @member {string} [siteConfig.publishingUsername] Publishing user name.
+ * @member {array} [siteConfig.appSettings] Application settings.
+ * @member {array} [siteConfig.connectionStrings] Connection strings.
+ * @member {object} [siteConfig.machineKey] Site MachineKey.
+ * @member {string} [siteConfig.machineKey.validation] MachineKey validation.
+ * @member {string} [siteConfig.machineKey.validationKey] Validation key.
+ * @member {string} [siteConfig.machineKey.decryption] Algorithm used for
+ * decryption.
+ * @member {string} [siteConfig.machineKey.decryptionKey] Decryption key.
+ * @member {array} [siteConfig.handlerMappings] Handler mappings.
+ * @member {string} [siteConfig.documentRoot] Document root.
+ * @member {string} [siteConfig.scmType] SCM type. Possible values include:
+ * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit',
+ * 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg',
+ * 'OneDrive', 'VSO'
+ * @member {boolean} [siteConfig.use32BitWorkerProcess] true to
+ * use 32-bit worker process; otherwise, false.
+ * @member {boolean} [siteConfig.webSocketsEnabled] true if
+ * WebSocket is enabled; otherwise, false.
+ * @member {boolean} [siteConfig.alwaysOn] true if Always On is
+ * enabled; otherwise, false.
+ * @member {string} [siteConfig.javaVersion] Java version.
+ * @member {string} [siteConfig.javaContainer] Java container.
+ * @member {string} [siteConfig.javaContainerVersion] Java container version.
+ * @member {string} [siteConfig.appCommandLine] App command line to launch.
+ * @member {string} [siteConfig.managedPipelineMode] Managed pipeline mode.
+ * Possible values include: 'Integrated', 'Classic'
+ * @member {array} [siteConfig.virtualApplications] Virtual applications.
+ * @member {string} [siteConfig.loadBalancing] Site load balancing. Possible
+ * values include: 'WeightedRoundRobin', 'LeastRequests',
+ * 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [siteConfig.experiments] This is work around for
+ * polymophic types.
+ * @member {array} [siteConfig.experiments.rampUpRules] List of ramp-up
+ * rules.
+ * @member {object} [siteConfig.limits] Site limits.
+ * @member {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU
+ * usage percentage.
+ * @member {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory
+ * usage in MB.
+ * @member {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk
+ * size usage in MB.
+ * @member {boolean} [siteConfig.autoHealEnabled] true if Auto
+ * Heal is enabled; otherwise, false.
+ * @member {object} [siteConfig.autoHealRules] Auto Heal rules.
+ * @member {object} [siteConfig.autoHealRules.triggers] Conditions that
+ * describe when to execute the auto-heal actions.
+ * @member {object} [siteConfig.autoHealRules.triggers.requests] A rule based
+ * on total requests.
+ * @member {number} [siteConfig.autoHealRules.triggers.requests.count]
+ * Request Count.
+ * @member {string} [siteConfig.autoHealRules.triggers.requests.timeInterval]
+ * Time interval.
+ * @member {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A
+ * rule based on private bytes.
+ * @member {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule
+ * based on status codes.
+ * @member {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule
+ * based on request execution time.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [siteConfig.autoHealRules.triggers.slowRequests.count]
+ * Request Count.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [siteConfig.autoHealRules.actions] Actions to be executed
+ * when a rule is triggered.
+ * @member {string} [siteConfig.autoHealRules.actions.actionType] Predefined
+ * action to be taken. Possible values include: 'Recycle', 'LogEvent',
+ * 'CustomAction'
+ * @member {object} [siteConfig.autoHealRules.actions.customAction] Custom
+ * action to be taken.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.exe]
+ * Executable to be run.
+ * @member {string}
+ * [siteConfig.autoHealRules.actions.customAction.parameters] Parameters for
+ * the executable.
+ * @member {string}
+ * [siteConfig.autoHealRules.actions.minProcessExecutionTime] Minimum time
+ * the process must execute
+ * before taking the action
+ * @member {string} [siteConfig.tracingOptions] Tracing options.
+ * @member {string} [siteConfig.vnetName] Virtual Network name.
+ * @member {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS)
+ * settings.
+ * @member {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of
+ * origins that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [siteConfig.push] Push endpoint settings.
+ * @member {boolean} [siteConfig.push.isPushEnabled] Gets or sets a flag
+ * indicating whether the Push endpoint is enabled.
+ * @member {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON
+ * string containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON
+ * string containing a list of tags that require user authentication to be
+ * used in the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON
+ * string containing a list of dynamic tags that will be evaluated from user
+ * claims in the push registration endpoint.
+ * @member {object} [siteConfig.apiDefinition] Information about the formal
+ * API definition for the app.
+ * @member {string} [siteConfig.apiDefinition.url] The URL of the API
+ * definition.
+ * @member {string} [siteConfig.autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [siteConfig.localMySqlEnabled] true to
+ * enable local MySQL; otherwise, false.
+ * @member {array} [siteConfig.ipSecurityRestrictions] IP security
+ * restrictions.
+ * @member {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a
+ * web site to allow clients to connect over http2.0
+ * @member {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the
+ * minimum version of TLS required for SSL requests. Possible values include:
+ * '1.0', '1.1', '1.2'
+ * @member {array} [trafficManagerHostNames] Azure Traffic Manager hostnames
+ * associated with the app. Read-only.
+ * @member {boolean} [scmSiteAlsoStopped] true to stop SCM
+ * (KUDU) site when the app is stopped; otherwise, false. The
+ * default is false. Default value: false .
+ * @member {string} [targetSwapSlot] Specifies which deployment slot this app
+ * will swap into. Read-only.
+ * @member {object} [hostingEnvironmentProfile] App Service Environment to
+ * use for the app.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {boolean} [clientAffinityEnabled] true to enable
+ * client affinity; false to stop sending session affinity
+ * cookies, which route client requests in the same session to the same
+ * instance. Default is true.
+ * @member {boolean} [clientCertEnabled] true to enable client
+ * certificate authentication (TLS mutual authentication); otherwise,
+ * false. Default is false.
+ * @member {boolean} [hostNamesDisabled] true to disable the
+ * public hostnames of the app; otherwise, false.
+ * If true, the app is only accessible via API management
+ * process.
+ * @member {string} [outboundIpAddresses] List of IP addresses that the app
+ * uses for outbound connections (e.g. database access). Includes VIPs from
+ * tenants that site can be hosted with current settings. Read-only.
+ * @member {string} [possibleOutboundIpAddresses] List of IP addresses that
+ * the app uses for outbound connections (e.g. database access). Includes
+ * VIPs from all tenants. Read-only.
+ * @member {number} [containerSize] Size of the function container.
+ * @member {number} [dailyMemoryTimeQuota] Maximum allowed daily memory-time
+ * quota (applicable on dynamic apps only).
+ * @member {date} [suspendedTill] App suspended till in case memory-time
+ * quota is exceeded.
+ * @member {number} [maxNumberOfWorkers] Maximum number of workers.
+ * This only applies to Functions container.
+ * @member {object} [cloningInfo] If specified during app creation, the app
+ * is cloned from a source app.
+ * @member {uuid} [cloningInfo.correlationId] Correlation ID of cloning
+ * operation. This ID ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [cloningInfo.overwrite] true to overwrite
+ * destination app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneCustomHostNames] true to
+ * clone custom hostnames from source app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneSourceControl] true to
+ * clone source control from source app; otherwise, false.
+ * @member {string} [cloningInfo.sourceWebAppId] ARM resource ID of the
+ * source app. App resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [cloningInfo.hostingEnvironment] App Service Environment.
+ * @member {object} [cloningInfo.appSettingsOverrides] Application setting
+ * overrides for cloned app. If specified, these settings override the
+ * settings cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [cloningInfo.configureLoadBalancing] true
+ * to configure load balancing for source and destination app.
+ * @member {string} [cloningInfo.trafficManagerProfileId] ARM resource ID of
+ * the Traffic Manager profile to use, if it exists. Traffic Manager resource
+ * ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [cloningInfo.trafficManagerProfileName] Name of Traffic
+ * Manager profile to create. This is only needed if Traffic Manager profile
+ * does not already exist.
+ * @member {boolean} [cloningInfo.ignoreQuotas] true if quotas
+ * should be ignored; otherwise, false.
+ * @member {object} [snapshotInfo] If specified during app creation, the app
+ * is created from a previous snapshot.
+ * @member {string} [snapshotInfo.snapshotTime] Point in time in which the
+ * app recovery should be attempted, formatted as a DateTime string.
+ * @member {object} [snapshotInfo.recoveryTarget] Specifies the web app that
+ * snapshot contents will be written to.
+ * @member {string} [snapshotInfo.recoveryTarget.location] Geographical
+ * location of the target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [snapshotInfo.recoveryTarget.id] ARM resource ID of the
+ * target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} [snapshotInfo.overwrite] If true the
+ * recovery operation can overwrite source app; otherwise,
+ * false.
+ * @member {boolean} [snapshotInfo.recoverConfiguration] If true, site
+ * configuration, in addition to content, will be reverted.
+ * @member {boolean} [snapshotInfo.ignoreConflictingHostNames] If true,
+ * custom hostname conflicts will be ignored when recovering to a target web
+ * app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ * @member {string} [resourceGroup] Name of the resource group the app
+ * belongs to. Read-only.
+ * @member {boolean} [isDefaultContainer] true if the app is a
+ * default container; otherwise, false.
+ * @member {string} [defaultHostName] Default hostname of the app. Read-only.
+ * @member {object} [slotSwapStatus] Status of the last deployment slot swap
+ * operation.
+ * @member {date} [slotSwapStatus.timestampUtc] The time the last successful
+ * slot swap completed.
+ * @member {string} [slotSwapStatus.sourceSlotName] The source slot of the
+ * last swap operation.
+ * @member {string} [slotSwapStatus.destinationSlotName] The destination slot
+ * of the last swap operation.
+ * @member {boolean} [httpsOnly] HttpsOnly: configures a web site to accept
+ * only https requests. Issues redirect for
+ * http requests
+ * @member {object} [identity]
+ * @member {string} [identity.type] Type of managed service identity.
+ * Possible values include: 'SystemAssigned'
+ * @member {string} [identity.tenantId] Tenant of managed service identity.
+ * @member {string} [identity.principalId] Principal Id of managed service
+ * identity.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Site
+ *
+ * @returns {object} metadata of Site
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Site',
+ type: {
+ name: 'Composite',
+ className: 'Site',
+ 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'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ tags: {
+ required: false,
+ serializedName: 'tags',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ state: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.state',
+ type: {
+ name: 'String'
+ }
+ },
+ hostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ repositorySiteName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.repositorySiteName',
+ type: {
+ name: 'String'
+ }
+ },
+ usageState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.usageState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Normal', 'Exceeded' ]
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'properties.enabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ enabledHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.enabledHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ availabilityState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.availabilityState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Normal', 'Limited', 'DisasterRecoveryMode' ]
+ }
+ },
+ hostNameSslStates: {
+ required: false,
+ serializedName: 'properties.hostNameSslStates',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostNameSslStateElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostNameSslState'
+ }
+ }
+ }
+ },
+ serverFarmId: {
+ required: false,
+ serializedName: 'properties.serverFarmId',
+ type: {
+ name: 'String'
+ }
+ },
+ reserved: {
+ required: false,
+ serializedName: 'properties.reserved',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ lastModifiedTimeUtc: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastModifiedTimeUtc',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ siteConfig: {
+ required: false,
+ serializedName: 'properties.siteConfig',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfig'
+ }
+ },
+ trafficManagerHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.trafficManagerHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ scmSiteAlsoStopped: {
+ required: false,
+ serializedName: 'properties.scmSiteAlsoStopped',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ targetSwapSlot: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.targetSwapSlot',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ clientAffinityEnabled: {
+ required: false,
+ serializedName: 'properties.clientAffinityEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ clientCertEnabled: {
+ required: false,
+ serializedName: 'properties.clientCertEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ hostNamesDisabled: {
+ required: false,
+ serializedName: 'properties.hostNamesDisabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ outboundIpAddresses: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.outboundIpAddresses',
+ type: {
+ name: 'String'
+ }
+ },
+ possibleOutboundIpAddresses: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.possibleOutboundIpAddresses',
+ type: {
+ name: 'String'
+ }
+ },
+ containerSize: {
+ required: false,
+ serializedName: 'properties.containerSize',
+ type: {
+ name: 'Number'
+ }
+ },
+ dailyMemoryTimeQuota: {
+ required: false,
+ serializedName: 'properties.dailyMemoryTimeQuota',
+ type: {
+ name: 'Number'
+ }
+ },
+ suspendedTill: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.suspendedTill',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ maxNumberOfWorkers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maxNumberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ cloningInfo: {
+ required: false,
+ serializedName: 'properties.cloningInfo',
+ type: {
+ name: 'Composite',
+ className: 'CloningInfo'
+ }
+ },
+ snapshotInfo: {
+ required: false,
+ serializedName: 'properties.snapshotInfo',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotRecoveryRequest'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ isDefaultContainer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isDefaultContainer',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ defaultHostName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.defaultHostName',
+ type: {
+ name: 'String'
+ }
+ },
+ slotSwapStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.slotSwapStatus',
+ type: {
+ name: 'Composite',
+ className: 'SlotSwapStatus'
+ }
+ },
+ httpsOnly: {
+ required: false,
+ serializedName: 'properties.httpsOnly',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ identity: {
+ required: false,
+ serializedName: 'identity',
+ type: {
+ name: 'Composite',
+ className: 'ManagedServiceIdentity'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Site;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteAuthSettings.js b/lib/services/websiteManagement2/lib/lib/models/siteAuthSettings.js
new file mode 100644
index 0000000000..977f86f4dc
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteAuthSettings.js
@@ -0,0 +1,401 @@
+/*
+ * 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');
+
+/**
+ * Configuration settings for the Azure App Service Authentication /
+ * Authorization feature.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteAuthSettings extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteAuthSettings.
+ * @member {boolean} [enabled] true if the Authentication /
+ * Authorization feature is enabled for the current app; otherwise,
+ * false.
+ * @member {string} [runtimeVersion] The RuntimeVersion of the Authentication
+ * / Authorization feature in use for the current app.
+ * The setting in this value can control the behavior of certain features in
+ * the Authentication / Authorization module.
+ * @member {string} [unauthenticatedClientAction] The action to take when an
+ * unauthenticated client attempts to access the app. Possible values
+ * include: 'RedirectToLoginPage', 'AllowAnonymous'
+ * @member {boolean} [tokenStoreEnabled] true to durably store
+ * platform-specific security tokens that are obtained during login flows;
+ * otherwise, false.
+ * The default is false.
+ * @member {array} [allowedExternalRedirectUrls] External URLs that can be
+ * redirected to as part of logging in or logging out of the app. Note that
+ * the query string part of the URL is ignored.
+ * This is an advanced setting typically only needed by Windows Store
+ * application backends.
+ * Note that URLs within the current domain are always implicitly allowed.
+ * @member {string} [defaultProvider] The default authentication provider to
+ * use when multiple providers are configured.
+ * This setting is only needed if multiple providers are configured and the
+ * unauthenticated client
+ * action is set to "RedirectToLoginPage". Possible values include:
+ * 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount',
+ * 'Twitter'
+ * @member {number} [tokenRefreshExtensionHours] The number of hours after
+ * session token expiration that a session token can be used to
+ * call the token refresh API. The default is 72 hours.
+ * @member {string} [clientId] The Client ID of this relying party
+ * application, known as the client_id.
+ * This setting is required for enabling OpenID Connection authentication
+ * with Azure Active Directory or
+ * other 3rd party OpenID Connect providers.
+ * More information on OpenID Connect:
+ * http://openid.net/specs/openid-connect-core-1_0.html
+ * @member {string} [clientSecret] The Client Secret of this relying party
+ * application (in Azure Active Directory, this is also referred to as the
+ * Key).
+ * This setting is optional. If no client secret is configured, the OpenID
+ * Connect implicit auth flow is used to authenticate end users.
+ * Otherwise, the OpenID Connect Authorization Code Flow is used to
+ * authenticate end users.
+ * More information on OpenID Connect:
+ * http://openid.net/specs/openid-connect-core-1_0.html
+ * @member {string} [issuer] The OpenID Connect Issuer URI that represents
+ * the entity which issues access tokens for this application.
+ * When using Azure Active Directory, this value is the URI of the directory
+ * tenant, e.g. https://sts.windows.net/{tenant-guid}/.
+ * This URI is a case-sensitive identifier for the token issuer.
+ * More information on OpenID Connect Discovery:
+ * http://openid.net/specs/openid-connect-discovery-1_0.html
+ * @member {array} [allowedAudiences] Allowed audience values to consider
+ * when validating JWTs issued by
+ * Azure Active Directory. Note that the ClientID value is
+ * always considered an
+ * allowed audience, regardless of this setting.
+ * @member {array} [additionalLoginParams] Login parameters to send to the
+ * OpenID Connect authorization endpoint when
+ * a user logs in. Each parameter must be in the form "key=value".
+ * @member {string} [googleClientId] The OpenID Connect Client ID for the
+ * Google web application.
+ * This setting is required for enabling Google Sign-In.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {string} [googleClientSecret] The client secret associated with
+ * the Google web application.
+ * This setting is required for enabling Google Sign-In.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {array} [googleOAuthScopes] The OAuth 2.0 scopes that will be
+ * requested as part of Google Sign-In authentication.
+ * This setting is optional. If not specified, "openid", "profile", and
+ * "email" are used as default scopes.
+ * Google Sign-In documentation:
+ * https://developers.google.com/identity/sign-in/web/
+ * @member {string} [facebookAppId] The App ID of the Facebook app used for
+ * login.
+ * This setting is required for enabling Facebook Login.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {string} [facebookAppSecret] The App Secret of the Facebook app
+ * used for Facebook Login.
+ * This setting is required for enabling Facebook Login.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {array} [facebookOAuthScopes] The OAuth 2.0 scopes that will be
+ * requested as part of Facebook Login authentication.
+ * This setting is optional.
+ * Facebook Login documentation:
+ * https://developers.facebook.com/docs/facebook-login
+ * @member {string} [twitterConsumerKey] The OAuth 1.0a consumer key of the
+ * Twitter application used for sign-in.
+ * This setting is required for enabling Twitter Sign-In.
+ * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
+ * @member {string} [twitterConsumerSecret] The OAuth 1.0a consumer secret of
+ * the Twitter application used for sign-in.
+ * This setting is required for enabling Twitter Sign-In.
+ * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
+ * @member {string} [microsoftAccountClientId] The OAuth 2.0 client ID that
+ * was created for the app used for authentication.
+ * This setting is required for enabling Microsoft Account authentication.
+ * Microsoft Account OAuth documentation:
+ * https://dev.onedrive.com/auth/msa_oauth.htm
+ * @member {string} [microsoftAccountClientSecret] The OAuth 2.0 client
+ * secret that was created for the app used for authentication.
+ * This setting is required for enabling Microsoft Account authentication.
+ * Microsoft Account OAuth documentation:
+ * https://dev.onedrive.com/auth/msa_oauth.htm
+ * @member {array} [microsoftAccountOAuthScopes] The OAuth 2.0 scopes that
+ * will be requested as part of Microsoft Account authentication.
+ * This setting is optional. If not specified, "wl.basic" is used as the
+ * default scope.
+ * Microsoft Account Scopes and permissions documentation:
+ * https://msdn.microsoft.com/en-us/library/dn631845.aspx
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteAuthSettings
+ *
+ * @returns {object} metadata of SiteAuthSettings
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteAuthSettings',
+ type: {
+ name: 'Composite',
+ className: 'SiteAuthSettings',
+ 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'
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'properties.enabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ runtimeVersion: {
+ required: false,
+ serializedName: 'properties.runtimeVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ unauthenticatedClientAction: {
+ required: false,
+ serializedName: 'properties.unauthenticatedClientAction',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'RedirectToLoginPage', 'AllowAnonymous' ]
+ }
+ },
+ tokenStoreEnabled: {
+ required: false,
+ serializedName: 'properties.tokenStoreEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ allowedExternalRedirectUrls: {
+ required: false,
+ serializedName: 'properties.allowedExternalRedirectUrls',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ defaultProvider: {
+ required: false,
+ serializedName: 'properties.defaultProvider',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' ]
+ }
+ },
+ tokenRefreshExtensionHours: {
+ required: false,
+ serializedName: 'properties.tokenRefreshExtensionHours',
+ type: {
+ name: 'Number'
+ }
+ },
+ clientId: {
+ required: false,
+ serializedName: 'properties.clientId',
+ type: {
+ name: 'String'
+ }
+ },
+ clientSecret: {
+ required: false,
+ serializedName: 'properties.clientSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ issuer: {
+ required: false,
+ serializedName: 'properties.issuer',
+ type: {
+ name: 'String'
+ }
+ },
+ allowedAudiences: {
+ required: false,
+ serializedName: 'properties.allowedAudiences',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ additionalLoginParams: {
+ required: false,
+ serializedName: 'properties.additionalLoginParams',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ googleClientId: {
+ required: false,
+ serializedName: 'properties.googleClientId',
+ type: {
+ name: 'String'
+ }
+ },
+ googleClientSecret: {
+ required: false,
+ serializedName: 'properties.googleClientSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ googleOAuthScopes: {
+ required: false,
+ serializedName: 'properties.googleOAuthScopes',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ facebookAppId: {
+ required: false,
+ serializedName: 'properties.facebookAppId',
+ type: {
+ name: 'String'
+ }
+ },
+ facebookAppSecret: {
+ required: false,
+ serializedName: 'properties.facebookAppSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ facebookOAuthScopes: {
+ required: false,
+ serializedName: 'properties.facebookOAuthScopes',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ twitterConsumerKey: {
+ required: false,
+ serializedName: 'properties.twitterConsumerKey',
+ type: {
+ name: 'String'
+ }
+ },
+ twitterConsumerSecret: {
+ required: false,
+ serializedName: 'properties.twitterConsumerSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ microsoftAccountClientId: {
+ required: false,
+ serializedName: 'properties.microsoftAccountClientId',
+ type: {
+ name: 'String'
+ }
+ },
+ microsoftAccountClientSecret: {
+ required: false,
+ serializedName: 'properties.microsoftAccountClientSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ microsoftAccountOAuthScopes: {
+ required: false,
+ serializedName: 'properties.microsoftAccountOAuthScopes',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteAuthSettings;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteCloneability.js b/lib/services/websiteManagement2/lib/lib/models/siteCloneability.js
new file mode 100644
index 0000000000..8e5728a618
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteCloneability.js
@@ -0,0 +1,108 @@
+/*
+ * 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');
+
+/**
+ * Represents whether or not an app is cloneable.
+ *
+ */
+class SiteCloneability {
+ /**
+ * Create a SiteCloneability.
+ * @member {string} [result] Name of app. Possible values include:
+ * 'Cloneable', 'PartiallyCloneable', 'NotCloneable'
+ * @member {array} [blockingFeatures] List of features enabled on app that
+ * prevent cloning.
+ * @member {array} [unsupportedFeatures] List of features enabled on app that
+ * are non-blocking but cannot be cloned. The app can still be cloned
+ * but the features in this list will not be set up on cloned app.
+ * @member {array} [blockingCharacteristics] List of blocking application
+ * characteristics.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteCloneability
+ *
+ * @returns {object} metadata of SiteCloneability
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteCloneability',
+ type: {
+ name: 'Composite',
+ className: 'SiteCloneability',
+ modelProperties: {
+ result: {
+ required: false,
+ serializedName: 'result',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Cloneable', 'PartiallyCloneable', 'NotCloneable' ]
+ }
+ },
+ blockingFeatures: {
+ required: false,
+ serializedName: 'blockingFeatures',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteCloneabilityCriterionElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteCloneabilityCriterion'
+ }
+ }
+ }
+ },
+ unsupportedFeatures: {
+ required: false,
+ serializedName: 'unsupportedFeatures',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteCloneabilityCriterionElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteCloneabilityCriterion'
+ }
+ }
+ }
+ },
+ blockingCharacteristics: {
+ required: false,
+ serializedName: 'blockingCharacteristics',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteCloneabilityCriterionElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteCloneabilityCriterion'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteCloneability;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteCloneabilityCriterion.js b/lib/services/websiteManagement2/lib/lib/models/siteCloneabilityCriterion.js
new file mode 100644
index 0000000000..7d5d208e54
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteCloneabilityCriterion.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * An app cloneability criterion.
+ *
+ */
+class SiteCloneabilityCriterion {
+ /**
+ * Create a SiteCloneabilityCriterion.
+ * @member {string} [name] Name of criterion.
+ * @member {string} [description] Description of criterion.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteCloneabilityCriterion
+ *
+ * @returns {object} metadata of SiteCloneabilityCriterion
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteCloneabilityCriterion',
+ type: {
+ name: 'Composite',
+ className: 'SiteCloneabilityCriterion',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteCloneabilityCriterion;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteConfig.js b/lib/services/websiteManagement2/lib/lib/models/siteConfig.js
new file mode 100644
index 0000000000..6dd3a24a75
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteConfig.js
@@ -0,0 +1,548 @@
+/*
+ * 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');
+
+/**
+ * Configuration of an App Service app.
+ *
+ */
+class SiteConfig {
+ /**
+ * Create a SiteConfig.
+ * @member {number} [numberOfWorkers] Number of workers.
+ * @member {array} [defaultDocuments] Default documents.
+ * @member {string} [netFrameworkVersion] .NET Framework version. Default
+ * value: 'v4.6' .
+ * @member {string} [phpVersion] Version of PHP.
+ * @member {string} [pythonVersion] Version of Python.
+ * @member {string} [nodeVersion] Version of Node.js.
+ * @member {string} [linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [requestTracingEnabled] true if request
+ * tracing is enabled; otherwise, false.
+ * @member {date} [requestTracingExpirationTime] Request tracing expiration
+ * time.
+ * @member {boolean} [remoteDebuggingEnabled] true if remote
+ * debugging is enabled; otherwise, false.
+ * @member {string} [remoteDebuggingVersion] Remote debugging version.
+ * @member {boolean} [httpLoggingEnabled] true if HTTP logging
+ * is enabled; otherwise, false.
+ * @member {number} [logsDirectorySizeLimit] HTTP logs directory size limit.
+ * @member {boolean} [detailedErrorLoggingEnabled] true if
+ * detailed error logging is enabled; otherwise, false.
+ * @member {string} [publishingUsername] Publishing user name.
+ * @member {array} [appSettings] Application settings.
+ * @member {array} [connectionStrings] Connection strings.
+ * @member {object} [machineKey] Site MachineKey.
+ * @member {string} [machineKey.validation] MachineKey validation.
+ * @member {string} [machineKey.validationKey] Validation key.
+ * @member {string} [machineKey.decryption] Algorithm used for decryption.
+ * @member {string} [machineKey.decryptionKey] Decryption key.
+ * @member {array} [handlerMappings] Handler mappings.
+ * @member {string} [documentRoot] Document root.
+ * @member {string} [scmType] SCM type. Possible values include: 'None',
+ * 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [use32BitWorkerProcess] true to use 32-bit
+ * worker process; otherwise, false.
+ * @member {boolean} [webSocketsEnabled] true if WebSocket is
+ * enabled; otherwise, false.
+ * @member {boolean} [alwaysOn] true if Always On is enabled;
+ * otherwise, false.
+ * @member {string} [javaVersion] Java version.
+ * @member {string} [javaContainer] Java container.
+ * @member {string} [javaContainerVersion] Java container version.
+ * @member {string} [appCommandLine] App command line to launch.
+ * @member {string} [managedPipelineMode] Managed pipeline mode. Possible
+ * values include: 'Integrated', 'Classic'
+ * @member {array} [virtualApplications] Virtual applications.
+ * @member {string} [loadBalancing] Site load balancing. Possible values
+ * include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [experiments] This is work around for polymophic types.
+ * @member {array} [experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [limits] Site limits.
+ * @member {number} [limits.maxPercentageCpu] Maximum allowed CPU usage
+ * percentage.
+ * @member {number} [limits.maxMemoryInMb] Maximum allowed memory usage in
+ * MB.
+ * @member {number} [limits.maxDiskSizeInMb] Maximum allowed disk size usage
+ * in MB.
+ * @member {boolean} [autoHealEnabled] true if Auto Heal is
+ * enabled; otherwise, false.
+ * @member {object} [autoHealRules] Auto Heal rules.
+ * @member {object} [autoHealRules.triggers] Conditions that describe when to
+ * execute the auto-heal actions.
+ * @member {object} [autoHealRules.triggers.requests] A rule based on total
+ * requests.
+ * @member {number} [autoHealRules.triggers.requests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.requests.timeInterval] Time
+ * interval.
+ * @member {number} [autoHealRules.triggers.privateBytesInKB] A rule based on
+ * private bytes.
+ * @member {array} [autoHealRules.triggers.statusCodes] A rule based on
+ * status codes.
+ * @member {object} [autoHealRules.triggers.slowRequests] A rule based on
+ * request execution time.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeTaken] Time
+ * taken.
+ * @member {number} [autoHealRules.triggers.slowRequests.count] Request
+ * Count.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [autoHealRules.actions] Actions to be executed when a
+ * rule is triggered.
+ * @member {string} [autoHealRules.actions.actionType] Predefined action to
+ * be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [autoHealRules.actions.customAction] Custom action to be
+ * taken.
+ * @member {string} [autoHealRules.actions.customAction.exe] Executable to be
+ * run.
+ * @member {string} [autoHealRules.actions.customAction.parameters]
+ * Parameters for the executable.
+ * @member {string} [autoHealRules.actions.minProcessExecutionTime] Minimum
+ * time the process must execute
+ * before taking the action
+ * @member {string} [tracingOptions] Tracing options.
+ * @member {string} [vnetName] Virtual Network name.
+ * @member {object} [cors] Cross-Origin Resource Sharing (CORS) settings.
+ * @member {array} [cors.allowedOrigins] Gets or sets the list of origins
+ * that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [push] Push endpoint settings.
+ * @member {boolean} [push.isPushEnabled] Gets or sets a flag indicating
+ * whether the Push endpoint is enabled.
+ * @member {string} [push.tagWhitelistJson] Gets or sets a JSON string
+ * containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [push.tagsRequiringAuth] Gets or sets a JSON string
+ * containing a list of tags that require user authentication to be used in
+ * the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [push.dynamicTagsJson] Gets or sets a JSON string
+ * containing a list of dynamic tags that will be evaluated from user claims
+ * in the push registration endpoint.
+ * @member {object} [apiDefinition] Information about the formal API
+ * definition for the app.
+ * @member {string} [apiDefinition.url] The URL of the API definition.
+ * @member {string} [autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [localMySqlEnabled] true to enable local
+ * MySQL; otherwise, false. Default value: false .
+ * @member {array} [ipSecurityRestrictions] IP security restrictions.
+ * @member {boolean} [http20Enabled] Http20Enabled: configures a web site to
+ * allow clients to connect over http2.0. Default value: true .
+ * @member {string} [minTlsVersion] MinTlsVersion: configures the minimum
+ * version of TLS required for SSL requests. Possible values include: '1.0',
+ * '1.1', '1.2'
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteConfig
+ *
+ * @returns {object} metadata of SiteConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteConfig',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfig',
+ modelProperties: {
+ numberOfWorkers: {
+ required: false,
+ serializedName: 'numberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ defaultDocuments: {
+ required: false,
+ serializedName: 'defaultDocuments',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ netFrameworkVersion: {
+ required: false,
+ serializedName: 'netFrameworkVersion',
+ defaultValue: 'v4.6',
+ type: {
+ name: 'String'
+ }
+ },
+ phpVersion: {
+ required: false,
+ serializedName: 'phpVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ pythonVersion: {
+ required: false,
+ serializedName: 'pythonVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ nodeVersion: {
+ required: false,
+ serializedName: 'nodeVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ linuxFxVersion: {
+ required: false,
+ serializedName: 'linuxFxVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ requestTracingEnabled: {
+ required: false,
+ serializedName: 'requestTracingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ requestTracingExpirationTime: {
+ required: false,
+ serializedName: 'requestTracingExpirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ remoteDebuggingEnabled: {
+ required: false,
+ serializedName: 'remoteDebuggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ remoteDebuggingVersion: {
+ required: false,
+ serializedName: 'remoteDebuggingVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ httpLoggingEnabled: {
+ required: false,
+ serializedName: 'httpLoggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ logsDirectorySizeLimit: {
+ required: false,
+ serializedName: 'logsDirectorySizeLimit',
+ type: {
+ name: 'Number'
+ }
+ },
+ detailedErrorLoggingEnabled: {
+ required: false,
+ serializedName: 'detailedErrorLoggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ publishingUsername: {
+ required: false,
+ serializedName: 'publishingUsername',
+ type: {
+ name: 'String'
+ }
+ },
+ appSettings: {
+ required: false,
+ serializedName: 'appSettings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ },
+ connectionStrings: {
+ required: false,
+ serializedName: 'connectionStrings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ConnStringInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ConnStringInfo'
+ }
+ }
+ }
+ },
+ machineKey: {
+ required: false,
+ readOnly: true,
+ serializedName: 'machineKey',
+ type: {
+ name: 'Composite',
+ className: 'SiteMachineKey'
+ }
+ },
+ handlerMappings: {
+ required: false,
+ serializedName: 'handlerMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HandlerMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'HandlerMapping'
+ }
+ }
+ }
+ },
+ documentRoot: {
+ required: false,
+ serializedName: 'documentRoot',
+ type: {
+ name: 'String'
+ }
+ },
+ scmType: {
+ required: false,
+ serializedName: 'scmType',
+ type: {
+ name: 'String'
+ }
+ },
+ use32BitWorkerProcess: {
+ required: false,
+ serializedName: 'use32BitWorkerProcess',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ webSocketsEnabled: {
+ required: false,
+ serializedName: 'webSocketsEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ alwaysOn: {
+ required: false,
+ serializedName: 'alwaysOn',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ javaVersion: {
+ required: false,
+ serializedName: 'javaVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ javaContainer: {
+ required: false,
+ serializedName: 'javaContainer',
+ type: {
+ name: 'String'
+ }
+ },
+ javaContainerVersion: {
+ required: false,
+ serializedName: 'javaContainerVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ appCommandLine: {
+ required: false,
+ serializedName: 'appCommandLine',
+ type: {
+ name: 'String'
+ }
+ },
+ managedPipelineMode: {
+ required: false,
+ serializedName: 'managedPipelineMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Integrated', 'Classic' ]
+ }
+ },
+ virtualApplications: {
+ required: false,
+ serializedName: 'virtualApplications',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualApplicationElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualApplication'
+ }
+ }
+ }
+ },
+ loadBalancing: {
+ required: false,
+ serializedName: 'loadBalancing',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' ]
+ }
+ },
+ experiments: {
+ required: false,
+ serializedName: 'experiments',
+ type: {
+ name: 'Composite',
+ className: 'Experiments'
+ }
+ },
+ limits: {
+ required: false,
+ serializedName: 'limits',
+ type: {
+ name: 'Composite',
+ className: 'SiteLimits'
+ }
+ },
+ autoHealEnabled: {
+ required: false,
+ serializedName: 'autoHealEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ autoHealRules: {
+ required: false,
+ serializedName: 'autoHealRules',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealRules'
+ }
+ },
+ tracingOptions: {
+ required: false,
+ serializedName: 'tracingOptions',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ cors: {
+ required: false,
+ serializedName: 'cors',
+ type: {
+ name: 'Composite',
+ className: 'CorsSettings'
+ }
+ },
+ push: {
+ required: false,
+ serializedName: 'push',
+ type: {
+ name: 'Composite',
+ className: 'PushSettings'
+ }
+ },
+ apiDefinition: {
+ required: false,
+ serializedName: 'apiDefinition',
+ type: {
+ name: 'Composite',
+ className: 'ApiDefinitionInfo'
+ }
+ },
+ autoSwapSlotName: {
+ required: false,
+ serializedName: 'autoSwapSlotName',
+ type: {
+ name: 'String'
+ }
+ },
+ localMySqlEnabled: {
+ required: false,
+ serializedName: 'localMySqlEnabled',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ ipSecurityRestrictions: {
+ required: false,
+ serializedName: 'ipSecurityRestrictions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'IpSecurityRestrictionElementType',
+ type: {
+ name: 'Composite',
+ className: 'IpSecurityRestriction'
+ }
+ }
+ }
+ },
+ http20Enabled: {
+ required: false,
+ serializedName: 'http20Enabled',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ minTlsVersion: {
+ required: false,
+ serializedName: 'minTlsVersion',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteConfigResource.js b/lib/services/websiteManagement2/lib/lib/models/siteConfigResource.js
new file mode 100644
index 0000000000..247ba84dc6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteConfigResource.js
@@ -0,0 +1,581 @@
+/*
+ * 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');
+
+/**
+ * Web app configuration ARM resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteConfigResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteConfigResource.
+ * @member {number} [numberOfWorkers] Number of workers.
+ * @member {array} [defaultDocuments] Default documents.
+ * @member {string} [netFrameworkVersion] .NET Framework version. Default
+ * value: 'v4.6' .
+ * @member {string} [phpVersion] Version of PHP.
+ * @member {string} [pythonVersion] Version of Python.
+ * @member {string} [nodeVersion] Version of Node.js.
+ * @member {string} [linuxFxVersion] Linux App Framework and version
+ * @member {boolean} [requestTracingEnabled] true if request
+ * tracing is enabled; otherwise, false.
+ * @member {date} [requestTracingExpirationTime] Request tracing expiration
+ * time.
+ * @member {boolean} [remoteDebuggingEnabled] true if remote
+ * debugging is enabled; otherwise, false.
+ * @member {string} [remoteDebuggingVersion] Remote debugging version.
+ * @member {boolean} [httpLoggingEnabled] true if HTTP logging
+ * is enabled; otherwise, false.
+ * @member {number} [logsDirectorySizeLimit] HTTP logs directory size limit.
+ * @member {boolean} [detailedErrorLoggingEnabled] true if
+ * detailed error logging is enabled; otherwise, false.
+ * @member {string} [publishingUsername] Publishing user name.
+ * @member {array} [appSettings] Application settings.
+ * @member {array} [connectionStrings] Connection strings.
+ * @member {object} [machineKey] Site MachineKey.
+ * @member {string} [machineKey.validation] MachineKey validation.
+ * @member {string} [machineKey.validationKey] Validation key.
+ * @member {string} [machineKey.decryption] Algorithm used for decryption.
+ * @member {string} [machineKey.decryptionKey] Decryption key.
+ * @member {array} [handlerMappings] Handler mappings.
+ * @member {string} [documentRoot] Document root.
+ * @member {string} [scmType] SCM type. Possible values include: 'None',
+ * 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg',
+ * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive',
+ * 'VSO'
+ * @member {boolean} [use32BitWorkerProcess] true to use 32-bit
+ * worker process; otherwise, false.
+ * @member {boolean} [webSocketsEnabled] true if WebSocket is
+ * enabled; otherwise, false.
+ * @member {boolean} [alwaysOn] true if Always On is enabled;
+ * otherwise, false.
+ * @member {string} [javaVersion] Java version.
+ * @member {string} [javaContainer] Java container.
+ * @member {string} [javaContainerVersion] Java container version.
+ * @member {string} [appCommandLine] App command line to launch.
+ * @member {string} [managedPipelineMode] Managed pipeline mode. Possible
+ * values include: 'Integrated', 'Classic'
+ * @member {array} [virtualApplications] Virtual applications.
+ * @member {string} [loadBalancing] Site load balancing. Possible values
+ * include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime',
+ * 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [experiments] This is work around for polymophic types.
+ * @member {array} [experiments.rampUpRules] List of ramp-up rules.
+ * @member {object} [limits] Site limits.
+ * @member {number} [limits.maxPercentageCpu] Maximum allowed CPU usage
+ * percentage.
+ * @member {number} [limits.maxMemoryInMb] Maximum allowed memory usage in
+ * MB.
+ * @member {number} [limits.maxDiskSizeInMb] Maximum allowed disk size usage
+ * in MB.
+ * @member {boolean} [autoHealEnabled] true if Auto Heal is
+ * enabled; otherwise, false.
+ * @member {object} [autoHealRules] Auto Heal rules.
+ * @member {object} [autoHealRules.triggers] Conditions that describe when to
+ * execute the auto-heal actions.
+ * @member {object} [autoHealRules.triggers.requests] A rule based on total
+ * requests.
+ * @member {number} [autoHealRules.triggers.requests.count] Request Count.
+ * @member {string} [autoHealRules.triggers.requests.timeInterval] Time
+ * interval.
+ * @member {number} [autoHealRules.triggers.privateBytesInKB] A rule based on
+ * private bytes.
+ * @member {array} [autoHealRules.triggers.statusCodes] A rule based on
+ * status codes.
+ * @member {object} [autoHealRules.triggers.slowRequests] A rule based on
+ * request execution time.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeTaken] Time
+ * taken.
+ * @member {number} [autoHealRules.triggers.slowRequests.count] Request
+ * Count.
+ * @member {string} [autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [autoHealRules.actions] Actions to be executed when a
+ * rule is triggered.
+ * @member {string} [autoHealRules.actions.actionType] Predefined action to
+ * be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
+ * @member {object} [autoHealRules.actions.customAction] Custom action to be
+ * taken.
+ * @member {string} [autoHealRules.actions.customAction.exe] Executable to be
+ * run.
+ * @member {string} [autoHealRules.actions.customAction.parameters]
+ * Parameters for the executable.
+ * @member {string} [autoHealRules.actions.minProcessExecutionTime] Minimum
+ * time the process must execute
+ * before taking the action
+ * @member {string} [tracingOptions] Tracing options.
+ * @member {string} [vnetName] Virtual Network name.
+ * @member {object} [cors] Cross-Origin Resource Sharing (CORS) settings.
+ * @member {array} [cors.allowedOrigins] Gets or sets the list of origins
+ * that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [push] Push endpoint settings.
+ * @member {boolean} [push.isPushEnabled] Gets or sets a flag indicating
+ * whether the Push endpoint is enabled.
+ * @member {string} [push.tagWhitelistJson] Gets or sets a JSON string
+ * containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [push.tagsRequiringAuth] Gets or sets a JSON string
+ * containing a list of tags that require user authentication to be used in
+ * the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [push.dynamicTagsJson] Gets or sets a JSON string
+ * containing a list of dynamic tags that will be evaluated from user claims
+ * in the push registration endpoint.
+ * @member {object} [apiDefinition] Information about the formal API
+ * definition for the app.
+ * @member {string} [apiDefinition.url] The URL of the API definition.
+ * @member {string} [autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [localMySqlEnabled] true to enable local
+ * MySQL; otherwise, false. Default value: false .
+ * @member {array} [ipSecurityRestrictions] IP security restrictions.
+ * @member {boolean} [http20Enabled] Http20Enabled: configures a web site to
+ * allow clients to connect over http2.0. Default value: true .
+ * @member {string} [minTlsVersion] MinTlsVersion: configures the minimum
+ * version of TLS required for SSL requests. Possible values include: '1.0',
+ * '1.1', '1.2'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteConfigResource
+ *
+ * @returns {object} metadata of SiteConfigResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteConfigResource',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigResource',
+ 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'
+ }
+ },
+ numberOfWorkers: {
+ required: false,
+ serializedName: 'properties.numberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ defaultDocuments: {
+ required: false,
+ serializedName: 'properties.defaultDocuments',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ netFrameworkVersion: {
+ required: false,
+ serializedName: 'properties.netFrameworkVersion',
+ defaultValue: 'v4.6',
+ type: {
+ name: 'String'
+ }
+ },
+ phpVersion: {
+ required: false,
+ serializedName: 'properties.phpVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ pythonVersion: {
+ required: false,
+ serializedName: 'properties.pythonVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ nodeVersion: {
+ required: false,
+ serializedName: 'properties.nodeVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ linuxFxVersion: {
+ required: false,
+ serializedName: 'properties.linuxFxVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ requestTracingEnabled: {
+ required: false,
+ serializedName: 'properties.requestTracingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ requestTracingExpirationTime: {
+ required: false,
+ serializedName: 'properties.requestTracingExpirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ remoteDebuggingEnabled: {
+ required: false,
+ serializedName: 'properties.remoteDebuggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ remoteDebuggingVersion: {
+ required: false,
+ serializedName: 'properties.remoteDebuggingVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ httpLoggingEnabled: {
+ required: false,
+ serializedName: 'properties.httpLoggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ logsDirectorySizeLimit: {
+ required: false,
+ serializedName: 'properties.logsDirectorySizeLimit',
+ type: {
+ name: 'Number'
+ }
+ },
+ detailedErrorLoggingEnabled: {
+ required: false,
+ serializedName: 'properties.detailedErrorLoggingEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ publishingUsername: {
+ required: false,
+ serializedName: 'properties.publishingUsername',
+ type: {
+ name: 'String'
+ }
+ },
+ appSettings: {
+ required: false,
+ serializedName: 'properties.appSettings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ },
+ connectionStrings: {
+ required: false,
+ serializedName: 'properties.connectionStrings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ConnStringInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'ConnStringInfo'
+ }
+ }
+ }
+ },
+ machineKey: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.machineKey',
+ type: {
+ name: 'Composite',
+ className: 'SiteMachineKey'
+ }
+ },
+ handlerMappings: {
+ required: false,
+ serializedName: 'properties.handlerMappings',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HandlerMappingElementType',
+ type: {
+ name: 'Composite',
+ className: 'HandlerMapping'
+ }
+ }
+ }
+ },
+ documentRoot: {
+ required: false,
+ serializedName: 'properties.documentRoot',
+ type: {
+ name: 'String'
+ }
+ },
+ scmType: {
+ required: false,
+ serializedName: 'properties.scmType',
+ type: {
+ name: 'String'
+ }
+ },
+ use32BitWorkerProcess: {
+ required: false,
+ serializedName: 'properties.use32BitWorkerProcess',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ webSocketsEnabled: {
+ required: false,
+ serializedName: 'properties.webSocketsEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ alwaysOn: {
+ required: false,
+ serializedName: 'properties.alwaysOn',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ javaVersion: {
+ required: false,
+ serializedName: 'properties.javaVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ javaContainer: {
+ required: false,
+ serializedName: 'properties.javaContainer',
+ type: {
+ name: 'String'
+ }
+ },
+ javaContainerVersion: {
+ required: false,
+ serializedName: 'properties.javaContainerVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ appCommandLine: {
+ required: false,
+ serializedName: 'properties.appCommandLine',
+ type: {
+ name: 'String'
+ }
+ },
+ managedPipelineMode: {
+ required: false,
+ serializedName: 'properties.managedPipelineMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Integrated', 'Classic' ]
+ }
+ },
+ virtualApplications: {
+ required: false,
+ serializedName: 'properties.virtualApplications',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualApplicationElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualApplication'
+ }
+ }
+ }
+ },
+ loadBalancing: {
+ required: false,
+ serializedName: 'properties.loadBalancing',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' ]
+ }
+ },
+ experiments: {
+ required: false,
+ serializedName: 'properties.experiments',
+ type: {
+ name: 'Composite',
+ className: 'Experiments'
+ }
+ },
+ limits: {
+ required: false,
+ serializedName: 'properties.limits',
+ type: {
+ name: 'Composite',
+ className: 'SiteLimits'
+ }
+ },
+ autoHealEnabled: {
+ required: false,
+ serializedName: 'properties.autoHealEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ autoHealRules: {
+ required: false,
+ serializedName: 'properties.autoHealRules',
+ type: {
+ name: 'Composite',
+ className: 'AutoHealRules'
+ }
+ },
+ tracingOptions: {
+ required: false,
+ serializedName: 'properties.tracingOptions',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'properties.vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ cors: {
+ required: false,
+ serializedName: 'properties.cors',
+ type: {
+ name: 'Composite',
+ className: 'CorsSettings'
+ }
+ },
+ push: {
+ required: false,
+ serializedName: 'properties.push',
+ type: {
+ name: 'Composite',
+ className: 'PushSettings'
+ }
+ },
+ apiDefinition: {
+ required: false,
+ serializedName: 'properties.apiDefinition',
+ type: {
+ name: 'Composite',
+ className: 'ApiDefinitionInfo'
+ }
+ },
+ autoSwapSlotName: {
+ required: false,
+ serializedName: 'properties.autoSwapSlotName',
+ type: {
+ name: 'String'
+ }
+ },
+ localMySqlEnabled: {
+ required: false,
+ serializedName: 'properties.localMySqlEnabled',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ ipSecurityRestrictions: {
+ required: false,
+ serializedName: 'properties.ipSecurityRestrictions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'IpSecurityRestrictionElementType',
+ type: {
+ name: 'Composite',
+ className: 'IpSecurityRestriction'
+ }
+ }
+ }
+ },
+ http20Enabled: {
+ required: false,
+ serializedName: 'properties.http20Enabled',
+ defaultValue: true,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ minTlsVersion: {
+ required: false,
+ serializedName: 'properties.minTlsVersion',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteConfigResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteConfigResourceCollection.js b/lib/services/websiteManagement2/lib/lib/models/siteConfigResourceCollection.js
new file mode 100644
index 0000000000..e1668edee7
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteConfigResourceCollection.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 site configurations.
+ */
+class SiteConfigResourceCollection extends Array {
+ /**
+ * Create a SiteConfigResourceCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteConfigResourceCollection
+ *
+ * @returns {object} metadata of SiteConfigResourceCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteConfigResourceCollection',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigResourceCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteConfigResourceElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigResource'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteConfigResourceCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfo.js b/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfo.js
new file mode 100644
index 0000000000..ab201777eb
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfo.js
@@ -0,0 +1,97 @@
+/*
+ * 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');
+
+/**
+ * A snapshot of a web app configuration.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteConfigurationSnapshotInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteConfigurationSnapshotInfo.
+ * @member {date} [time] The time the snapshot was taken.
+ * @member {number} [siteConfigurationSnapshotInfoId] The id of the snapshot
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteConfigurationSnapshotInfo
+ *
+ * @returns {object} metadata of SiteConfigurationSnapshotInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteConfigurationSnapshotInfo',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigurationSnapshotInfo',
+ 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'
+ }
+ },
+ time: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.time',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ siteConfigurationSnapshotInfoId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.id',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteConfigurationSnapshotInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfoCollection.js
new file mode 100644
index 0000000000..6bdb27ef62
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteConfigurationSnapshotInfoCollection.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';
+
+/**
+ * Collection of metadata for the app configuration snapshots that can be
+ * restored.
+ */
+class SiteConfigurationSnapshotInfoCollection extends Array {
+ /**
+ * Create a SiteConfigurationSnapshotInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteConfigurationSnapshotInfoCollection
+ *
+ * @returns {object} metadata of SiteConfigurationSnapshotInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteConfigurationSnapshotInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigurationSnapshotInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteConfigurationSnapshotInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfigurationSnapshotInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteConfigurationSnapshotInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfo.js b/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfo.js
new file mode 100644
index 0000000000..8cd1cf009f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfo.js
@@ -0,0 +1,249 @@
+/*
+ * 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');
+
+/**
+ * Site Extension Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteExtensionInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteExtensionInfo.
+ * @member {string} [siteExtensionInfoId] Site extension ID.
+ * @member {string} [title] Site extension title.
+ * @member {string} [siteExtensionInfoType] Site extension type. Possible
+ * values include: 'Gallery', 'WebRoot'
+ * @member {string} [summary] Summary description.
+ * @member {string} [description] Detailed description.
+ * @member {string} [version] Version information.
+ * @member {string} [extensionUrl] Extension URL.
+ * @member {string} [projectUrl] Project URL.
+ * @member {string} [iconUrl] Icon URL.
+ * @member {string} [licenseUrl] License URL.
+ * @member {string} [feedUrl] Feed URL.
+ * @member {array} [authors] List of authors.
+ * @member {string} [installationArgs] Installer command line parameters.
+ * @member {date} [publishedDateTime] Published timestamp.
+ * @member {number} [downloadCount] Count of downloads.
+ * @member {boolean} [localIsLatestVersion] true if the local
+ * version is the latest version; false otherwise.
+ * @member {string} [localPath] Local path.
+ * @member {date} [installedDateTime] Installed timestamp.
+ * @member {string} [provisioningState] Provisioning state.
+ * @member {string} [comment] Site Extension comment.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteExtensionInfo
+ *
+ * @returns {object} metadata of SiteExtensionInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteExtensionInfo',
+ type: {
+ name: 'Composite',
+ className: 'SiteExtensionInfo',
+ 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'
+ }
+ },
+ siteExtensionInfoId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'String'
+ }
+ },
+ title: {
+ required: false,
+ serializedName: 'properties.title',
+ type: {
+ name: 'String'
+ }
+ },
+ siteExtensionInfoType: {
+ required: false,
+ serializedName: 'properties.type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Gallery', 'WebRoot' ]
+ }
+ },
+ summary: {
+ required: false,
+ serializedName: 'properties.summary',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ },
+ version: {
+ required: false,
+ serializedName: 'properties.version',
+ type: {
+ name: 'String'
+ }
+ },
+ extensionUrl: {
+ required: false,
+ serializedName: 'properties.extensionUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ projectUrl: {
+ required: false,
+ serializedName: 'properties.projectUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ iconUrl: {
+ required: false,
+ serializedName: 'properties.iconUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ licenseUrl: {
+ required: false,
+ serializedName: 'properties.licenseUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ feedUrl: {
+ required: false,
+ serializedName: 'properties.feedUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ authors: {
+ required: false,
+ serializedName: 'properties.authors',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ installationArgs: {
+ required: false,
+ serializedName: 'properties.installationArgs',
+ type: {
+ name: 'String'
+ }
+ },
+ publishedDateTime: {
+ required: false,
+ serializedName: 'properties.publishedDateTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ downloadCount: {
+ required: false,
+ serializedName: 'properties.downloadCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ localIsLatestVersion: {
+ required: false,
+ serializedName: 'properties.localIsLatestVersion',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ localPath: {
+ required: false,
+ serializedName: 'properties.localPath',
+ type: {
+ name: 'String'
+ }
+ },
+ installedDateTime: {
+ required: false,
+ serializedName: 'properties.installedDateTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ provisioningState: {
+ required: false,
+ serializedName: 'properties.provisioningState',
+ type: {
+ name: 'String'
+ }
+ },
+ comment: {
+ required: false,
+ serializedName: 'properties.comment',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteExtensionInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfoCollection.js
new file mode 100644
index 0000000000..be20a01f06
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteExtensionInfoCollection.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 Kudu site extension information elements.
+ */
+class SiteExtensionInfoCollection extends Array {
+ /**
+ * Create a SiteExtensionInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteExtensionInfoCollection
+ *
+ * @returns {object} metadata of SiteExtensionInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteExtensionInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'SiteExtensionInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteExtensionInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteExtensionInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteExtensionInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteInstance.js b/lib/services/websiteManagement2/lib/lib/models/siteInstance.js
new file mode 100644
index 0000000000..850f9772ca
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteInstance.js
@@ -0,0 +1,88 @@
+/*
+ * 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');
+
+/**
+ * Instance of an app.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteInstance extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteInstance.
+ * @member {string} [siteInstanceName] Name of instance.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteInstance
+ *
+ * @returns {object} metadata of SiteInstance
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteInstance',
+ type: {
+ name: 'Composite',
+ className: 'SiteInstance',
+ 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'
+ }
+ },
+ siteInstanceName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteInstance;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteLimits.js b/lib/services/websiteManagement2/lib/lib/models/siteLimits.js
new file mode 100644
index 0000000000..48f8562cea
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteLimits.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';
+
+/**
+ * Metric limits set on an app.
+ *
+ */
+class SiteLimits {
+ /**
+ * Create a SiteLimits.
+ * @member {number} [maxPercentageCpu] Maximum allowed CPU usage percentage.
+ * @member {number} [maxMemoryInMb] Maximum allowed memory usage in MB.
+ * @member {number} [maxDiskSizeInMb] Maximum allowed disk size usage in MB.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteLimits
+ *
+ * @returns {object} metadata of SiteLimits
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteLimits',
+ type: {
+ name: 'Composite',
+ className: 'SiteLimits',
+ modelProperties: {
+ maxPercentageCpu: {
+ required: false,
+ serializedName: 'maxPercentageCpu',
+ type: {
+ name: 'Number'
+ }
+ },
+ maxMemoryInMb: {
+ required: false,
+ serializedName: 'maxMemoryInMb',
+ type: {
+ name: 'Number'
+ }
+ },
+ maxDiskSizeInMb: {
+ required: false,
+ serializedName: 'maxDiskSizeInMb',
+ type: {
+ name: 'Number'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteLimits;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteLogsConfig.js b/lib/services/websiteManagement2/lib/lib/models/siteLogsConfig.js
new file mode 100644
index 0000000000..04f1df34a8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteLogsConfig.js
@@ -0,0 +1,165 @@
+/*
+ * 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');
+
+/**
+ * Configuration of App Service site logs.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteLogsConfig extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteLogsConfig.
+ * @member {object} [applicationLogs] Application logs configuration.
+ * @member {object} [applicationLogs.fileSystem] Application logs to file
+ * system configuration.
+ * @member {string} [applicationLogs.fileSystem.level] Log level. Possible
+ * values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
+ * @member {object} [applicationLogs.azureTableStorage] Application logs to
+ * azure table storage configuration.
+ * @member {string} [applicationLogs.azureTableStorage.level] Log level.
+ * Possible values include: 'Off', 'Verbose', 'Information', 'Warning',
+ * 'Error'
+ * @member {string} [applicationLogs.azureTableStorage.sasUrl] SAS URL to an
+ * Azure table with add/query/delete permissions.
+ * @member {object} [applicationLogs.azureBlobStorage] Application logs to
+ * blob storage configuration.
+ * @member {string} [applicationLogs.azureBlobStorage.level] Log level.
+ * Possible values include: 'Off', 'Verbose', 'Information', 'Warning',
+ * 'Error'
+ * @member {string} [applicationLogs.azureBlobStorage.sasUrl] SAS url to a
+ * azure blob container with read/write/list/delete permissions.
+ * @member {number} [applicationLogs.azureBlobStorage.retentionInDays]
+ * Retention in days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {object} [httpLogs] HTTP logs configuration.
+ * @member {object} [httpLogs.fileSystem] Http logs to file system
+ * configuration.
+ * @member {number} [httpLogs.fileSystem.retentionInMb] Maximum size in
+ * megabytes that http log files can use.
+ * When reached old log files will be removed to make space for new ones.
+ * Value can range between 25 and 100.
+ * @member {number} [httpLogs.fileSystem.retentionInDays] Retention in days.
+ * Remove files older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [httpLogs.fileSystem.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ * @member {object} [httpLogs.azureBlobStorage] Http logs to azure blob
+ * storage configuration.
+ * @member {string} [httpLogs.azureBlobStorage.sasUrl] SAS url to a azure
+ * blob container with read/write/list/delete permissions.
+ * @member {number} [httpLogs.azureBlobStorage.retentionInDays] Retention in
+ * days.
+ * Remove blobs older than X days.
+ * 0 or lower means no retention.
+ * @member {boolean} [httpLogs.azureBlobStorage.enabled] True if
+ * configuration is enabled, false if it is disabled and null if
+ * configuration is not set.
+ * @member {object} [failedRequestsTracing] Failed requests tracing
+ * configuration.
+ * @member {boolean} [failedRequestsTracing.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ * @member {object} [detailedErrorMessages] Detailed error messages
+ * configuration.
+ * @member {boolean} [detailedErrorMessages.enabled] True if configuration is
+ * enabled, false if it is disabled and null if configuration is not set.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteLogsConfig
+ *
+ * @returns {object} metadata of SiteLogsConfig
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteLogsConfig',
+ type: {
+ name: 'Composite',
+ className: 'SiteLogsConfig',
+ 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'
+ }
+ },
+ applicationLogs: {
+ required: false,
+ serializedName: 'properties.applicationLogs',
+ type: {
+ name: 'Composite',
+ className: 'ApplicationLogsConfig'
+ }
+ },
+ httpLogs: {
+ required: false,
+ serializedName: 'properties.httpLogs',
+ type: {
+ name: 'Composite',
+ className: 'HttpLogsConfig'
+ }
+ },
+ failedRequestsTracing: {
+ required: false,
+ serializedName: 'properties.failedRequestsTracing',
+ type: {
+ name: 'Composite',
+ className: 'EnabledConfig'
+ }
+ },
+ detailedErrorMessages: {
+ required: false,
+ serializedName: 'properties.detailedErrorMessages',
+ type: {
+ name: 'Composite',
+ className: 'EnabledConfig'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteLogsConfig;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteMachineKey.js b/lib/services/websiteManagement2/lib/lib/models/siteMachineKey.js
new file mode 100644
index 0000000000..e60a1445f6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteMachineKey.js
@@ -0,0 +1,76 @@
+/*
+ * 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';
+
+/**
+ * MachineKey of an app.
+ *
+ */
+class SiteMachineKey {
+ /**
+ * Create a SiteMachineKey.
+ * @member {string} [validation] MachineKey validation.
+ * @member {string} [validationKey] Validation key.
+ * @member {string} [decryption] Algorithm used for decryption.
+ * @member {string} [decryptionKey] Decryption key.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteMachineKey
+ *
+ * @returns {object} metadata of SiteMachineKey
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteMachineKey',
+ type: {
+ name: 'Composite',
+ className: 'SiteMachineKey',
+ modelProperties: {
+ validation: {
+ required: false,
+ serializedName: 'validation',
+ type: {
+ name: 'String'
+ }
+ },
+ validationKey: {
+ required: false,
+ serializedName: 'validationKey',
+ type: {
+ name: 'String'
+ }
+ },
+ decryption: {
+ required: false,
+ serializedName: 'decryption',
+ type: {
+ name: 'String'
+ }
+ },
+ decryptionKey: {
+ required: false,
+ serializedName: 'decryptionKey',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteMachineKey;
diff --git a/lib/services/websiteManagement2/lib/lib/models/sitePatchResource.js b/lib/services/websiteManagement2/lib/lib/models/sitePatchResource.js
new file mode 100644
index 0000000000..91322a206d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/sitePatchResource.js
@@ -0,0 +1,636 @@
+/*
+ * 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');
+
+/**
+ * ARM resource for a site.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SitePatchResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SitePatchResource.
+ * @member {string} [state] Current state of the app.
+ * @member {array} [hostNames] Hostnames associated with the app.
+ * @member {string} [repositorySiteName] Name of the repository site.
+ * @member {string} [usageState] State indicating whether the app has
+ * exceeded its quota usage. Read-only. Possible values include: 'Normal',
+ * 'Exceeded'
+ * @member {boolean} [enabled] true if the app is enabled;
+ * otherwise, false. Setting this value to false disables the
+ * app (takes the app offline).
+ * @member {array} [enabledHostNames] Enabled hostnames for the app.Hostnames
+ * need to be assigned (see HostNames) AND enabled. Otherwise,
+ * the app is not served on those hostnames.
+ * @member {string} [availabilityState] Management information availability
+ * state for the app. Possible values include: 'Normal', 'Limited',
+ * 'DisasterRecoveryMode'
+ * @member {array} [hostNameSslStates] Hostname SSL states are used to manage
+ * the SSL bindings for app's hostnames.
+ * @member {string} [serverFarmId] Resource ID of the associated App Service
+ * plan, formatted as:
+ * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
+ * @member {boolean} [reserved] true if reserved; otherwise,
+ * false. Default value: false .
+ * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in
+ * UTC. Read-only.
+ * @member {object} [siteConfig] Configuration of the app.
+ * @member {number} [siteConfig.numberOfWorkers] Number of workers.
+ * @member {array} [siteConfig.defaultDocuments] Default documents.
+ * @member {string} [siteConfig.netFrameworkVersion] .NET Framework version.
+ * @member {string} [siteConfig.phpVersion] Version of PHP.
+ * @member {string} [siteConfig.pythonVersion] Version of Python.
+ * @member {string} [siteConfig.nodeVersion] Version of Node.js.
+ * @member {string} [siteConfig.linuxFxVersion] Linux App Framework and
+ * version
+ * @member {boolean} [siteConfig.requestTracingEnabled] true if
+ * request tracing is enabled; otherwise, false.
+ * @member {date} [siteConfig.requestTracingExpirationTime] Request tracing
+ * expiration time.
+ * @member {boolean} [siteConfig.remoteDebuggingEnabled] true if
+ * remote debugging is enabled; otherwise, false.
+ * @member {string} [siteConfig.remoteDebuggingVersion] Remote debugging
+ * version.
+ * @member {boolean} [siteConfig.httpLoggingEnabled] true if
+ * HTTP logging is enabled; otherwise, false.
+ * @member {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory
+ * size limit.
+ * @member {boolean} [siteConfig.detailedErrorLoggingEnabled]
+ * true if detailed error logging is enabled; otherwise,
+ * false.
+ * @member {string} [siteConfig.publishingUsername] Publishing user name.
+ * @member {array} [siteConfig.appSettings] Application settings.
+ * @member {array} [siteConfig.connectionStrings] Connection strings.
+ * @member {object} [siteConfig.machineKey] Site MachineKey.
+ * @member {string} [siteConfig.machineKey.validation] MachineKey validation.
+ * @member {string} [siteConfig.machineKey.validationKey] Validation key.
+ * @member {string} [siteConfig.machineKey.decryption] Algorithm used for
+ * decryption.
+ * @member {string} [siteConfig.machineKey.decryptionKey] Decryption key.
+ * @member {array} [siteConfig.handlerMappings] Handler mappings.
+ * @member {string} [siteConfig.documentRoot] Document root.
+ * @member {string} [siteConfig.scmType] SCM type. Possible values include:
+ * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit',
+ * 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg',
+ * 'OneDrive', 'VSO'
+ * @member {boolean} [siteConfig.use32BitWorkerProcess] true to
+ * use 32-bit worker process; otherwise, false.
+ * @member {boolean} [siteConfig.webSocketsEnabled] true if
+ * WebSocket is enabled; otherwise, false.
+ * @member {boolean} [siteConfig.alwaysOn] true if Always On is
+ * enabled; otherwise, false.
+ * @member {string} [siteConfig.javaVersion] Java version.
+ * @member {string} [siteConfig.javaContainer] Java container.
+ * @member {string} [siteConfig.javaContainerVersion] Java container version.
+ * @member {string} [siteConfig.appCommandLine] App command line to launch.
+ * @member {string} [siteConfig.managedPipelineMode] Managed pipeline mode.
+ * Possible values include: 'Integrated', 'Classic'
+ * @member {array} [siteConfig.virtualApplications] Virtual applications.
+ * @member {string} [siteConfig.loadBalancing] Site load balancing. Possible
+ * values include: 'WeightedRoundRobin', 'LeastRequests',
+ * 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'
+ * @member {object} [siteConfig.experiments] This is work around for
+ * polymophic types.
+ * @member {array} [siteConfig.experiments.rampUpRules] List of ramp-up
+ * rules.
+ * @member {object} [siteConfig.limits] Site limits.
+ * @member {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU
+ * usage percentage.
+ * @member {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory
+ * usage in MB.
+ * @member {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk
+ * size usage in MB.
+ * @member {boolean} [siteConfig.autoHealEnabled] true if Auto
+ * Heal is enabled; otherwise, false.
+ * @member {object} [siteConfig.autoHealRules] Auto Heal rules.
+ * @member {object} [siteConfig.autoHealRules.triggers] Conditions that
+ * describe when to execute the auto-heal actions.
+ * @member {object} [siteConfig.autoHealRules.triggers.requests] A rule based
+ * on total requests.
+ * @member {number} [siteConfig.autoHealRules.triggers.requests.count]
+ * Request Count.
+ * @member {string} [siteConfig.autoHealRules.triggers.requests.timeInterval]
+ * Time interval.
+ * @member {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A
+ * rule based on private bytes.
+ * @member {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule
+ * based on status codes.
+ * @member {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule
+ * based on request execution time.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeTaken] Time taken.
+ * @member {number} [siteConfig.autoHealRules.triggers.slowRequests.count]
+ * Request Count.
+ * @member {string}
+ * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time
+ * interval.
+ * @member {object} [siteConfig.autoHealRules.actions] Actions to be executed
+ * when a rule is triggered.
+ * @member {string} [siteConfig.autoHealRules.actions.actionType] Predefined
+ * action to be taken. Possible values include: 'Recycle', 'LogEvent',
+ * 'CustomAction'
+ * @member {object} [siteConfig.autoHealRules.actions.customAction] Custom
+ * action to be taken.
+ * @member {string} [siteConfig.autoHealRules.actions.customAction.exe]
+ * Executable to be run.
+ * @member {string}
+ * [siteConfig.autoHealRules.actions.customAction.parameters] Parameters for
+ * the executable.
+ * @member {string}
+ * [siteConfig.autoHealRules.actions.minProcessExecutionTime] Minimum time
+ * the process must execute
+ * before taking the action
+ * @member {string} [siteConfig.tracingOptions] Tracing options.
+ * @member {string} [siteConfig.vnetName] Virtual Network name.
+ * @member {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS)
+ * settings.
+ * @member {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of
+ * origins that should be allowed to make cross-origin
+ * calls (for example: http://example.com:12345). Use "*" to allow all.
+ * @member {object} [siteConfig.push] Push endpoint settings.
+ * @member {boolean} [siteConfig.push.isPushEnabled] Gets or sets a flag
+ * indicating whether the Push endpoint is enabled.
+ * @member {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON
+ * string containing a list of tags that are whitelisted for use by the push
+ * registration endpoint.
+ * @member {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON
+ * string containing a list of tags that require user authentication to be
+ * used in the push registration endpoint.
+ * Tags can consist of alphanumeric characters and the following:
+ * '_', '@', '#', '.', ':', '-'.
+ * Validation should be performed at the PushRequestHandler.
+ * @member {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON
+ * string containing a list of dynamic tags that will be evaluated from user
+ * claims in the push registration endpoint.
+ * @member {object} [siteConfig.apiDefinition] Information about the formal
+ * API definition for the app.
+ * @member {string} [siteConfig.apiDefinition.url] The URL of the API
+ * definition.
+ * @member {string} [siteConfig.autoSwapSlotName] Auto-swap slot name.
+ * @member {boolean} [siteConfig.localMySqlEnabled] true to
+ * enable local MySQL; otherwise, false.
+ * @member {array} [siteConfig.ipSecurityRestrictions] IP security
+ * restrictions.
+ * @member {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a
+ * web site to allow clients to connect over http2.0
+ * @member {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the
+ * minimum version of TLS required for SSL requests. Possible values include:
+ * '1.0', '1.1', '1.2'
+ * @member {array} [trafficManagerHostNames] Azure Traffic Manager hostnames
+ * associated with the app. Read-only.
+ * @member {boolean} [scmSiteAlsoStopped] true to stop SCM
+ * (KUDU) site when the app is stopped; otherwise, false. The
+ * default is false. Default value: false .
+ * @member {string} [targetSwapSlot] Specifies which deployment slot this app
+ * will swap into. Read-only.
+ * @member {object} [hostingEnvironmentProfile] App Service Environment to
+ * use for the app.
+ * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
+ * Service Environment.
+ * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
+ * Environment.
+ * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
+ * Service Environment.
+ * @member {boolean} [clientAffinityEnabled] true to enable
+ * client affinity; false to stop sending session affinity
+ * cookies, which route client requests in the same session to the same
+ * instance. Default is true.
+ * @member {boolean} [clientCertEnabled] true to enable client
+ * certificate authentication (TLS mutual authentication); otherwise,
+ * false. Default is false.
+ * @member {boolean} [hostNamesDisabled] true to disable the
+ * public hostnames of the app; otherwise, false.
+ * If true, the app is only accessible via API management
+ * process.
+ * @member {string} [outboundIpAddresses] List of IP addresses that the app
+ * uses for outbound connections (e.g. database access). Includes VIPs from
+ * tenants that site can be hosted with current settings. Read-only.
+ * @member {string} [possibleOutboundIpAddresses] List of IP addresses that
+ * the app uses for outbound connections (e.g. database access). Includes
+ * VIPs from all tenants. Read-only.
+ * @member {number} [containerSize] Size of the function container.
+ * @member {number} [dailyMemoryTimeQuota] Maximum allowed daily memory-time
+ * quota (applicable on dynamic apps only).
+ * @member {date} [suspendedTill] App suspended till in case memory-time
+ * quota is exceeded.
+ * @member {number} [maxNumberOfWorkers] Maximum number of workers.
+ * This only applies to Functions container.
+ * @member {object} [cloningInfo] If specified during app creation, the app
+ * is cloned from a source app.
+ * @member {uuid} [cloningInfo.correlationId] Correlation ID of cloning
+ * operation. This ID ties multiple cloning operations
+ * together to use the same snapshot.
+ * @member {boolean} [cloningInfo.overwrite] true to overwrite
+ * destination app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneCustomHostNames] true to
+ * clone custom hostnames from source app; otherwise, false.
+ * @member {boolean} [cloningInfo.cloneSourceControl] true to
+ * clone source control from source app; otherwise, false.
+ * @member {string} [cloningInfo.sourceWebAppId] ARM resource ID of the
+ * source app. App resource ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {string} [cloningInfo.hostingEnvironment] App Service Environment.
+ * @member {object} [cloningInfo.appSettingsOverrides] Application setting
+ * overrides for cloned app. If specified, these settings override the
+ * settings cloned
+ * from source app. Otherwise, application settings from source app are
+ * retained.
+ * @member {boolean} [cloningInfo.configureLoadBalancing] true
+ * to configure load balancing for source and destination app.
+ * @member {string} [cloningInfo.trafficManagerProfileId] ARM resource ID of
+ * the Traffic Manager profile to use, if it exists. Traffic Manager resource
+ * ID is of the form
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
+ * @member {string} [cloningInfo.trafficManagerProfileName] Name of Traffic
+ * Manager profile to create. This is only needed if Traffic Manager profile
+ * does not already exist.
+ * @member {boolean} [cloningInfo.ignoreQuotas] true if quotas
+ * should be ignored; otherwise, false.
+ * @member {object} [snapshotInfo] If specified during app creation, the app
+ * is created from a previous snapshot.
+ * @member {string} [snapshotInfo.snapshotTime] Point in time in which the
+ * app recovery should be attempted, formatted as a DateTime string.
+ * @member {object} [snapshotInfo.recoveryTarget] Specifies the web app that
+ * snapshot contents will be written to.
+ * @member {string} [snapshotInfo.recoveryTarget.location] Geographical
+ * location of the target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [snapshotInfo.recoveryTarget.id] ARM resource ID of the
+ * target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} [snapshotInfo.overwrite] If true the
+ * recovery operation can overwrite source app; otherwise,
+ * false.
+ * @member {boolean} [snapshotInfo.recoverConfiguration] If true, site
+ * configuration, in addition to content, will be reverted.
+ * @member {boolean} [snapshotInfo.ignoreConflictingHostNames] If true,
+ * custom hostname conflicts will be ignored when recovering to a target web
+ * app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ * @member {string} [resourceGroup] Name of the resource group the app
+ * belongs to. Read-only.
+ * @member {boolean} [isDefaultContainer] true if the app is a
+ * default container; otherwise, false.
+ * @member {string} [defaultHostName] Default hostname of the app. Read-only.
+ * @member {object} [slotSwapStatus] Status of the last deployment slot swap
+ * operation.
+ * @member {date} [slotSwapStatus.timestampUtc] The time the last successful
+ * slot swap completed.
+ * @member {string} [slotSwapStatus.sourceSlotName] The source slot of the
+ * last swap operation.
+ * @member {string} [slotSwapStatus.destinationSlotName] The destination slot
+ * of the last swap operation.
+ * @member {boolean} [httpsOnly] HttpsOnly: configures a web site to accept
+ * only https requests. Issues redirect for
+ * http requests
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SitePatchResource
+ *
+ * @returns {object} metadata of SitePatchResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SitePatchResource',
+ type: {
+ name: 'Composite',
+ className: 'SitePatchResource',
+ 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'
+ }
+ },
+ state: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.state',
+ type: {
+ name: 'String'
+ }
+ },
+ hostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.hostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ repositorySiteName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.repositorySiteName',
+ type: {
+ name: 'String'
+ }
+ },
+ usageState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.usageState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Normal', 'Exceeded' ]
+ }
+ },
+ enabled: {
+ required: false,
+ serializedName: 'properties.enabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ enabledHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.enabledHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ availabilityState: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.availabilityState',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Normal', 'Limited', 'DisasterRecoveryMode' ]
+ }
+ },
+ hostNameSslStates: {
+ required: false,
+ serializedName: 'properties.hostNameSslStates',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostNameSslStateElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostNameSslState'
+ }
+ }
+ }
+ },
+ serverFarmId: {
+ required: false,
+ serializedName: 'properties.serverFarmId',
+ type: {
+ name: 'String'
+ }
+ },
+ reserved: {
+ required: false,
+ serializedName: 'properties.reserved',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ lastModifiedTimeUtc: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.lastModifiedTimeUtc',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ siteConfig: {
+ required: false,
+ serializedName: 'properties.siteConfig',
+ type: {
+ name: 'Composite',
+ className: 'SiteConfig'
+ }
+ },
+ trafficManagerHostNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.trafficManagerHostNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ scmSiteAlsoStopped: {
+ required: false,
+ serializedName: 'properties.scmSiteAlsoStopped',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ targetSwapSlot: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.targetSwapSlot',
+ type: {
+ name: 'String'
+ }
+ },
+ hostingEnvironmentProfile: {
+ required: false,
+ serializedName: 'properties.hostingEnvironmentProfile',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentProfile'
+ }
+ },
+ clientAffinityEnabled: {
+ required: false,
+ serializedName: 'properties.clientAffinityEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ clientCertEnabled: {
+ required: false,
+ serializedName: 'properties.clientCertEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ hostNamesDisabled: {
+ required: false,
+ serializedName: 'properties.hostNamesDisabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ outboundIpAddresses: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.outboundIpAddresses',
+ type: {
+ name: 'String'
+ }
+ },
+ possibleOutboundIpAddresses: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.possibleOutboundIpAddresses',
+ type: {
+ name: 'String'
+ }
+ },
+ containerSize: {
+ required: false,
+ serializedName: 'properties.containerSize',
+ type: {
+ name: 'Number'
+ }
+ },
+ dailyMemoryTimeQuota: {
+ required: false,
+ serializedName: 'properties.dailyMemoryTimeQuota',
+ type: {
+ name: 'Number'
+ }
+ },
+ suspendedTill: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.suspendedTill',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ maxNumberOfWorkers: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.maxNumberOfWorkers',
+ type: {
+ name: 'Number'
+ }
+ },
+ cloningInfo: {
+ required: false,
+ serializedName: 'properties.cloningInfo',
+ type: {
+ name: 'Composite',
+ className: 'CloningInfo'
+ }
+ },
+ snapshotInfo: {
+ required: false,
+ serializedName: 'properties.snapshotInfo',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotRecoveryRequest'
+ }
+ },
+ resourceGroup: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ isDefaultContainer: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.isDefaultContainer',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ defaultHostName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.defaultHostName',
+ type: {
+ name: 'String'
+ }
+ },
+ slotSwapStatus: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.slotSwapStatus',
+ type: {
+ name: 'Composite',
+ className: 'SlotSwapStatus'
+ }
+ },
+ httpsOnly: {
+ required: false,
+ serializedName: 'properties.httpsOnly',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SitePatchResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/sitePhpErrorLogFlag.js b/lib/services/websiteManagement2/lib/lib/models/sitePhpErrorLogFlag.js
new file mode 100644
index 0000000000..bdd71e4e43
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/sitePhpErrorLogFlag.js
@@ -0,0 +1,113 @@
+/*
+ * 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');
+
+/**
+ * Used for getting PHP error logging flag.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SitePhpErrorLogFlag extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SitePhpErrorLogFlag.
+ * @member {string} [localLogErrors] Local log_errors setting.
+ * @member {string} [masterLogErrors] Master log_errors setting.
+ * @member {string} [localLogErrorsMaxLength] Local log_errors_max_len
+ * setting.
+ * @member {string} [masterLogErrorsMaxLength] Master log_errors_max_len
+ * setting.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SitePhpErrorLogFlag
+ *
+ * @returns {object} metadata of SitePhpErrorLogFlag
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SitePhpErrorLogFlag',
+ type: {
+ name: 'Composite',
+ className: 'SitePhpErrorLogFlag',
+ 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'
+ }
+ },
+ localLogErrors: {
+ required: false,
+ serializedName: 'properties.localLogErrors',
+ type: {
+ name: 'String'
+ }
+ },
+ masterLogErrors: {
+ required: false,
+ serializedName: 'properties.masterLogErrors',
+ type: {
+ name: 'String'
+ }
+ },
+ localLogErrorsMaxLength: {
+ required: false,
+ serializedName: 'properties.localLogErrorsMaxLength',
+ type: {
+ name: 'String'
+ }
+ },
+ masterLogErrorsMaxLength: {
+ required: false,
+ serializedName: 'properties.masterLogErrorsMaxLength',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SitePhpErrorLogFlag;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteSeal.js b/lib/services/websiteManagement2/lib/lib/models/siteSeal.js
new file mode 100644
index 0000000000..42e247d6c4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteSeal.js
@@ -0,0 +1,52 @@
+/*
+ * 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';
+
+/**
+ * Site seal
+ *
+ */
+class SiteSeal {
+ /**
+ * Create a SiteSeal.
+ * @member {string} html HTML snippet
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteSeal
+ *
+ * @returns {object} metadata of SiteSeal
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteSeal',
+ type: {
+ name: 'Composite',
+ className: 'SiteSeal',
+ modelProperties: {
+ html: {
+ required: true,
+ serializedName: 'html',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteSeal;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteSealRequest.js b/lib/services/websiteManagement2/lib/lib/models/siteSealRequest.js
new file mode 100644
index 0000000000..1745db2223
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteSealRequest.js
@@ -0,0 +1,61 @@
+/*
+ * 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';
+
+/**
+ * Site seal request.
+ *
+ */
+class SiteSealRequest {
+ /**
+ * Create a SiteSealRequest.
+ * @member {boolean} [lightTheme] If true use the light color
+ * theme for site seal; otherwise, use the default color theme.
+ * @member {string} [locale] Locale of site seal.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SiteSealRequest
+ *
+ * @returns {object} metadata of SiteSealRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteSealRequest',
+ type: {
+ name: 'Composite',
+ className: 'SiteSealRequest',
+ modelProperties: {
+ lightTheme: {
+ required: false,
+ serializedName: 'lightTheme',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ locale: {
+ required: false,
+ serializedName: 'locale',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteSealRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/siteSourceControl.js b/lib/services/websiteManagement2/lib/lib/models/siteSourceControl.js
new file mode 100644
index 0000000000..492efb717f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/siteSourceControl.js
@@ -0,0 +1,123 @@
+/*
+ * 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');
+
+/**
+ * Source control configuration for an app.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SiteSourceControl extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SiteSourceControl.
+ * @member {string} [repoUrl] Repository or source control URL.
+ * @member {string} [branch] Name of branch to use for deployment.
+ * @member {boolean} [isManualIntegration] true to limit to
+ * manual integration; false to enable continuous integration
+ * (which configures webhooks into online repos like GitHub).
+ * @member {boolean} [deploymentRollbackEnabled] true to enable
+ * deployment rollback; otherwise, false.
+ * @member {boolean} [isMercurial] true for a Mercurial
+ * repository; false for a Git repository.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SiteSourceControl
+ *
+ * @returns {object} metadata of SiteSourceControl
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SiteSourceControl',
+ type: {
+ name: 'Composite',
+ className: 'SiteSourceControl',
+ 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'
+ }
+ },
+ repoUrl: {
+ required: false,
+ serializedName: 'properties.repoUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ branch: {
+ required: false,
+ serializedName: 'properties.branch',
+ type: {
+ name: 'String'
+ }
+ },
+ isManualIntegration: {
+ required: false,
+ serializedName: 'properties.isManualIntegration',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ deploymentRollbackEnabled: {
+ required: false,
+ serializedName: 'properties.deploymentRollbackEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isMercurial: {
+ required: false,
+ serializedName: 'properties.isMercurial',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SiteSourceControl;
diff --git a/lib/services/websiteManagement2/lib/lib/models/skuCapacity.js b/lib/services/websiteManagement2/lib/lib/models/skuCapacity.js
new file mode 100644
index 0000000000..975b91bfd9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/skuCapacity.js
@@ -0,0 +1,80 @@
+/*
+ * 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';
+
+/**
+ * Description of the App Service plan scale options.
+ *
+ */
+class SkuCapacity {
+ /**
+ * Create a SkuCapacity.
+ * @member {number} [minimum] Minimum number of workers for this App Service
+ * plan SKU.
+ * @member {number} [maximum] Maximum number of workers for this App Service
+ * plan SKU.
+ * @member {number} [default] Default number of workers for this App Service
+ * plan SKU.
+ * @member {string} [scaleType] Available scale configurations for an App
+ * Service plan.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SkuCapacity
+ *
+ * @returns {object} metadata of SkuCapacity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SkuCapacity',
+ type: {
+ name: 'Composite',
+ className: 'SkuCapacity',
+ modelProperties: {
+ minimum: {
+ required: false,
+ serializedName: 'minimum',
+ type: {
+ name: 'Number'
+ }
+ },
+ maximum: {
+ required: false,
+ serializedName: 'maximum',
+ type: {
+ name: 'Number'
+ }
+ },
+ default: {
+ required: false,
+ serializedName: 'default',
+ type: {
+ name: 'Number'
+ }
+ },
+ scaleType: {
+ required: false,
+ serializedName: 'scaleType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SkuCapacity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/skuDescription.js b/lib/services/websiteManagement2/lib/lib/models/skuDescription.js
new file mode 100644
index 0000000000..25c3b62002
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/skuDescription.js
@@ -0,0 +1,137 @@
+/*
+ * 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');
+
+/**
+ * Description of a SKU for a scalable resource.
+ *
+ */
+class SkuDescription {
+ /**
+ * Create a SkuDescription.
+ * @member {string} [name] Name of the resource SKU.
+ * @member {string} [tier] Service tier of the resource SKU.
+ * @member {string} [size] Size specifier of the resource SKU.
+ * @member {string} [family] Family code of the resource SKU.
+ * @member {number} [capacity] Current number of instances assigned to the
+ * resource.
+ * @member {object} [skuCapacity] Min, max, and default scale values of the
+ * SKU.
+ * @member {number} [skuCapacity.minimum] Minimum number of workers for this
+ * App Service plan SKU.
+ * @member {number} [skuCapacity.maximum] Maximum number of workers for this
+ * App Service plan SKU.
+ * @member {number} [skuCapacity.default] Default number of workers for this
+ * App Service plan SKU.
+ * @member {string} [skuCapacity.scaleType] Available scale configurations
+ * for an App Service plan.
+ * @member {array} [locations] Locations of the SKU.
+ * @member {array} [capabilities] Capabilities of the SKU, e.g., is traffic
+ * manager enabled?
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SkuDescription
+ *
+ * @returns {object} metadata of SkuDescription
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SkuDescription',
+ type: {
+ name: 'Composite',
+ className: 'SkuDescription',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ tier: {
+ required: false,
+ serializedName: 'tier',
+ type: {
+ name: 'String'
+ }
+ },
+ size: {
+ required: false,
+ serializedName: 'size',
+ type: {
+ name: 'String'
+ }
+ },
+ family: {
+ required: false,
+ serializedName: 'family',
+ type: {
+ name: 'String'
+ }
+ },
+ capacity: {
+ required: false,
+ serializedName: 'capacity',
+ type: {
+ name: 'Number'
+ }
+ },
+ skuCapacity: {
+ required: false,
+ serializedName: 'skuCapacity',
+ type: {
+ name: 'Composite',
+ className: 'SkuCapacity'
+ }
+ },
+ locations: {
+ required: false,
+ serializedName: 'locations',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ capabilities: {
+ required: false,
+ serializedName: 'capabilities',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CapabilityElementType',
+ type: {
+ name: 'Composite',
+ className: 'Capability'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SkuDescription;
diff --git a/lib/services/websiteManagement2/lib/lib/models/skuInfo.js b/lib/services/websiteManagement2/lib/lib/models/skuInfo.js
new file mode 100644
index 0000000000..ccf4d0de83
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/skuInfo.js
@@ -0,0 +1,99 @@
+/*
+ * 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');
+
+/**
+ * SKU discovery information.
+ *
+ */
+class SkuInfo {
+ /**
+ * Create a SkuInfo.
+ * @member {string} [resourceType] Resource type that this SKU applies to.
+ * @member {object} [sku] Name and tier of the SKU.
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to
+ * the resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of
+ * the SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is
+ * traffic manager enabled?
+ * @member {object} [capacity] Min, max, and default scale values of the SKU.
+ * @member {number} [capacity.minimum] Minimum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.maximum] Maximum number of workers for this App
+ * Service plan SKU.
+ * @member {number} [capacity.default] Default number of workers for this App
+ * Service plan SKU.
+ * @member {string} [capacity.scaleType] Available scale configurations for
+ * an App Service plan.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SkuInfo
+ *
+ * @returns {object} metadata of SkuInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SkuInfo',
+ type: {
+ name: 'Composite',
+ className: 'SkuInfo',
+ modelProperties: {
+ resourceType: {
+ required: false,
+ serializedName: 'resourceType',
+ type: {
+ name: 'String'
+ }
+ },
+ sku: {
+ required: false,
+ serializedName: 'sku',
+ type: {
+ name: 'Composite',
+ className: 'SkuDescription'
+ }
+ },
+ capacity: {
+ required: false,
+ serializedName: 'capacity',
+ type: {
+ name: 'Composite',
+ className: 'SkuCapacity'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SkuInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/skuInfoCollection.js b/lib/services/websiteManagement2/lib/lib/models/skuInfoCollection.js
new file mode 100644
index 0000000000..d82ba762bd
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/skuInfoCollection.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 SKU information.
+ */
+class SkuInfoCollection extends Array {
+ /**
+ * Create a SkuInfoCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SkuInfoCollection
+ *
+ * @returns {object} metadata of SkuInfoCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SkuInfoCollection',
+ type: {
+ name: 'Composite',
+ className: 'SkuInfoCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SkuInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'SkuInfo'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SkuInfoCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/skuInfos.js b/lib/services/websiteManagement2/lib/lib/models/skuInfos.js
new file mode 100644
index 0000000000..229a953e50
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/skuInfos.js
@@ -0,0 +1,70 @@
+/*
+ * 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');
+
+/**
+ * Collection of SKU information.
+ *
+ */
+class SkuInfos {
+ /**
+ * Create a SkuInfos.
+ * @member {string} [resourceType] Resource type that this SKU applies to.
+ * @member {array} [skus] List of SKUs the subscription is able to use.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SkuInfos
+ *
+ * @returns {object} metadata of SkuInfos
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SkuInfos',
+ type: {
+ name: 'Composite',
+ className: 'SkuInfos',
+ modelProperties: {
+ resourceType: {
+ required: false,
+ serializedName: 'resourceType',
+ type: {
+ name: 'String'
+ }
+ },
+ skus: {
+ required: false,
+ serializedName: 'skus',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'GlobalCsmSkuDescriptionElementType',
+ type: {
+ name: 'Composite',
+ className: 'GlobalCsmSkuDescription'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SkuInfos;
diff --git a/lib/services/websiteManagement2/lib/lib/models/slotConfigNamesResource.js b/lib/services/websiteManagement2/lib/lib/models/slotConfigNamesResource.js
new file mode 100644
index 0000000000..e64eb91f19
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/slotConfigNamesResource.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');
+
+/**
+ * Slot Config names azure resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SlotConfigNamesResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SlotConfigNamesResource.
+ * @member {array} [connectionStringNames] List of connection string names.
+ * @member {array} [appSettingNames] List of application settings names.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SlotConfigNamesResource
+ *
+ * @returns {object} metadata of SlotConfigNamesResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SlotConfigNamesResource',
+ type: {
+ name: 'Composite',
+ className: 'SlotConfigNamesResource',
+ 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'
+ }
+ },
+ connectionStringNames: {
+ required: false,
+ serializedName: 'properties.connectionStringNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ appSettingNames: {
+ required: false,
+ serializedName: 'properties.appSettingNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SlotConfigNamesResource;
diff --git a/lib/services/websiteManagement2/lib/lib/models/slotDifference.js b/lib/services/websiteManagement2/lib/lib/models/slotDifference.js
new file mode 100644
index 0000000000..f20bdff1da
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/slotDifference.js
@@ -0,0 +1,147 @@
+/*
+ * 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');
+
+/**
+ * A setting difference between two deployment slots of an app.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SlotDifference extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SlotDifference.
+ * @member {string} [slotDifferenceType] Type of the difference: Information,
+ * Warning or Error.
+ * @member {string} [settingType] The type of the setting: General,
+ * AppSetting or ConnectionString.
+ * @member {string} [diffRule] Rule that describes how to process the setting
+ * difference during a slot swap.
+ * @member {string} [settingName] Name of the setting.
+ * @member {string} [valueInCurrentSlot] Value of the setting in the current
+ * slot.
+ * @member {string} [valueInTargetSlot] Value of the setting in the target
+ * slot.
+ * @member {string} [description] Description of the setting difference.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SlotDifference
+ *
+ * @returns {object} metadata of SlotDifference
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SlotDifference',
+ type: {
+ name: 'Composite',
+ className: 'SlotDifference',
+ 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'
+ }
+ },
+ slotDifferenceType: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.type',
+ type: {
+ name: 'String'
+ }
+ },
+ settingType: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.settingType',
+ type: {
+ name: 'String'
+ }
+ },
+ diffRule: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.diffRule',
+ type: {
+ name: 'String'
+ }
+ },
+ settingName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.settingName',
+ type: {
+ name: 'String'
+ }
+ },
+ valueInCurrentSlot: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.valueInCurrentSlot',
+ type: {
+ name: 'String'
+ }
+ },
+ valueInTargetSlot: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.valueInTargetSlot',
+ type: {
+ name: 'String'
+ }
+ },
+ description: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.description',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SlotDifference;
diff --git a/lib/services/websiteManagement2/lib/lib/models/slotDifferenceCollection.js b/lib/services/websiteManagement2/lib/lib/models/slotDifferenceCollection.js
new file mode 100644
index 0000000000..ff836aff95
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/slotDifferenceCollection.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 slot differences.
+ */
+class SlotDifferenceCollection extends Array {
+ /**
+ * Create a SlotDifferenceCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SlotDifferenceCollection
+ *
+ * @returns {object} metadata of SlotDifferenceCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SlotDifferenceCollection',
+ type: {
+ name: 'Composite',
+ className: 'SlotDifferenceCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SlotDifferenceElementType',
+ type: {
+ name: 'Composite',
+ className: 'SlotDifference'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SlotDifferenceCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/slotSwapStatus.js b/lib/services/websiteManagement2/lib/lib/models/slotSwapStatus.js
new file mode 100644
index 0000000000..6d399a5285
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/slotSwapStatus.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';
+
+/**
+ * The status of the last successfull slot swap operation.
+ *
+ */
+class SlotSwapStatus {
+ /**
+ * Create a SlotSwapStatus.
+ * @member {date} [timestampUtc] The time the last successful slot swap
+ * completed.
+ * @member {string} [sourceSlotName] The source slot of the last swap
+ * operation.
+ * @member {string} [destinationSlotName] The destination slot of the last
+ * swap operation.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SlotSwapStatus
+ *
+ * @returns {object} metadata of SlotSwapStatus
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SlotSwapStatus',
+ type: {
+ name: 'Composite',
+ className: 'SlotSwapStatus',
+ modelProperties: {
+ timestampUtc: {
+ required: false,
+ readOnly: true,
+ serializedName: 'timestampUtc',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ sourceSlotName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'sourceSlotName',
+ type: {
+ name: 'String'
+ }
+ },
+ destinationSlotName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'destinationSlotName',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SlotSwapStatus;
diff --git a/lib/services/websiteManagement2/lib/lib/models/slowRequestsBasedTrigger.js b/lib/services/websiteManagement2/lib/lib/models/slowRequestsBasedTrigger.js
new file mode 100644
index 0000000000..30602cb26d
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/slowRequestsBasedTrigger.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';
+
+/**
+ * Trigger based on request execution time.
+ *
+ */
+class SlowRequestsBasedTrigger {
+ /**
+ * Create a SlowRequestsBasedTrigger.
+ * @member {string} [timeTaken] Time taken.
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SlowRequestsBasedTrigger
+ *
+ * @returns {object} metadata of SlowRequestsBasedTrigger
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SlowRequestsBasedTrigger',
+ type: {
+ name: 'Composite',
+ className: 'SlowRequestsBasedTrigger',
+ modelProperties: {
+ timeTaken: {
+ required: false,
+ serializedName: 'timeTaken',
+ type: {
+ name: 'String'
+ }
+ },
+ count: {
+ required: false,
+ serializedName: 'count',
+ type: {
+ name: 'Number'
+ }
+ },
+ timeInterval: {
+ required: false,
+ serializedName: 'timeInterval',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SlowRequestsBasedTrigger;
diff --git a/lib/services/websiteManagement2/lib/lib/models/snapshot.js b/lib/services/websiteManagement2/lib/lib/models/snapshot.js
new file mode 100644
index 0000000000..9420d3e70c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/snapshot.js
@@ -0,0 +1,88 @@
+/*
+ * 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');
+
+/**
+ * A snapshot of an app.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class Snapshot extends models['ProxyOnlyResource'] {
+ /**
+ * Create a Snapshot.
+ * @member {string} [time] The time the snapshot was taken.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Snapshot
+ *
+ * @returns {object} metadata of Snapshot
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Snapshot',
+ type: {
+ name: 'Composite',
+ className: 'Snapshot',
+ 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'
+ }
+ },
+ time: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.time',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Snapshot;
diff --git a/lib/services/websiteManagement2/lib/lib/models/snapshotCollection.js b/lib/services/websiteManagement2/lib/lib/models/snapshotCollection.js
new file mode 100644
index 0000000000..b6729f556f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/snapshotCollection.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';
+
+/**
+ * Collection of snapshots which can be used to revert an app to a previous
+ * time.
+ */
+class SnapshotCollection extends Array {
+ /**
+ * Create a SnapshotCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SnapshotCollection
+ *
+ * @returns {object} metadata of SnapshotCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SnapshotCollection',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SnapshotElementType',
+ type: {
+ name: 'Composite',
+ className: 'Snapshot'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SnapshotCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryRequest.js b/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryRequest.js
new file mode 100644
index 0000000000..e59a088c7c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryRequest.js
@@ -0,0 +1,133 @@
+/*
+ * 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');
+
+/**
+ * Details about app recovery operation.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SnapshotRecoveryRequest extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SnapshotRecoveryRequest.
+ * @member {string} [snapshotTime] Point in time in which the app recovery
+ * should be attempted, formatted as a DateTime string.
+ * @member {object} [recoveryTarget] Specifies the web app that snapshot
+ * contents will be written to.
+ * @member {string} [recoveryTarget.location] Geographical location of the
+ * target web app, e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [recoveryTarget.id] ARM resource ID of the target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ * @member {boolean} overwrite If true the recovery operation
+ * can overwrite source app; otherwise, false.
+ * @member {boolean} [recoverConfiguration] If true, site configuration, in
+ * addition to content, will be reverted.
+ * @member {boolean} [ignoreConflictingHostNames] If true, custom hostname
+ * conflicts will be ignored when recovering to a target web app.
+ * This setting is only necessary when RecoverConfiguration is enabled.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SnapshotRecoveryRequest
+ *
+ * @returns {object} metadata of SnapshotRecoveryRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SnapshotRecoveryRequest',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotRecoveryRequest',
+ 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'
+ }
+ },
+ snapshotTime: {
+ required: false,
+ serializedName: 'properties.snapshotTime',
+ type: {
+ name: 'String'
+ }
+ },
+ recoveryTarget: {
+ required: false,
+ serializedName: 'properties.recoveryTarget',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotRecoveryTarget'
+ }
+ },
+ overwrite: {
+ required: true,
+ serializedName: 'properties.overwrite',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ recoverConfiguration: {
+ required: false,
+ serializedName: 'properties.recoverConfiguration',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ ignoreConflictingHostNames: {
+ required: false,
+ serializedName: 'properties.ignoreConflictingHostNames',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SnapshotRecoveryRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryTarget.js b/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryTarget.js
new file mode 100644
index 0000000000..9770a44e27
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/snapshotRecoveryTarget.js
@@ -0,0 +1,65 @@
+/*
+ * 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';
+
+/**
+ * Specifies the web app that snapshot contents will be written to.
+ *
+ */
+class SnapshotRecoveryTarget {
+ /**
+ * Create a SnapshotRecoveryTarget.
+ * @member {string} [location] Geographical location of the target web app,
+ * e.g. SouthEastAsia, SouthCentralUS
+ * @member {string} [id] ARM resource ID of the target app.
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
+ * for production slots and
+ * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
+ * for other slots.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of SnapshotRecoveryTarget
+ *
+ * @returns {object} metadata of SnapshotRecoveryTarget
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SnapshotRecoveryTarget',
+ type: {
+ name: 'Composite',
+ className: 'SnapshotRecoveryTarget',
+ modelProperties: {
+ location: {
+ required: false,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SnapshotRecoveryTarget;
diff --git a/lib/services/websiteManagement2/lib/lib/models/solution.js b/lib/services/websiteManagement2/lib/lib/models/solution.js
new file mode 100644
index 0000000000..1b42d6409a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/solution.js
@@ -0,0 +1,134 @@
+/*
+ * 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 Solution for problems detected.
+ *
+ */
+class Solution {
+ /**
+ * Create a Solution.
+ * @member {number} [id] Solution Id.
+ * @member {string} [displayName] Display Name of the solution
+ * @member {number} [order] Order of the solution.
+ * @member {string} [description] Description of the solution
+ * @member {string} [type] Type of Solution. Possible values include:
+ * 'QuickSolution', 'DeepInvestigation', 'BestPractices'
+ * @member {array} [data] Solution Data.
+ * @member {array} [metadata] Solution Metadata.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of Solution
+ *
+ * @returns {object} metadata of Solution
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Solution',
+ type: {
+ name: 'Composite',
+ className: 'Solution',
+ modelProperties: {
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'Number'
+ }
+ },
+ displayName: {
+ required: false,
+ serializedName: 'displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ order: {
+ required: false,
+ serializedName: 'order',
+ type: {
+ name: 'Number'
+ }
+ },
+ description: {
+ required: false,
+ serializedName: 'description',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ serializedName: 'type',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'QuickSolution', 'DeepInvestigation', 'BestPractices' ]
+ }
+ },
+ data: {
+ required: false,
+ serializedName: 'data',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ArrayElementType',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ },
+ metadata: {
+ required: false,
+ serializedName: 'metadata',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'ArrayElementType',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'NameValuePairElementType',
+ type: {
+ name: 'Composite',
+ className: 'NameValuePair'
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Solution;
diff --git a/lib/services/websiteManagement2/lib/lib/models/sourceControl.js b/lib/services/websiteManagement2/lib/lib/models/sourceControl.js
new file mode 100644
index 0000000000..0c0d72a318
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/sourceControl.js
@@ -0,0 +1,119 @@
+/*
+ * 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');
+
+/**
+ * The source control OAuth token.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class SourceControl extends models['ProxyOnlyResource'] {
+ /**
+ * Create a SourceControl.
+ * @member {string} [sourceControlName] Name or source control type.
+ * @member {string} [token] OAuth access token.
+ * @member {string} [tokenSecret] OAuth access token secret.
+ * @member {string} [refreshToken] OAuth refresh token.
+ * @member {date} [expirationTime] OAuth token expiration.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SourceControl
+ *
+ * @returns {object} metadata of SourceControl
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SourceControl',
+ type: {
+ name: 'Composite',
+ className: 'SourceControl',
+ 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'
+ }
+ },
+ sourceControlName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ token: {
+ required: false,
+ serializedName: 'properties.token',
+ type: {
+ name: 'String'
+ }
+ },
+ tokenSecret: {
+ required: false,
+ serializedName: 'properties.tokenSecret',
+ type: {
+ name: 'String'
+ }
+ },
+ refreshToken: {
+ required: false,
+ serializedName: 'properties.refreshToken',
+ type: {
+ name: 'String'
+ }
+ },
+ expirationTime: {
+ required: false,
+ serializedName: 'properties.expirationTime',
+ type: {
+ name: 'DateTime'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SourceControl;
diff --git a/lib/services/websiteManagement2/lib/lib/models/sourceControlCollection.js b/lib/services/websiteManagement2/lib/lib/models/sourceControlCollection.js
new file mode 100644
index 0000000000..9fd89247ed
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/sourceControlCollection.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 source controls.
+ */
+class SourceControlCollection extends Array {
+ /**
+ * Create a SourceControlCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of SourceControlCollection
+ *
+ * @returns {object} metadata of SourceControlCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'SourceControlCollection',
+ type: {
+ name: 'Composite',
+ className: 'SourceControlCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SourceControlElementType',
+ type: {
+ name: 'Composite',
+ className: 'SourceControl'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = SourceControlCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/stackMajorVersion.js b/lib/services/websiteManagement2/lib/lib/models/stackMajorVersion.js
new file mode 100644
index 0000000000..f8a3e54984
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/stackMajorVersion.js
@@ -0,0 +1,90 @@
+/*
+ * 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');
+
+/**
+ * Application stack major version.
+ *
+ */
+class StackMajorVersion {
+ /**
+ * Create a StackMajorVersion.
+ * @member {string} [displayVersion] Application stack major version (display
+ * only).
+ * @member {string} [runtimeVersion] Application stack major version (runtime
+ * only).
+ * @member {boolean} [isDefault] true if this is the default
+ * major version; otherwise, false.
+ * @member {array} [minorVersions] Minor versions associated with the major
+ * version.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of StackMajorVersion
+ *
+ * @returns {object} metadata of StackMajorVersion
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StackMajorVersion',
+ type: {
+ name: 'Composite',
+ className: 'StackMajorVersion',
+ modelProperties: {
+ displayVersion: {
+ required: false,
+ serializedName: 'displayVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ runtimeVersion: {
+ required: false,
+ serializedName: 'runtimeVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ isDefault: {
+ required: false,
+ serializedName: 'isDefault',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ minorVersions: {
+ required: false,
+ serializedName: 'minorVersions',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StackMinorVersionElementType',
+ type: {
+ name: 'Composite',
+ className: 'StackMinorVersion'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StackMajorVersion;
diff --git a/lib/services/websiteManagement2/lib/lib/models/stackMinorVersion.js b/lib/services/websiteManagement2/lib/lib/models/stackMinorVersion.js
new file mode 100644
index 0000000000..2154f681e0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/stackMinorVersion.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';
+
+/**
+ * Application stack minor version.
+ *
+ */
+class StackMinorVersion {
+ /**
+ * Create a StackMinorVersion.
+ * @member {string} [displayVersion] Application stack minor version (display
+ * only).
+ * @member {string} [runtimeVersion] Application stack minor version (runtime
+ * only).
+ * @member {boolean} [isDefault] true if this is the default
+ * minor version; otherwise, false.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of StackMinorVersion
+ *
+ * @returns {object} metadata of StackMinorVersion
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StackMinorVersion',
+ type: {
+ name: 'Composite',
+ className: 'StackMinorVersion',
+ modelProperties: {
+ displayVersion: {
+ required: false,
+ serializedName: 'displayVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ runtimeVersion: {
+ required: false,
+ serializedName: 'runtimeVersion',
+ type: {
+ name: 'String'
+ }
+ },
+ isDefault: {
+ required: false,
+ serializedName: 'isDefault',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StackMinorVersion;
diff --git a/lib/services/websiteManagement2/lib/lib/models/stampCapacity.js b/lib/services/websiteManagement2/lib/lib/models/stampCapacity.js
new file mode 100644
index 0000000000..8cb844d445
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/stampCapacity.js
@@ -0,0 +1,136 @@
+/*
+ * 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';
+
+/**
+ * Stamp capacity information.
+ *
+ */
+class StampCapacity {
+ /**
+ * Create a StampCapacity.
+ * @member {string} [name] Name of the stamp.
+ * @member {number} [availableCapacity] Available capacity (# of machines,
+ * bytes of storage etc...).
+ * @member {number} [totalCapacity] Total capacity (# of machines, bytes of
+ * storage etc...).
+ * @member {string} [unit] Name of the unit.
+ * @member {string} [computeMode] Shared/dedicated workers. Possible values
+ * include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] Size of the machines. Possible values
+ * include: 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3'
+ * @member {number} [workerSizeId] Size ID of machines:
+ * 0 - Small
+ * 1 - Medium
+ * 2 - Large
+ * @member {boolean} [excludeFromCapacityAllocation] If true, it
+ * includes basic apps.
+ * Basic apps are not used for capacity allocation.
+ * @member {boolean} [isApplicableForAllComputeModes] true if
+ * capacity is applicable for all apps; otherwise, false.
+ * @member {string} [siteMode] Shared or Dedicated.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of StampCapacity
+ *
+ * @returns {object} metadata of StampCapacity
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StampCapacity',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacity',
+ modelProperties: {
+ name: {
+ required: false,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ availableCapacity: {
+ required: false,
+ serializedName: 'availableCapacity',
+ type: {
+ name: 'Number'
+ }
+ },
+ totalCapacity: {
+ required: false,
+ serializedName: 'totalCapacity',
+ type: {
+ name: 'Number'
+ }
+ },
+ unit: {
+ required: false,
+ serializedName: 'unit',
+ type: {
+ name: 'String'
+ }
+ },
+ computeMode: {
+ required: false,
+ serializedName: 'computeMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
+ }
+ },
+ workerSize: {
+ required: false,
+ serializedName: 'workerSize',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' ]
+ }
+ },
+ workerSizeId: {
+ required: false,
+ serializedName: 'workerSizeId',
+ type: {
+ name: 'Number'
+ }
+ },
+ excludeFromCapacityAllocation: {
+ required: false,
+ serializedName: 'excludeFromCapacityAllocation',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isApplicableForAllComputeModes: {
+ required: false,
+ serializedName: 'isApplicableForAllComputeModes',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ siteMode: {
+ required: false,
+ serializedName: 'siteMode',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StampCapacity;
diff --git a/lib/services/websiteManagement2/lib/lib/models/stampCapacityCollection.js b/lib/services/websiteManagement2/lib/lib/models/stampCapacityCollection.js
new file mode 100644
index 0000000000..0d06935381
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/stampCapacityCollection.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 stamp capacities.
+ */
+class StampCapacityCollection extends Array {
+ /**
+ * Create a StampCapacityCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of StampCapacityCollection
+ *
+ * @returns {object} metadata of StampCapacityCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StampCapacityCollection',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacityCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StampCapacityElementType',
+ type: {
+ name: 'Composite',
+ className: 'StampCapacity'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StampCapacityCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/statusCodesBasedTrigger.js b/lib/services/websiteManagement2/lib/lib/models/statusCodesBasedTrigger.js
new file mode 100644
index 0000000000..dbbf1ac65e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/statusCodesBasedTrigger.js
@@ -0,0 +1,84 @@
+/*
+ * 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';
+
+/**
+ * Trigger based on status code.
+ *
+ */
+class StatusCodesBasedTrigger {
+ /**
+ * Create a StatusCodesBasedTrigger.
+ * @member {number} [status] HTTP status code.
+ * @member {number} [subStatus] Request Sub Status.
+ * @member {number} [win32Status] Win32 error code.
+ * @member {number} [count] Request Count.
+ * @member {string} [timeInterval] Time interval.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of StatusCodesBasedTrigger
+ *
+ * @returns {object} metadata of StatusCodesBasedTrigger
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StatusCodesBasedTrigger',
+ type: {
+ name: 'Composite',
+ className: 'StatusCodesBasedTrigger',
+ modelProperties: {
+ status: {
+ required: false,
+ serializedName: 'status',
+ type: {
+ name: 'Number'
+ }
+ },
+ subStatus: {
+ required: false,
+ serializedName: 'subStatus',
+ type: {
+ name: 'Number'
+ }
+ },
+ win32Status: {
+ required: false,
+ serializedName: 'win32Status',
+ type: {
+ name: 'Number'
+ }
+ },
+ count: {
+ required: false,
+ serializedName: 'count',
+ type: {
+ name: 'Number'
+ }
+ },
+ timeInterval: {
+ required: false,
+ serializedName: 'timeInterval',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StatusCodesBasedTrigger;
diff --git a/lib/services/websiteManagement2/lib/lib/models/storageMigrationOptions.js b/lib/services/websiteManagement2/lib/lib/models/storageMigrationOptions.js
new file mode 100644
index 0000000000..de8a5cd59a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/storageMigrationOptions.js
@@ -0,0 +1,117 @@
+/*
+ * 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');
+
+/**
+ * Options for app content migration.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class StorageMigrationOptions extends models['ProxyOnlyResource'] {
+ /**
+ * Create a StorageMigrationOptions.
+ * @member {string} azurefilesConnectionString AzureFiles connection string.
+ * @member {string} azurefilesShare AzureFiles share.
+ * @member {boolean} [switchSiteAfterMigration] trueif the app
+ * should be switched over; otherwise, false. Default value:
+ * false .
+ * @member {boolean} [blockWriteAccessToSite] true if the app
+ * should be read only during copy operation; otherwise, false.
+ * Default value: false .
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of StorageMigrationOptions
+ *
+ * @returns {object} metadata of StorageMigrationOptions
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StorageMigrationOptions',
+ type: {
+ name: 'Composite',
+ className: 'StorageMigrationOptions',
+ 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'
+ }
+ },
+ azurefilesConnectionString: {
+ required: true,
+ serializedName: 'properties.azurefilesConnectionString',
+ type: {
+ name: 'String'
+ }
+ },
+ azurefilesShare: {
+ required: true,
+ serializedName: 'properties.azurefilesShare',
+ type: {
+ name: 'String'
+ }
+ },
+ switchSiteAfterMigration: {
+ required: false,
+ serializedName: 'properties.switchSiteAfterMigration',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ },
+ blockWriteAccessToSite: {
+ required: false,
+ serializedName: 'properties.blockWriteAccessToSite',
+ defaultValue: false,
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StorageMigrationOptions;
diff --git a/lib/services/websiteManagement2/lib/lib/models/storageMigrationResponse.js b/lib/services/websiteManagement2/lib/lib/models/storageMigrationResponse.js
new file mode 100644
index 0000000000..06af20fad8
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/storageMigrationResponse.js
@@ -0,0 +1,90 @@
+/*
+ * 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');
+
+/**
+ * Response for a migration of app content request.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class StorageMigrationResponse extends models['ProxyOnlyResource'] {
+ /**
+ * Create a StorageMigrationResponse.
+ * @member {string} [operationId] When server starts the migration process,
+ * it will return an operation ID identifying that particular migration
+ * operation.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of StorageMigrationResponse
+ *
+ * @returns {object} metadata of StorageMigrationResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StorageMigrationResponse',
+ type: {
+ name: 'Composite',
+ className: 'StorageMigrationResponse',
+ 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'
+ }
+ },
+ operationId: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.operationId',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StorageMigrationResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/stringDictionary.js b/lib/services/websiteManagement2/lib/lib/models/stringDictionary.js
new file mode 100644
index 0000000000..38f97b7edb
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/stringDictionary.js
@@ -0,0 +1,94 @@
+/*
+ * 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');
+
+/**
+ * String dictionary resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class StringDictionary extends models['ProxyOnlyResource'] {
+ /**
+ * Create a StringDictionary.
+ * @member {object} [properties] Settings.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of StringDictionary
+ *
+ * @returns {object} metadata of StringDictionary
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'StringDictionary',
+ type: {
+ name: 'Composite',
+ className: 'StringDictionary',
+ 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'
+ }
+ },
+ properties: {
+ required: false,
+ serializedName: 'properties',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = StringDictionary;
diff --git a/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreement.js b/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreement.js
new file mode 100644
index 0000000000..55671d5cb5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreement.js
@@ -0,0 +1,77 @@
+/*
+ * 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';
+
+/**
+ * Legal agreement for a top level domain.
+ *
+ */
+class TldLegalAgreement {
+ /**
+ * Create a TldLegalAgreement.
+ * @member {string} agreementKey Unique identifier for the agreement.
+ * @member {string} title Agreement title.
+ * @member {string} content Agreement details.
+ * @member {string} [url] URL where a copy of the agreement details is
+ * hosted.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of TldLegalAgreement
+ *
+ * @returns {object} metadata of TldLegalAgreement
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TldLegalAgreement',
+ type: {
+ name: 'Composite',
+ className: 'TldLegalAgreement',
+ modelProperties: {
+ agreementKey: {
+ required: true,
+ serializedName: 'agreementKey',
+ type: {
+ name: 'String'
+ }
+ },
+ title: {
+ required: true,
+ serializedName: 'title',
+ type: {
+ name: 'String'
+ }
+ },
+ content: {
+ required: true,
+ serializedName: 'content',
+ type: {
+ name: 'String'
+ }
+ },
+ url: {
+ required: false,
+ serializedName: 'url',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TldLegalAgreement;
diff --git a/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreementCollection.js b/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreementCollection.js
new file mode 100644
index 0000000000..78ce4ed7f2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/tldLegalAgreementCollection.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 top-level domain legal agreements.
+ */
+class TldLegalAgreementCollection extends Array {
+ /**
+ * Create a TldLegalAgreementCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TldLegalAgreementCollection
+ *
+ * @returns {object} metadata of TldLegalAgreementCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TldLegalAgreementCollection',
+ type: {
+ name: 'Composite',
+ className: 'TldLegalAgreementCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'TldLegalAgreementElementType',
+ type: {
+ name: 'Composite',
+ className: 'TldLegalAgreement'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TldLegalAgreementCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/topLevelDomain.js b/lib/services/websiteManagement2/lib/lib/models/topLevelDomain.js
new file mode 100644
index 0000000000..76d8577eaf
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/topLevelDomain.js
@@ -0,0 +1,97 @@
+/*
+ * 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');
+
+/**
+ * A top level domain object.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class TopLevelDomain extends models['ProxyOnlyResource'] {
+ /**
+ * Create a TopLevelDomain.
+ * @member {string} [domainName] Name of the top level domain.
+ * @member {boolean} [privacy] If true, then the top level
+ * domain supports domain privacy; otherwise, false.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TopLevelDomain
+ *
+ * @returns {object} metadata of TopLevelDomain
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TopLevelDomain',
+ type: {
+ name: 'Composite',
+ className: 'TopLevelDomain',
+ 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'
+ }
+ },
+ domainName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ privacy: {
+ required: false,
+ serializedName: 'properties.privacy',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TopLevelDomain;
diff --git a/lib/services/websiteManagement2/lib/lib/models/topLevelDomainAgreementOption.js b/lib/services/websiteManagement2/lib/lib/models/topLevelDomainAgreementOption.js
new file mode 100644
index 0000000000..f444781f37
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/topLevelDomainAgreementOption.js
@@ -0,0 +1,64 @@
+/*
+ * 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';
+
+/**
+ * Options for retrieving the list of top level domain legal agreements.
+ *
+ */
+class TopLevelDomainAgreementOption {
+ /**
+ * Create a TopLevelDomainAgreementOption.
+ * @member {boolean} [includePrivacy] If true, then the list of
+ * agreements will include agreements for domain privacy as well; otherwise,
+ * false.
+ * @member {boolean} [forTransfer] If true, then the list of
+ * agreements will include agreements for domain transfer as well; otherwise,
+ * false.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of TopLevelDomainAgreementOption
+ *
+ * @returns {object} metadata of TopLevelDomainAgreementOption
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TopLevelDomainAgreementOption',
+ type: {
+ name: 'Composite',
+ className: 'TopLevelDomainAgreementOption',
+ modelProperties: {
+ includePrivacy: {
+ required: false,
+ serializedName: 'includePrivacy',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ forTransfer: {
+ required: false,
+ serializedName: 'forTransfer',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TopLevelDomainAgreementOption;
diff --git a/lib/services/websiteManagement2/lib/lib/models/topLevelDomainCollection.js b/lib/services/websiteManagement2/lib/lib/models/topLevelDomainCollection.js
new file mode 100644
index 0000000000..aa7c32fbb3
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/topLevelDomainCollection.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 Top-level domains.
+ */
+class TopLevelDomainCollection extends Array {
+ /**
+ * Create a TopLevelDomainCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TopLevelDomainCollection
+ *
+ * @returns {object} metadata of TopLevelDomainCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TopLevelDomainCollection',
+ type: {
+ name: 'Composite',
+ className: 'TopLevelDomainCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'TopLevelDomainElementType',
+ type: {
+ name: 'Composite',
+ className: 'TopLevelDomain'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TopLevelDomainCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistory.js b/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistory.js
new file mode 100644
index 0000000000..dda09c1cae
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistory.js
@@ -0,0 +1,96 @@
+/*
+ * 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');
+
+/**
+ * Triggered Web Job History. List of Triggered Web Job Run Information
+ * elements.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class TriggeredJobHistory extends models['ProxyOnlyResource'] {
+ /**
+ * Create a TriggeredJobHistory.
+ * @member {array} [triggeredJobRuns] List of triggered web job runs.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TriggeredJobHistory
+ *
+ * @returns {object} metadata of TriggeredJobHistory
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TriggeredJobHistory',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobHistory',
+ 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'
+ }
+ },
+ triggeredJobRuns: {
+ required: false,
+ serializedName: 'properties.triggeredJobRuns',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'TriggeredJobRunElementType',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobRun'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TriggeredJobHistory;
diff --git a/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistoryCollection.js b/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistoryCollection.js
new file mode 100644
index 0000000000..37516f3fba
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/triggeredJobHistoryCollection.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 Kudu continuous web job information elements.
+ */
+class TriggeredJobHistoryCollection extends Array {
+ /**
+ * Create a TriggeredJobHistoryCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TriggeredJobHistoryCollection
+ *
+ * @returns {object} metadata of TriggeredJobHistoryCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TriggeredJobHistoryCollection',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobHistoryCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'TriggeredJobHistoryElementType',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobHistory'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TriggeredJobHistoryCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/triggeredJobRun.js b/lib/services/websiteManagement2/lib/lib/models/triggeredJobRun.js
new file mode 100644
index 0000000000..dafb649e30
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/triggeredJobRun.js
@@ -0,0 +1,170 @@
+/*
+ * 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');
+
+/**
+ * Triggered Web Job Run Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class TriggeredJobRun extends models['ProxyOnlyResource'] {
+ /**
+ * Create a TriggeredJobRun.
+ * @member {string} [triggeredJobRunId] Job ID.
+ * @member {string} [triggeredJobRunName] Job name.
+ * @member {string} [status] Job status. Possible values include: 'Success',
+ * 'Failed', 'Error'
+ * @member {date} [startTime] Start time.
+ * @member {date} [endTime] End time.
+ * @member {string} [duration] Job duration.
+ * @member {string} [outputUrl] Output URL.
+ * @member {string} [errorUrl] Error URL.
+ * @member {string} [url] Job URL.
+ * @member {string} [jobName] Job name.
+ * @member {string} [trigger] Job trigger.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TriggeredJobRun
+ *
+ * @returns {object} metadata of TriggeredJobRun
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TriggeredJobRun',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobRun',
+ 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'
+ }
+ },
+ triggeredJobRunId: {
+ required: false,
+ serializedName: 'properties.id',
+ type: {
+ name: 'String'
+ }
+ },
+ triggeredJobRunName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ status: {
+ required: false,
+ serializedName: 'properties.status',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Success', 'Failed', 'Error' ]
+ }
+ },
+ startTime: {
+ required: false,
+ serializedName: 'properties.startTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ endTime: {
+ required: false,
+ serializedName: 'properties.endTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ duration: {
+ required: false,
+ serializedName: 'properties.duration',
+ type: {
+ name: 'String'
+ }
+ },
+ outputUrl: {
+ required: false,
+ serializedName: 'properties.outputUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ errorUrl: {
+ required: false,
+ serializedName: 'properties.errorUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ url: {
+ required: false,
+ serializedName: 'properties.url',
+ type: {
+ name: 'String'
+ }
+ },
+ jobName: {
+ required: false,
+ serializedName: 'properties.jobName',
+ type: {
+ name: 'String'
+ }
+ },
+ trigger: {
+ required: false,
+ serializedName: 'properties.trigger',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TriggeredJobRun;
diff --git a/lib/services/websiteManagement2/lib/lib/models/triggeredWebJob.js b/lib/services/websiteManagement2/lib/lib/models/triggeredWebJob.js
new file mode 100644
index 0000000000..076ffffe05
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/triggeredWebJob.js
@@ -0,0 +1,191 @@
+/*
+ * 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');
+
+/**
+ * Triggered Web Job Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class TriggeredWebJob extends models['ProxyOnlyResource'] {
+ /**
+ * Create a TriggeredWebJob.
+ * @member {object} [latestRun] Latest job run information.
+ * @member {string} [latestRun.triggeredJobRunId] Job ID.
+ * @member {string} [latestRun.triggeredJobRunName] Job name.
+ * @member {string} [latestRun.status] Job status. Possible values include:
+ * 'Success', 'Failed', 'Error'
+ * @member {date} [latestRun.startTime] Start time.
+ * @member {date} [latestRun.endTime] End time.
+ * @member {string} [latestRun.duration] Job duration.
+ * @member {string} [latestRun.outputUrl] Output URL.
+ * @member {string} [latestRun.errorUrl] Error URL.
+ * @member {string} [latestRun.url] Job URL.
+ * @member {string} [latestRun.jobName] Job name.
+ * @member {string} [latestRun.trigger] Job trigger.
+ * @member {string} [historyUrl] History URL.
+ * @member {string} [schedulerLogsUrl] Scheduler Logs URL.
+ * @member {string} [triggeredWebJobName] Job name. Used as job identifier in
+ * ARM resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include:
+ * 'Continuous', 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TriggeredWebJob
+ *
+ * @returns {object} metadata of TriggeredWebJob
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TriggeredWebJob',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredWebJob',
+ 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'
+ }
+ },
+ latestRun: {
+ required: false,
+ serializedName: 'properties.latestRun',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredJobRun'
+ }
+ },
+ historyUrl: {
+ required: false,
+ serializedName: 'properties.historyUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ schedulerLogsUrl: {
+ required: false,
+ serializedName: 'properties.schedulerLogsUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ triggeredWebJobName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ runCommand: {
+ required: false,
+ serializedName: 'properties.runCommand',
+ type: {
+ name: 'String'
+ }
+ },
+ url: {
+ required: false,
+ serializedName: 'properties.url',
+ type: {
+ name: 'String'
+ }
+ },
+ extraInfoUrl: {
+ required: false,
+ serializedName: 'properties.extraInfoUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ jobType: {
+ required: false,
+ serializedName: 'properties.jobType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Continuous', 'Triggered' ]
+ }
+ },
+ error: {
+ required: false,
+ serializedName: 'properties.error',
+ type: {
+ name: 'String'
+ }
+ },
+ usingSdk: {
+ required: false,
+ serializedName: 'properties.usingSdk',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ settings: {
+ required: false,
+ serializedName: 'properties.settings',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'ObjectElementType',
+ type: {
+ name: 'Object'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TriggeredWebJob;
diff --git a/lib/services/websiteManagement2/lib/lib/models/triggeredWebJobCollection.js b/lib/services/websiteManagement2/lib/lib/models/triggeredWebJobCollection.js
new file mode 100644
index 0000000000..4affcd2633
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/triggeredWebJobCollection.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 Kudu continuous web job information elements.
+ */
+class TriggeredWebJobCollection extends Array {
+ /**
+ * Create a TriggeredWebJobCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of TriggeredWebJobCollection
+ *
+ * @returns {object} metadata of TriggeredWebJobCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'TriggeredWebJobCollection',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredWebJobCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'TriggeredWebJobElementType',
+ type: {
+ name: 'Composite',
+ className: 'TriggeredWebJob'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = TriggeredWebJobCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/usage.js b/lib/services/websiteManagement2/lib/lib/models/usage.js
new file mode 100644
index 0000000000..a8bb508dd5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/usage.js
@@ -0,0 +1,162 @@
+/*
+ * 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');
+
+/**
+ * Usage of the quota resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class Usage extends models['ProxyOnlyResource'] {
+ /**
+ * Create a Usage.
+ * @member {string} [displayName] Friendly name shown in the UI.
+ * @member {string} [usageName] Name of the quota.
+ * @member {string} [resourceName] Name of the quota resource.
+ * @member {string} [unit] Units of measurement for the quota resource.
+ * @member {number} [currentValue] The current value of the resource counter.
+ * @member {number} [limit] The resource limit.
+ * @member {date} [nextResetTime] Next reset time for the resource counter.
+ * @member {string} [computeMode] Compute mode used for this usage. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [siteMode] Site mode used for this usage.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of Usage
+ *
+ * @returns {object} metadata of Usage
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'Usage',
+ type: {
+ name: 'Composite',
+ className: 'Usage',
+ 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'
+ }
+ },
+ displayName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.displayName',
+ type: {
+ name: 'String'
+ }
+ },
+ usageName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ resourceName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resourceName',
+ type: {
+ name: 'String'
+ }
+ },
+ unit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.unit',
+ type: {
+ name: 'String'
+ }
+ },
+ currentValue: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.currentValue',
+ type: {
+ name: 'Number'
+ }
+ },
+ limit: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.limit',
+ type: {
+ name: 'Number'
+ }
+ },
+ nextResetTime: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.nextResetTime',
+ type: {
+ name: 'DateTime'
+ }
+ },
+ computeMode: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.computeMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
+ }
+ },
+ siteMode: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.siteMode',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = Usage;
diff --git a/lib/services/websiteManagement2/lib/lib/models/usageCollection.js b/lib/services/websiteManagement2/lib/lib/models/usageCollection.js
new file mode 100644
index 0000000000..566e79b52b
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/usageCollection.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 usages.
+ */
+class UsageCollection extends Array {
+ /**
+ * Create a UsageCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of UsageCollection
+ *
+ * @returns {object} metadata of UsageCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'UsageCollection',
+ type: {
+ name: 'Composite',
+ className: 'UsageCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'UsageElementType',
+ type: {
+ name: 'Composite',
+ className: 'Usage'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = UsageCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/user.js b/lib/services/websiteManagement2/lib/lib/models/user.js
new file mode 100644
index 0000000000..8f3d0fbad6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/user.js
@@ -0,0 +1,121 @@
+/*
+ * 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');
+
+/**
+ * User crendentials used for publishing activity.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class User extends models['ProxyOnlyResource'] {
+ /**
+ * Create a User.
+ * @member {string} [userName] Username
+ * @member {string} publishingUserName Username used for publishing.
+ * @member {string} [publishingPassword] Password used for publishing.
+ * @member {string} [publishingPasswordHash] Password hash used for
+ * publishing.
+ * @member {string} [publishingPasswordHashSalt] Password hash salt used for
+ * publishing.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of User
+ *
+ * @returns {object} metadata of User
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'User',
+ type: {
+ name: 'Composite',
+ className: 'User',
+ 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'
+ }
+ },
+ userName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ publishingUserName: {
+ required: true,
+ serializedName: 'properties.publishingUserName',
+ type: {
+ name: 'String'
+ }
+ },
+ publishingPassword: {
+ required: false,
+ serializedName: 'properties.publishingPassword',
+ type: {
+ name: 'String'
+ }
+ },
+ publishingPasswordHash: {
+ required: false,
+ serializedName: 'properties.publishingPasswordHash',
+ type: {
+ name: 'String'
+ }
+ },
+ publishingPasswordHashSalt: {
+ required: false,
+ serializedName: 'properties.publishingPasswordHashSalt',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = User;
diff --git a/lib/services/websiteManagement2/lib/lib/models/validateRequest.js b/lib/services/websiteManagement2/lib/lib/models/validateRequest.js
new file mode 100644
index 0000000000..479983a00f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/validateRequest.js
@@ -0,0 +1,126 @@
+/*
+ * 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';
+
+/**
+ * Resource validation request content.
+ *
+ */
+class ValidateRequest {
+ /**
+ * Create a ValidateRequest.
+ * @member {string} name Resource name to verify.
+ * @member {string} type Resource type used for verification. Possible values
+ * include: 'ServerFarm', 'Site'
+ * @member {string} location Expected location of the resource.
+ * @member {string} [serverFarmId] ARM resource ID of an App Service plan
+ * that would host the app.
+ * @member {string} [skuName] Name of the target SKU for the App Service
+ * plan.
+ * @member {boolean} [needLinuxWorkers] true if App Service plan
+ * is for Linux workers; otherwise, false.
+ * @member {boolean} [isSpot] true if App Service plan is for
+ * Spot instances; otherwise, false.
+ * @member {number} [capacity] Target capacity of the App Service plan
+ * (number of VM's).
+ * @member {string} [hostingEnvironment] Name of App Service Environment
+ * where app or App Service plan should be created.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ValidateRequest
+ *
+ * @returns {object} metadata of ValidateRequest
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ValidateRequest',
+ type: {
+ name: 'Composite',
+ className: 'ValidateRequest',
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ location: {
+ required: true,
+ serializedName: 'location',
+ type: {
+ name: 'String'
+ }
+ },
+ serverFarmId: {
+ required: false,
+ serializedName: 'properties.serverFarmId',
+ type: {
+ name: 'String'
+ }
+ },
+ skuName: {
+ required: false,
+ serializedName: 'properties.skuName',
+ type: {
+ name: 'String'
+ }
+ },
+ needLinuxWorkers: {
+ required: false,
+ serializedName: 'properties.needLinuxWorkers',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ isSpot: {
+ required: false,
+ serializedName: 'properties.isSpot',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ capacity: {
+ required: false,
+ serializedName: 'properties.capacity',
+ constraints: {
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: 'Number'
+ }
+ },
+ hostingEnvironment: {
+ required: false,
+ serializedName: 'properties.hostingEnvironment',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ValidateRequest;
diff --git a/lib/services/websiteManagement2/lib/lib/models/validateResponse.js b/lib/services/websiteManagement2/lib/lib/models/validateResponse.js
new file mode 100644
index 0000000000..e36d4735e4
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/validateResponse.js
@@ -0,0 +1,65 @@
+/*
+ * 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');
+
+/**
+ * Describes the result of resource validation.
+ *
+ */
+class ValidateResponse {
+ /**
+ * Create a ValidateResponse.
+ * @member {string} [status] Result of validation.
+ * @member {object} [error] Error details for the case when validation fails.
+ * @member {string} [error.code] Validation error code.
+ * @member {string} [error.message] Validation error message.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ValidateResponse
+ *
+ * @returns {object} metadata of ValidateResponse
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ValidateResponse',
+ type: {
+ name: 'Composite',
+ className: 'ValidateResponse',
+ modelProperties: {
+ status: {
+ required: false,
+ serializedName: 'status',
+ type: {
+ name: 'String'
+ }
+ },
+ error: {
+ required: false,
+ serializedName: 'error',
+ type: {
+ name: 'Composite',
+ className: 'ValidateResponseError'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ValidateResponse;
diff --git a/lib/services/websiteManagement2/lib/lib/models/validateResponseError.js b/lib/services/websiteManagement2/lib/lib/models/validateResponseError.js
new file mode 100644
index 0000000000..3fecb30d68
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/validateResponseError.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Error details for when validation fails.
+ *
+ */
+class ValidateResponseError {
+ /**
+ * Create a ValidateResponseError.
+ * @member {string} [code] Validation error code.
+ * @member {string} [message] Validation error message.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of ValidateResponseError
+ *
+ * @returns {object} metadata of ValidateResponseError
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'ValidateResponseError',
+ type: {
+ name: 'Composite',
+ className: 'ValidateResponseError',
+ modelProperties: {
+ code: {
+ required: false,
+ serializedName: 'code',
+ type: {
+ name: 'String'
+ }
+ },
+ message: {
+ required: false,
+ serializedName: 'message',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = ValidateResponseError;
diff --git a/lib/services/websiteManagement2/lib/lib/models/virtualApplication.js b/lib/services/websiteManagement2/lib/lib/models/virtualApplication.js
new file mode 100644
index 0000000000..c85bbd6402
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/virtualApplication.js
@@ -0,0 +1,88 @@
+/*
+ * 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');
+
+/**
+ * Virtual application in an app.
+ *
+ */
+class VirtualApplication {
+ /**
+ * Create a VirtualApplication.
+ * @member {string} [virtualPath] Virtual path.
+ * @member {string} [physicalPath] Physical path.
+ * @member {boolean} [preloadEnabled] true if preloading is
+ * enabled; otherwise, false.
+ * @member {array} [virtualDirectories] Virtual directories for virtual
+ * application.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of VirtualApplication
+ *
+ * @returns {object} metadata of VirtualApplication
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VirtualApplication',
+ type: {
+ name: 'Composite',
+ className: 'VirtualApplication',
+ modelProperties: {
+ virtualPath: {
+ required: false,
+ serializedName: 'virtualPath',
+ type: {
+ name: 'String'
+ }
+ },
+ physicalPath: {
+ required: false,
+ serializedName: 'physicalPath',
+ type: {
+ name: 'String'
+ }
+ },
+ preloadEnabled: {
+ required: false,
+ serializedName: 'preloadEnabled',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ virtualDirectories: {
+ required: false,
+ serializedName: 'virtualDirectories',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VirtualDirectoryElementType',
+ type: {
+ name: 'Composite',
+ className: 'VirtualDirectory'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VirtualApplication;
diff --git a/lib/services/websiteManagement2/lib/lib/models/virtualDirectory.js b/lib/services/websiteManagement2/lib/lib/models/virtualDirectory.js
new file mode 100644
index 0000000000..6950d3d013
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/virtualDirectory.js
@@ -0,0 +1,60 @@
+/*
+ * 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';
+
+/**
+ * Directory for virtual application.
+ *
+ */
+class VirtualDirectory {
+ /**
+ * Create a VirtualDirectory.
+ * @member {string} [virtualPath] Path to virtual application.
+ * @member {string} [physicalPath] Physical path.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of VirtualDirectory
+ *
+ * @returns {object} metadata of VirtualDirectory
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VirtualDirectory',
+ type: {
+ name: 'Composite',
+ className: 'VirtualDirectory',
+ modelProperties: {
+ virtualPath: {
+ required: false,
+ serializedName: 'virtualPath',
+ type: {
+ name: 'String'
+ }
+ },
+ physicalPath: {
+ required: false,
+ serializedName: 'physicalPath',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VirtualDirectory;
diff --git a/lib/services/websiteManagement2/lib/lib/models/virtualIPMapping.js b/lib/services/websiteManagement2/lib/lib/models/virtualIPMapping.js
new file mode 100644
index 0000000000..34ac5296e9
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/virtualIPMapping.js
@@ -0,0 +1,76 @@
+/*
+ * 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';
+
+/**
+ * Virtual IP mapping.
+ *
+ */
+class VirtualIPMapping {
+ /**
+ * Create a VirtualIPMapping.
+ * @member {string} [virtualIP] Virtual IP address.
+ * @member {number} [internalHttpPort] Internal HTTP port.
+ * @member {number} [internalHttpsPort] Internal HTTPS port.
+ * @member {boolean} [inUse] Is virtual IP mapping in use.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of VirtualIPMapping
+ *
+ * @returns {object} metadata of VirtualIPMapping
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VirtualIPMapping',
+ type: {
+ name: 'Composite',
+ className: 'VirtualIPMapping',
+ modelProperties: {
+ virtualIP: {
+ required: false,
+ serializedName: 'virtualIP',
+ type: {
+ name: 'String'
+ }
+ },
+ internalHttpPort: {
+ required: false,
+ serializedName: 'internalHttpPort',
+ type: {
+ name: 'Number'
+ }
+ },
+ internalHttpsPort: {
+ required: false,
+ serializedName: 'internalHttpsPort',
+ type: {
+ name: 'Number'
+ }
+ },
+ inUse: {
+ required: false,
+ serializedName: 'inUse',
+ type: {
+ name: 'Boolean'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VirtualIPMapping;
diff --git a/lib/services/websiteManagement2/lib/lib/models/virtualNetworkProfile.js b/lib/services/websiteManagement2/lib/lib/models/virtualNetworkProfile.js
new file mode 100644
index 0000000000..c1f1b1b162
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/virtualNetworkProfile.js
@@ -0,0 +1,78 @@
+/*
+ * 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';
+
+/**
+ * Specification for using a Virtual Network.
+ *
+ */
+class VirtualNetworkProfile {
+ /**
+ * Create a VirtualNetworkProfile.
+ * @member {string} [id] Resource id of the Virtual Network.
+ * @member {string} [name] Name of the Virtual Network (read-only).
+ * @member {string} [type] Resource type of the Virtual Network (read-only).
+ * @member {string} [subnet] Subnet within the Virtual Network.
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of VirtualNetworkProfile
+ *
+ * @returns {object} metadata of VirtualNetworkProfile
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VirtualNetworkProfile',
+ type: {
+ name: 'Composite',
+ className: 'VirtualNetworkProfile',
+ modelProperties: {
+ id: {
+ required: false,
+ serializedName: 'id',
+ type: {
+ name: 'String'
+ }
+ },
+ name: {
+ required: false,
+ readOnly: true,
+ serializedName: 'name',
+ type: {
+ name: 'String'
+ }
+ },
+ type: {
+ required: false,
+ readOnly: true,
+ serializedName: 'type',
+ type: {
+ name: 'String'
+ }
+ },
+ subnet: {
+ required: false,
+ serializedName: 'subnet',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VirtualNetworkProfile;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetGateway.js b/lib/services/websiteManagement2/lib/lib/models/vnetGateway.js
new file mode 100644
index 0000000000..1019567d6e
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetGateway.js
@@ -0,0 +1,97 @@
+/*
+ * 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');
+
+/**
+ * The Virtual Network gateway contract. This is used to give the Virtual
+ * Network gateway access to the VPN package.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetGateway extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetGateway.
+ * @member {string} [vnetName] The Virtual Network name.
+ * @member {string} vpnPackageUri The URI where the VPN package can be
+ * downloaded.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetGateway
+ *
+ * @returns {object} metadata of VnetGateway
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetGateway',
+ type: {
+ name: 'Composite',
+ className: 'VnetGateway',
+ 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'
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'properties.vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ vpnPackageUri: {
+ required: true,
+ serializedName: 'properties.vpnPackageUri',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetGateway;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetInfo.js b/lib/services/websiteManagement2/lib/lib/models/vnetInfo.js
new file mode 100644
index 0000000000..6340d209a5
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetInfo.js
@@ -0,0 +1,143 @@
+/*
+ * 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');
+
+/**
+ * Virtual Network information contract.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetInfo extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetInfo.
+ * @member {string} [vnetResourceId] The Virtual Network's resource ID.
+ * @member {string} [certThumbprint] The client certificate thumbprint.
+ * @member {buffer} [certBlob] A certificate file (.cer) blob containing the
+ * public key of the private key used to authenticate a
+ * Point-To-Site VPN connection.
+ * @member {array} [routes] The routes that this Virtual Network connection
+ * uses.
+ * @member {boolean} [resyncRequired] true if a resync is
+ * required; otherwise, false.
+ * @member {string} [dnsServers] DNS servers to be used by this Virtual
+ * Network. This should be a comma-separated list of IP addresses.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetInfo
+ *
+ * @returns {object} metadata of VnetInfo
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetInfo',
+ type: {
+ name: 'Composite',
+ className: 'VnetInfo',
+ 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'
+ }
+ },
+ vnetResourceId: {
+ required: false,
+ serializedName: 'properties.vnetResourceId',
+ type: {
+ name: 'String'
+ }
+ },
+ certThumbprint: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.certThumbprint',
+ type: {
+ name: 'String'
+ }
+ },
+ certBlob: {
+ required: false,
+ serializedName: 'properties.certBlob',
+ type: {
+ name: 'ByteArray'
+ }
+ },
+ routes: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.routes',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VnetRouteElementType',
+ type: {
+ name: 'Composite',
+ className: 'VnetRoute'
+ }
+ }
+ }
+ },
+ resyncRequired: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.resyncRequired',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ dnsServers: {
+ required: false,
+ serializedName: 'properties.dnsServers',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetInfo;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetParameters.js b/lib/services/websiteManagement2/lib/lib/models/vnetParameters.js
new file mode 100644
index 0000000000..a3a8a850f0
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetParameters.js
@@ -0,0 +1,104 @@
+/*
+ * 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');
+
+/**
+ * The required set of inputs to validate a VNET
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetParameters extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetParameters.
+ * @member {string} [vnetResourceGroup] The Resource Group of the VNET to be
+ * validated
+ * @member {string} [vnetName] The name of the VNET to be validated
+ * @member {string} [vnetSubnetName] The subnet name to be validated
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetParameters
+ *
+ * @returns {object} metadata of VnetParameters
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetParameters',
+ type: {
+ name: 'Composite',
+ className: 'VnetParameters',
+ 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'
+ }
+ },
+ vnetResourceGroup: {
+ required: false,
+ serializedName: 'properties.vnetResourceGroup',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetName: {
+ required: false,
+ serializedName: 'properties.vnetName',
+ type: {
+ name: 'String'
+ }
+ },
+ vnetSubnetName: {
+ required: false,
+ serializedName: 'properties.vnetSubnetName',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetParameters;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetRoute.js b/lib/services/websiteManagement2/lib/lib/models/vnetRoute.js
new file mode 100644
index 0000000000..5df4cf5959
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetRoute.js
@@ -0,0 +1,123 @@
+/*
+ * 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');
+
+/**
+ * Virtual Network route contract used to pass routing information for a
+ * Virtual Network.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetRoute extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetRoute.
+ * @member {string} [vnetRouteName] The name of this route. This is only
+ * returned by the server and does not need to be set by the client.
+ * @member {string} [startAddress] The starting address for this route. This
+ * may also include a CIDR notation, in which case the end address must not
+ * be specified.
+ * @member {string} [endAddress] The ending address for this route. If the
+ * start address is specified in CIDR notation, this must be omitted.
+ * @member {string} [routeType] The type of route this is:
+ * DEFAULT - By default, every app has routes to the local address ranges
+ * specified by RFC1918
+ * INHERITED - Routes inherited from the real Virtual Network routes
+ * STATIC - Static route set on the app only
+ *
+ * These values will be used for syncing an app's routes with those from a
+ * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetRoute
+ *
+ * @returns {object} metadata of VnetRoute
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetRoute',
+ type: {
+ name: 'Composite',
+ className: 'VnetRoute',
+ 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'
+ }
+ },
+ vnetRouteName: {
+ required: false,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ startAddress: {
+ required: false,
+ serializedName: 'properties.startAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ endAddress: {
+ required: false,
+ serializedName: 'properties.endAddress',
+ type: {
+ name: 'String'
+ }
+ },
+ routeType: {
+ required: false,
+ serializedName: 'properties.routeType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetRoute;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetValidationFailureDetails.js b/lib/services/websiteManagement2/lib/lib/models/vnetValidationFailureDetails.js
new file mode 100644
index 0000000000..f8b35f16b6
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetValidationFailureDetails.js
@@ -0,0 +1,105 @@
+/*
+ * 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');
+
+/**
+ * A class that describes the reason for a validation failure.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetValidationFailureDetails extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetValidationFailureDetails.
+ * @member {boolean} [failed] A flag describing whether or not validation
+ * failed.
+ * @member {array} [failedTests] A list of tests that failed in the
+ * validation.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetValidationFailureDetails
+ *
+ * @returns {object} metadata of VnetValidationFailureDetails
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetValidationFailureDetails',
+ type: {
+ name: 'Composite',
+ className: 'VnetValidationFailureDetails',
+ 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'
+ }
+ },
+ failed: {
+ required: false,
+ serializedName: 'properties.failed',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ failedTests: {
+ required: false,
+ serializedName: 'properties.failedTests',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VnetValidationTestFailureElementType',
+ type: {
+ name: 'Composite',
+ className: 'VnetValidationTestFailure'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetValidationFailureDetails;
diff --git a/lib/services/websiteManagement2/lib/lib/models/vnetValidationTestFailure.js b/lib/services/websiteManagement2/lib/lib/models/vnetValidationTestFailure.js
new file mode 100644
index 0000000000..bc2219df3a
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/vnetValidationTestFailure.js
@@ -0,0 +1,96 @@
+/*
+ * 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');
+
+/**
+ * A class that describes a test that failed during NSG and UDR validation.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class VnetValidationTestFailure extends models['ProxyOnlyResource'] {
+ /**
+ * Create a VnetValidationTestFailure.
+ * @member {string} [testName] The name of the test that failed.
+ * @member {string} [details] The details of what caused the failure, e.g.
+ * the blocking rule name, etc.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of VnetValidationTestFailure
+ *
+ * @returns {object} metadata of VnetValidationTestFailure
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'VnetValidationTestFailure',
+ type: {
+ name: 'Composite',
+ className: 'VnetValidationTestFailure',
+ 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'
+ }
+ },
+ testName: {
+ required: false,
+ serializedName: 'properties.testName',
+ type: {
+ name: 'String'
+ }
+ },
+ details: {
+ required: false,
+ serializedName: 'properties.details',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = VnetValidationTestFailure;
diff --git a/lib/services/websiteManagement2/lib/lib/models/webAppCollection.js b/lib/services/websiteManagement2/lib/lib/models/webAppCollection.js
new file mode 100644
index 0000000000..48876fe2b2
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/webAppCollection.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 App Service apps.
+ */
+class WebAppCollection extends Array {
+ /**
+ * Create a WebAppCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WebAppCollection
+ *
+ * @returns {object} metadata of WebAppCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WebAppCollection',
+ type: {
+ name: 'Composite',
+ className: 'WebAppCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteElementType',
+ type: {
+ name: 'Composite',
+ className: 'Site'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WebAppCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/webAppInstanceCollection.js b/lib/services/websiteManagement2/lib/lib/models/webAppInstanceCollection.js
new file mode 100644
index 0000000000..326dc57d43
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/webAppInstanceCollection.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 app instances.
+ */
+class WebAppInstanceCollection extends Array {
+ /**
+ * Create a WebAppInstanceCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WebAppInstanceCollection
+ *
+ * @returns {object} metadata of WebAppInstanceCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WebAppInstanceCollection',
+ type: {
+ name: 'Composite',
+ className: 'WebAppInstanceCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'SiteInstanceElementType',
+ type: {
+ name: 'Composite',
+ className: 'SiteInstance'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WebAppInstanceCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/webJob.js b/lib/services/websiteManagement2/lib/lib/models/webJob.js
new file mode 100644
index 0000000000..8f2ed44730
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/webJob.js
@@ -0,0 +1,154 @@
+/*
+ * 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');
+
+/**
+ * Web Job Information.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class WebJob extends models['ProxyOnlyResource'] {
+ /**
+ * Create a WebJob.
+ * @member {string} [webJobName] Job name. Used as job identifier in ARM
+ * resource URI.
+ * @member {string} [runCommand] Run command.
+ * @member {string} [url] Job URL.
+ * @member {string} [extraInfoUrl] Extra Info URL.
+ * @member {string} [jobType] Job type. Possible values include:
+ * 'Continuous', 'Triggered'
+ * @member {string} [error] Error information.
+ * @member {boolean} [usingSdk] Using SDK?
+ * @member {object} [settings] Job settings.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WebJob
+ *
+ * @returns {object} metadata of WebJob
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WebJob',
+ type: {
+ name: 'Composite',
+ className: 'WebJob',
+ 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'
+ }
+ },
+ webJobName: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.name',
+ type: {
+ name: 'String'
+ }
+ },
+ runCommand: {
+ required: false,
+ serializedName: 'properties.runCommand',
+ type: {
+ name: 'String'
+ }
+ },
+ url: {
+ required: false,
+ serializedName: 'properties.url',
+ type: {
+ name: 'String'
+ }
+ },
+ extraInfoUrl: {
+ required: false,
+ serializedName: 'properties.extraInfoUrl',
+ type: {
+ name: 'String'
+ }
+ },
+ jobType: {
+ required: false,
+ serializedName: 'properties.jobType',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Continuous', 'Triggered' ]
+ }
+ },
+ error: {
+ required: false,
+ serializedName: 'properties.error',
+ type: {
+ name: 'String'
+ }
+ },
+ usingSdk: {
+ required: false,
+ serializedName: 'properties.usingSdk',
+ type: {
+ name: 'Boolean'
+ }
+ },
+ settings: {
+ required: false,
+ serializedName: 'properties.settings',
+ type: {
+ name: 'Dictionary',
+ value: {
+ required: false,
+ serializedName: 'ObjectElementType',
+ type: {
+ name: 'Object'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WebJob;
diff --git a/lib/services/websiteManagement2/lib/lib/models/webJobCollection.js b/lib/services/websiteManagement2/lib/lib/models/webJobCollection.js
new file mode 100644
index 0000000000..6e3f47cb45
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/webJobCollection.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 Kudu web job information elements.
+ */
+class WebJobCollection extends Array {
+ /**
+ * Create a WebJobCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WebJobCollection
+ *
+ * @returns {object} metadata of WebJobCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WebJobCollection',
+ type: {
+ name: 'Composite',
+ className: 'WebJobCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'WebJobElementType',
+ type: {
+ name: 'Composite',
+ className: 'WebJob'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WebJobCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/workerPool.js b/lib/services/websiteManagement2/lib/lib/models/workerPool.js
new file mode 100644
index 0000000000..b7896d3594
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/workerPool.js
@@ -0,0 +1,96 @@
+/*
+ * 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';
+
+/**
+ * Worker pool of an App Service Environment.
+ *
+ */
+class WorkerPool {
+ /**
+ * Create a WorkerPool.
+ * @member {number} [workerSizeId] Worker size ID for referencing this worker
+ * pool.
+ * @member {string} [computeMode] Shared or dedicated app hosting. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] VM size of the worker pool instances.
+ * @member {number} [workerCount] Number of instances in the worker pool.
+ * @member {array} [instanceNames] Names of all instances in the worker pool
+ * (read only).
+ */
+ constructor() {
+ }
+
+ /**
+ * Defines the metadata of WorkerPool
+ *
+ * @returns {object} metadata of WorkerPool
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WorkerPool',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPool',
+ modelProperties: {
+ workerSizeId: {
+ required: false,
+ serializedName: 'workerSizeId',
+ type: {
+ name: 'Number'
+ }
+ },
+ computeMode: {
+ required: false,
+ serializedName: 'computeMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
+ }
+ },
+ workerSize: {
+ required: false,
+ serializedName: 'workerSize',
+ type: {
+ name: 'String'
+ }
+ },
+ workerCount: {
+ required: false,
+ serializedName: 'workerCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ instanceNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'instanceNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WorkerPool;
diff --git a/lib/services/websiteManagement2/lib/lib/models/workerPoolCollection.js b/lib/services/websiteManagement2/lib/lib/models/workerPoolCollection.js
new file mode 100644
index 0000000000..a2595a2197
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/workerPoolCollection.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 worker pools.
+ */
+class WorkerPoolCollection extends Array {
+ /**
+ * Create a WorkerPoolCollection.
+ * @member {string} [nextLink] Link to next page of resources.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WorkerPoolCollection
+ *
+ * @returns {object} metadata of WorkerPoolCollection
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WorkerPoolCollection',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPoolCollection',
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: '',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'WorkerPoolResourceElementType',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPoolResource'
+ }
+ }
+ }
+ },
+ nextLink: {
+ required: false,
+ readOnly: true,
+ serializedName: 'nextLink',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WorkerPoolCollection;
diff --git a/lib/services/websiteManagement2/lib/lib/models/workerPoolResource.js b/lib/services/websiteManagement2/lib/lib/models/workerPoolResource.js
new file mode 100644
index 0000000000..b8da1fe66f
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/models/workerPoolResource.js
@@ -0,0 +1,159 @@
+/*
+ * 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');
+
+/**
+ * Worker pool of an App Service Environment ARM resource.
+ *
+ * @extends models['ProxyOnlyResource']
+ */
+class WorkerPoolResource extends models['ProxyOnlyResource'] {
+ /**
+ * Create a WorkerPoolResource.
+ * @member {number} [workerSizeId] Worker size ID for referencing this worker
+ * pool.
+ * @member {string} [computeMode] Shared or dedicated app hosting. Possible
+ * values include: 'Shared', 'Dedicated', 'Dynamic'
+ * @member {string} [workerSize] VM size of the worker pool instances.
+ * @member {number} [workerCount] Number of instances in the worker pool.
+ * @member {array} [instanceNames] Names of all instances in the worker pool
+ * (read only).
+ * @member {object} [sku]
+ * @member {string} [sku.name] Name of the resource SKU.
+ * @member {string} [sku.tier] Service tier of the resource SKU.
+ * @member {string} [sku.size] Size specifier of the resource SKU.
+ * @member {string} [sku.family] Family code of the resource SKU.
+ * @member {number} [sku.capacity] Current number of instances assigned to
+ * the resource.
+ * @member {object} [sku.skuCapacity] Min, max, and default scale values of
+ * the SKU.
+ * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
+ * this App Service plan SKU.
+ * @member {number} [sku.skuCapacity.default] Default number of workers for
+ * this App Service plan SKU.
+ * @member {string} [sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ * @member {array} [sku.locations] Locations of the SKU.
+ * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is
+ * traffic manager enabled?
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * Defines the metadata of WorkerPoolResource
+ *
+ * @returns {object} metadata of WorkerPoolResource
+ *
+ */
+ mapper() {
+ return {
+ required: false,
+ serializedName: 'WorkerPoolResource',
+ type: {
+ name: 'Composite',
+ className: 'WorkerPoolResource',
+ 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'
+ }
+ },
+ workerSizeId: {
+ required: false,
+ serializedName: 'properties.workerSizeId',
+ type: {
+ name: 'Number'
+ }
+ },
+ computeMode: {
+ required: false,
+ serializedName: 'properties.computeMode',
+ type: {
+ name: 'Enum',
+ allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
+ }
+ },
+ workerSize: {
+ required: false,
+ serializedName: 'properties.workerSize',
+ type: {
+ name: 'String'
+ }
+ },
+ workerCount: {
+ required: false,
+ serializedName: 'properties.workerCount',
+ type: {
+ name: 'Number'
+ }
+ },
+ instanceNames: {
+ required: false,
+ readOnly: true,
+ serializedName: 'properties.instanceNames',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'StringElementType',
+ type: {
+ name: 'String'
+ }
+ }
+ }
+ },
+ sku: {
+ required: false,
+ serializedName: 'sku',
+ type: {
+ name: 'Composite',
+ className: 'SkuDescription'
+ }
+ }
+ }
+ }
+ };
+ }
+}
+
+module.exports = WorkerPoolResource;
diff --git a/lib/services/websiteManagement2/lib/lib/operations/appServiceCertificateOrders.js b/lib/services/websiteManagement2/lib/lib/operations/appServiceCertificateOrders.js
new file mode 100644
index 0000000000..66ac67f507
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/operations/appServiceCertificateOrders.js
@@ -0,0 +1,6774 @@
+/*
+ * 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 msRest = require('ms-rest');
+const msRestAzure = require('ms-rest-azure');
+const WebResource = msRest.WebResource;
+
+/**
+ * @summary List all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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 AppServiceCertificateOrderCollection} 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 _list(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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders';
+ 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;
+ }
+ 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['AppServiceCertificateOrderCollection']().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 Validate information for a certificate order.
+ *
+ * Validate information for a certificate order.
+ *
+ * @param {object} appServiceCertificateOrder Information for a certificate
+ * order.
+ *
+ * @param {object} [appServiceCertificateOrder.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [appServiceCertificateOrder.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [appServiceCertificateOrder.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [appServiceCertificateOrder.keySize] Certificate key size.
+ *
+ * @param {string} appServiceCertificateOrder.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [appServiceCertificateOrder.autoRenew] true if
+ * the certificate should be automatically renewed when it expires; otherwise,
+ * false.
+ *
+ * @param {string} [appServiceCertificateOrder.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [appServiceCertificateOrder.kind] Kind of resource.
+ *
+ * @param {string} appServiceCertificateOrder.location Resource Location.
+ *
+ * @param {object} [appServiceCertificateOrder.tags] Resource tags.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _validatePurchaseInformation(appServiceCertificateOrder, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ if (appServiceCertificateOrder === null || appServiceCertificateOrder === undefined) {
+ throw new Error('appServiceCertificateOrder cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation';
+ 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 = 'POST';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (appServiceCertificateOrder !== null && appServiceCertificateOrder !== undefined) {
+ let requestModelMapper = new client.models['AppServiceCertificateOrder']().mapper();
+ requestModel = client.serialize(requestModelMapper, appServiceCertificateOrder, 'appServiceCertificateOrder');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(appServiceCertificateOrder, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 AppServiceCertificateOrderCollection} 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 _listByResourceGroup(resourceGroupName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ 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;
+ }
+ 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['AppServiceCertificateOrderCollection']().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 a certificate order.
+ *
+ * Get a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order..
+ *
+ * @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 AppServiceCertificateOrder} 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 _get(resourceGroupName, certificateOrderName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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;
+ }
+ 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['AppServiceCertificateOrder']().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 Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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 AppServiceCertificateOrder} 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 _createOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateOrder']().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 Delete an existing certificate order.
+ *
+ * Delete an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteMethod(resourceGroupName, certificateOrderName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'DELETE';
+ 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 && statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @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 AppServiceCertificateOrder} 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 _update(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName cannot be null or undefined and it must be of type string.');
+ }
+ if (certificateDistinguishedName === null || certificateDistinguishedName === undefined) {
+ throw new Error('certificateDistinguishedName cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (certificateDistinguishedName !== null && certificateDistinguishedName !== undefined) {
+ let requestModelMapper = new client.models['AppServiceCertificateOrderPatchResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, certificateDistinguishedName, 'certificateDistinguishedName');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(certificateDistinguishedName, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 201) {
+ 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['AppServiceCertificateOrder']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 201) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateOrder']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary List all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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 AppServiceCertificateCollection} 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 _listCertificates(resourceGroupName, certificateOrderName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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;
+ }
+ 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['AppServiceCertificateCollection']().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 the certificate associated with a certificate order.
+ *
+ * Get the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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 AppServiceCertificateResource} 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 _getCertificate(resourceGroupName, certificateOrderName, name, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['AppServiceCertificateResource']().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 Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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 AppServiceCertificateResource} 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 _createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateResource']().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 Delete the certificate associated with a certificate order.
+ *
+ * Delete the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteCertificate(resourceGroupName, certificateOrderName, name, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'DELETE';
+ 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 && statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @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 AppServiceCertificateResource} 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 _updateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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 (keyVaultCertificate === null || keyVaultCertificate === undefined) {
+ throw new Error('keyVaultCertificate cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (keyVaultCertificate !== null && keyVaultCertificate !== undefined) {
+ let requestModelMapper = new client.models['AppServiceCertificatePatchResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, keyVaultCertificate, 'keyVaultCertificate');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(keyVaultCertificate, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 201) {
+ 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['AppServiceCertificateResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 201) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Reissue an existing certificate order.
+ *
+ * Reissue an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} reissueCertificateOrderRequest Parameters for the reissue.
+ *
+ * @param {number} [reissueCertificateOrderRequest.keySize] Certificate Key
+ * Size.
+ *
+ * @param {number} [reissueCertificateOrderRequest.delayExistingRevokeInHours]
+ * Delay in hours to revoke existing certificate after the new certificate is
+ * issued.
+ *
+ * @param {string} [reissueCertificateOrderRequest.csr] Csr to be used for
+ * re-key operation.
+ *
+ * @param {boolean} [reissueCertificateOrderRequest.isPrivateKeyExternal]
+ * Should we change the ASC type (from managed private key to external private
+ * key and vice versa).
+ *
+ * @param {string} [reissueCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName cannot be null or undefined and it must be of type string.');
+ }
+ if (reissueCertificateOrderRequest === null || reissueCertificateOrderRequest === undefined) {
+ throw new Error('reissueCertificateOrderRequest cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (reissueCertificateOrderRequest !== null && reissueCertificateOrderRequest !== undefined) {
+ let requestModelMapper = new client.models['ReissueCertificateOrderRequest']().mapper();
+ requestModel = client.serialize(requestModelMapper, reissueCertificateOrderRequest, 'reissueCertificateOrderRequest');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(reissueCertificateOrderRequest, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Renew an existing certificate order.
+ *
+ * Renew an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} renewCertificateOrderRequest Renew parameters
+ *
+ * @param {number} [renewCertificateOrderRequest.keySize] Certificate Key Size.
+ *
+ * @param {string} [renewCertificateOrderRequest.csr] Csr to be used for re-key
+ * operation.
+ *
+ * @param {boolean} [renewCertificateOrderRequest.isPrivateKeyExternal] Should
+ * we change the ASC type (from managed private key to external private key and
+ * vice versa).
+ *
+ * @param {string} [renewCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName cannot be null or undefined and it must be of type string.');
+ }
+ if (renewCertificateOrderRequest === null || renewCertificateOrderRequest === undefined) {
+ throw new Error('renewCertificateOrderRequest cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (renewCertificateOrderRequest !== null && renewCertificateOrderRequest !== undefined) {
+ let requestModelMapper = new client.models['RenewCertificateOrderRequest']().mapper();
+ requestModel = client.serialize(requestModelMapper, renewCertificateOrderRequest, 'renewCertificateOrderRequest');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(renewCertificateOrderRequest, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Resend certificate email.
+ *
+ * Resend certificate email.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _resendEmail(resourceGroupName, certificateOrderName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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 !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.name] Name of the object.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _resendRequestEmails(resourceGroupName, certificateOrderName, 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.');
+ }
+ let name = (options && options.name !== undefined) ? options.name : undefined;
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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 (name !== null && name !== undefined && typeof name.valueOf() !== 'string') {
+ throw new Error('name 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);
+ }
+ let nameIdentifier;
+ if (name !== null && name !== undefined) {
+ nameIdentifier = new client.models['NameIdentifier']();
+ nameIdentifier.name = name;
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (nameIdentifier !== null && nameIdentifier !== undefined) {
+ let requestModelMapper = new client.models['NameIdentifier']().mapper();
+ requestModel = client.serialize(requestModelMapper, nameIdentifier, 'nameIdentifier');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(nameIdentifier, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} siteSealRequest Site seal request.
+ *
+ * @param {boolean} [siteSealRequest.lightTheme] If true use the
+ * light color theme for site seal; otherwise, use the default color theme.
+ *
+ * @param {string} [siteSealRequest.locale] Locale of site seal.
+ *
+ * @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 SiteSeal} 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 _retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName cannot be null or undefined and it must be of type string.');
+ }
+ if (siteSealRequest === null || siteSealRequest === undefined) {
+ throw new Error('siteSealRequest cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (siteSealRequest !== null && siteSealRequest !== undefined) {
+ let requestModelMapper = new client.models['SiteSealRequest']().mapper();
+ requestModel = client.serialize(requestModelMapper, siteSealRequest, 'siteSealRequest');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(siteSealRequest, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // 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['SiteSeal']().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 Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _verifyDomainOwnership(resourceGroupName, certificateOrderName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'POST';
+ 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 !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Retrieve the list of certificate actions.
+ *
+ * Retrieve the list of certificate actions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _retrieveCertificateActions(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'POST';
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CertificateOrderActionElementType',
+ type: {
+ name: 'Composite',
+ className: 'CertificateOrderAction'
+ }
+ }
+ }
+ };
+ 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 Retrieve email history.
+ *
+ * Retrieve email history.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _retrieveCertificateEmailHistory(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'POST';
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CertificateEmailElementType',
+ type: {
+ name: 'Composite',
+ className: 'CertificateEmail'
+ }
+ }
+ }
+ };
+ 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 Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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 AppServiceCertificateOrder} 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 _beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName cannot be null or undefined and it must be of type string.');
+ }
+ if (certificateDistinguishedName === null || certificateDistinguishedName === undefined) {
+ throw new Error('certificateDistinguishedName cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (certificateDistinguishedName !== null && certificateDistinguishedName !== undefined) {
+ let requestModelMapper = new client.models['AppServiceCertificateOrder']().mapper();
+ requestModel = client.serialize(requestModelMapper, certificateDistinguishedName, 'certificateDistinguishedName');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(certificateDistinguishedName, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 201) {
+ 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['AppServiceCertificateOrder']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 201) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateOrder']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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 AppServiceCertificateResource} 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 _beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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.');
+ }
+ let apiVersion = '2015-08-01';
+ // Validate
+ try {
+ 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 (certificateOrderName === null || certificateOrderName === undefined || typeof certificateOrderName.valueOf() !== 'string') {
+ throw new Error('certificateOrderName 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 (keyVaultCertificate === null || keyVaultCertificate === undefined) {
+ throw new Error('keyVaultCertificate cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{certificateOrderName}', encodeURIComponent(certificateOrderName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (keyVaultCertificate !== null && keyVaultCertificate !== undefined) {
+ let requestModelMapper = new client.models['AppServiceCertificateResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, keyVaultCertificate, 'keyVaultCertificate');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(keyVaultCertificate, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 201) {
+ 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['AppServiceCertificateResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 201) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceCertificateResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary List all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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 AppServiceCertificateOrderCollection} 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 _listNext(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['AppServiceCertificateOrderCollection']().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 certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @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 AppServiceCertificateOrderCollection} 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 _listByResourceGroupNext(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['AppServiceCertificateOrderCollection']().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 all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @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 AppServiceCertificateCollection} 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 _listCertificatesNext(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['AppServiceCertificateCollection']().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 AppServiceCertificateOrders. */
+class AppServiceCertificateOrders {
+ /**
+ * Create a AppServiceCertificateOrders.
+ * @param {WebSiteManagementClient} client Reference to the service client.
+ */
+ constructor(client) {
+ this.client = client;
+ this._list = _list;
+ this._validatePurchaseInformation = _validatePurchaseInformation;
+ this._listByResourceGroup = _listByResourceGroup;
+ this._get = _get;
+ this._createOrUpdate = _createOrUpdate;
+ this._deleteMethod = _deleteMethod;
+ this._update = _update;
+ this._listCertificates = _listCertificates;
+ this._getCertificate = _getCertificate;
+ this._createOrUpdateCertificate = _createOrUpdateCertificate;
+ this._deleteCertificate = _deleteCertificate;
+ this._updateCertificate = _updateCertificate;
+ this._reissue = _reissue;
+ this._renew = _renew;
+ this._resendEmail = _resendEmail;
+ this._resendRequestEmails = _resendRequestEmails;
+ this._retrieveSiteSeal = _retrieveSiteSeal;
+ this._verifyDomainOwnership = _verifyDomainOwnership;
+ this._retrieveCertificateActions = _retrieveCertificateActions;
+ this._retrieveCertificateEmailHistory = _retrieveCertificateEmailHistory;
+ this._beginCreateOrUpdate = _beginCreateOrUpdate;
+ this._beginCreateOrUpdateCertificate = _beginCreateOrUpdateCertificate;
+ this._listNext = _listNext;
+ this._listByResourceGroupNext = _listByResourceGroupNext;
+ this._listCertificatesNext = _listCertificatesNext;
+ }
+
+ /**
+ * @summary List all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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.
+ */
+ listWithHttpOperationResponse(options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._list(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 all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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 {AppServiceCertificateOrderCollection} - 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 AppServiceCertificateOrderCollection} 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.
+ */
+ list(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._list(options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._list(options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Validate information for a certificate order.
+ *
+ * Validate information for a certificate order.
+ *
+ * @param {object} appServiceCertificateOrder Information for a certificate
+ * order.
+ *
+ * @param {object} [appServiceCertificateOrder.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [appServiceCertificateOrder.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [appServiceCertificateOrder.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [appServiceCertificateOrder.keySize] Certificate key size.
+ *
+ * @param {string} appServiceCertificateOrder.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [appServiceCertificateOrder.autoRenew] true if
+ * the certificate should be automatically renewed when it expires; otherwise,
+ * false.
+ *
+ * @param {string} [appServiceCertificateOrder.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [appServiceCertificateOrder.kind] Kind of resource.
+ *
+ * @param {string} appServiceCertificateOrder.location Resource Location.
+ *
+ * @param {object} [appServiceCertificateOrder.tags] Resource tags.
+ *
+ * @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.
+ */
+ validatePurchaseInformationWithHttpOperationResponse(appServiceCertificateOrder, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._validatePurchaseInformation(appServiceCertificateOrder, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Validate information for a certificate order.
+ *
+ * Validate information for a certificate order.
+ *
+ * @param {object} appServiceCertificateOrder Information for a certificate
+ * order.
+ *
+ * @param {object} [appServiceCertificateOrder.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [appServiceCertificateOrder.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [appServiceCertificateOrder.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [appServiceCertificateOrder.keySize] Certificate key size.
+ *
+ * @param {string} appServiceCertificateOrder.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [appServiceCertificateOrder.autoRenew] true if
+ * the certificate should be automatically renewed when it expires; otherwise,
+ * false.
+ *
+ * @param {string} [appServiceCertificateOrder.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [appServiceCertificateOrder.kind] Kind of resource.
+ *
+ * @param {string} appServiceCertificateOrder.location Resource Location.
+ *
+ * @param {object} [appServiceCertificateOrder.tags] Resource tags.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ validatePurchaseInformation(appServiceCertificateOrder, 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._validatePurchaseInformation(appServiceCertificateOrder, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._validatePurchaseInformation(appServiceCertificateOrder, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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.
+ */
+ listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listByResourceGroup(resourceGroupName, 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 certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 {AppServiceCertificateOrderCollection} - 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 AppServiceCertificateOrderCollection} 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.
+ */
+ listByResourceGroup(resourceGroupName, 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._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listByResourceGroup(resourceGroupName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get a certificate order.
+ *
+ * Get a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order..
+ *
+ * @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.
+ */
+ getWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._get(resourceGroupName, certificateOrderName, 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 a certificate order.
+ *
+ * Get a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order..
+ *
+ * @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 {AppServiceCertificateOrder} - 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 AppServiceCertificateOrder} 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.
+ */
+ get(resourceGroupName, certificateOrderName, 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._get(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._get(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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.
+ */
+ createOrUpdateWithHttpOperationResponse(resourceGroupName, certificateOrderName, certificateDistinguishedName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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 {AppServiceCertificateOrder} - 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 AppServiceCertificateOrder} 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.
+ */
+ createOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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._createOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete an existing certificate order.
+ *
+ * Delete an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ */
+ deleteMethodWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._deleteMethod(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Delete an existing certificate order.
+ *
+ * Delete an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ deleteMethod(resourceGroupName, certificateOrderName, 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._deleteMethod(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._deleteMethod(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateWithHttpOperationResponse(resourceGroupName, certificateOrderName, certificateDistinguishedName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._update(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @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 {AppServiceCertificateOrder} - 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 AppServiceCertificateOrder} 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.
+ */
+ update(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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._update(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._update(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary List all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ */
+ listCertificatesWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listCertificates(resourceGroupName, certificateOrderName, 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 all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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 {AppServiceCertificateCollection} - 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 AppServiceCertificateCollection} 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.
+ */
+ listCertificates(resourceGroupName, certificateOrderName, 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._listCertificates(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listCertificates(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the certificate associated with a certificate order.
+ *
+ * Get the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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.
+ */
+ getCertificateWithHttpOperationResponse(resourceGroupName, certificateOrderName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getCertificate(resourceGroupName, certificateOrderName, 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 Get the certificate associated with a certificate order.
+ *
+ * Get the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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 {AppServiceCertificateResource} - 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 AppServiceCertificateResource} 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.
+ */
+ getCertificate(resourceGroupName, certificateOrderName, 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._getCertificate(resourceGroupName, certificateOrderName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getCertificate(resourceGroupName, certificateOrderName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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.
+ */
+ createOrUpdateCertificateWithHttpOperationResponse(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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 {AppServiceCertificateResource} - 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 AppServiceCertificateResource} 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.
+ */
+ createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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._createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete the certificate associated with a certificate order.
+ *
+ * Delete the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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.
+ */
+ deleteCertificateWithHttpOperationResponse(resourceGroupName, certificateOrderName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._deleteCertificate(resourceGroupName, certificateOrderName, 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 Delete the certificate associated with a certificate order.
+ *
+ * Delete the certificate associated with a certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ deleteCertificate(resourceGroupName, certificateOrderName, 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._deleteCertificate(resourceGroupName, certificateOrderName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._deleteCertificate(resourceGroupName, certificateOrderName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateCertificateWithHttpOperationResponse(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._updateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @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 {AppServiceCertificateResource} - 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 AppServiceCertificateResource} 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.
+ */
+ updateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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._updateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._updateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Reissue an existing certificate order.
+ *
+ * Reissue an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} reissueCertificateOrderRequest Parameters for the reissue.
+ *
+ * @param {number} [reissueCertificateOrderRequest.keySize] Certificate Key
+ * Size.
+ *
+ * @param {number} [reissueCertificateOrderRequest.delayExistingRevokeInHours]
+ * Delay in hours to revoke existing certificate after the new certificate is
+ * issued.
+ *
+ * @param {string} [reissueCertificateOrderRequest.csr] Csr to be used for
+ * re-key operation.
+ *
+ * @param {boolean} [reissueCertificateOrderRequest.isPrivateKeyExternal]
+ * Should we change the ASC type (from managed private key to external private
+ * key and vice versa).
+ *
+ * @param {string} [reissueCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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.
+ */
+ reissueWithHttpOperationResponse(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Reissue an existing certificate order.
+ *
+ * Reissue an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} reissueCertificateOrderRequest Parameters for the reissue.
+ *
+ * @param {number} [reissueCertificateOrderRequest.keySize] Certificate Key
+ * Size.
+ *
+ * @param {number} [reissueCertificateOrderRequest.delayExistingRevokeInHours]
+ * Delay in hours to revoke existing certificate after the new certificate is
+ * issued.
+ *
+ * @param {string} [reissueCertificateOrderRequest.csr] Csr to be used for
+ * re-key operation.
+ *
+ * @param {boolean} [reissueCertificateOrderRequest.isPrivateKeyExternal]
+ * Should we change the ASC type (from managed private key to external private
+ * key and vice versa).
+ *
+ * @param {string} [reissueCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, 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._reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Renew an existing certificate order.
+ *
+ * Renew an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} renewCertificateOrderRequest Renew parameters
+ *
+ * @param {number} [renewCertificateOrderRequest.keySize] Certificate Key Size.
+ *
+ * @param {string} [renewCertificateOrderRequest.csr] Csr to be used for re-key
+ * operation.
+ *
+ * @param {boolean} [renewCertificateOrderRequest.isPrivateKeyExternal] Should
+ * we change the ASC type (from managed private key to external private key and
+ * vice versa).
+ *
+ * @param {string} [renewCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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.
+ */
+ renewWithHttpOperationResponse(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Renew an existing certificate order.
+ *
+ * Renew an existing certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} renewCertificateOrderRequest Renew parameters
+ *
+ * @param {number} [renewCertificateOrderRequest.keySize] Certificate Key Size.
+ *
+ * @param {string} [renewCertificateOrderRequest.csr] Csr to be used for re-key
+ * operation.
+ *
+ * @param {boolean} [renewCertificateOrderRequest.isPrivateKeyExternal] Should
+ * we change the ASC type (from managed private key to external private key and
+ * vice versa).
+ *
+ * @param {string} [renewCertificateOrderRequest.kind] Kind of resource.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, 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._renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Resend certificate email.
+ *
+ * Resend certificate email.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ */
+ resendEmailWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._resendEmail(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Resend certificate email.
+ *
+ * Resend certificate email.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ resendEmail(resourceGroupName, certificateOrderName, 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._resendEmail(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._resendEmail(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.name] Name of the object.
+ *
+ * @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.
+ */
+ resendRequestEmailsWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._resendRequestEmails(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.name] Name of the object.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ resendRequestEmails(resourceGroupName, certificateOrderName, 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._resendRequestEmails(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._resendRequestEmails(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} siteSealRequest Site seal request.
+ *
+ * @param {boolean} [siteSealRequest.lightTheme] If true use the
+ * light color theme for site seal; otherwise, use the default color theme.
+ *
+ * @param {string} [siteSealRequest.locale] Locale of site seal.
+ *
+ * @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.
+ */
+ retrieveSiteSealWithHttpOperationResponse(resourceGroupName, certificateOrderName, siteSealRequest, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} siteSealRequest Site seal request.
+ *
+ * @param {boolean} [siteSealRequest.lightTheme] If true use the
+ * light color theme for site seal; otherwise, use the default color theme.
+ *
+ * @param {string} [siteSealRequest.locale] Locale of site seal.
+ *
+ * @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 {SiteSeal} - 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 SiteSeal} 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.
+ */
+ retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest, 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._retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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.
+ */
+ verifyDomainOwnershipWithHttpOperationResponse(resourceGroupName, certificateOrderName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._verifyDomainOwnership(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Verify domain ownership for this certificate order.
+ *
+ * Verify domain ownership for this certificate order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ verifyDomainOwnership(resourceGroupName, certificateOrderName, 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._verifyDomainOwnership(resourceGroupName, certificateOrderName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._verifyDomainOwnership(resourceGroupName, certificateOrderName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Retrieve the list of certificate actions.
+ *
+ * Retrieve the list of certificate actions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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.
+ */
+ retrieveCertificateActionsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._retrieveCertificateActions(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 Retrieve the list of certificate actions.
+ *
+ * Retrieve the list of certificate actions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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 {Array} - 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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ retrieveCertificateActions(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._retrieveCertificateActions(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._retrieveCertificateActions(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Retrieve email history.
+ *
+ * Retrieve email history.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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.
+ */
+ retrieveCertificateEmailHistoryWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._retrieveCertificateEmailHistory(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 Retrieve email history.
+ *
+ * Retrieve email history.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the certificate order.
+ *
+ * @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 {Array} - 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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ retrieveCertificateEmailHistory(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._retrieveCertificateEmailHistory(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._retrieveCertificateEmailHistory(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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.
+ */
+ beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, certificateOrderName, certificateDistinguishedName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a certificate purchase order.
+ *
+ * Create or update a certificate purchase order.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {object} certificateDistinguishedName Distinguished name to to use
+ * for the certificate order.
+ *
+ * @param {object} [certificateDistinguishedName.certificates] State of the Key
+ * Vault secret.
+ *
+ * @param {string} [certificateDistinguishedName.distinguishedName] Certificate
+ * distinguished name.
+ *
+ * @param {number} [certificateDistinguishedName.validityInYears] Duration in
+ * years (must be between 1 and 3).
+ *
+ * @param {number} [certificateDistinguishedName.keySize] Certificate key size.
+ *
+ * @param {string} certificateDistinguishedName.productType Certificate product
+ * type. Possible values include: 'StandardDomainValidatedSsl',
+ * 'StandardDomainValidatedWildCardSsl'
+ *
+ * @param {boolean} [certificateDistinguishedName.autoRenew] true
+ * if the certificate should be automatically renewed when it expires;
+ * otherwise, false.
+ *
+ * @param {string} [certificateDistinguishedName.csr] Last CSR that was created
+ * for this order.
+ *
+ * @param {string} [certificateDistinguishedName.kind] Kind of resource.
+ *
+ * @param {string} certificateDistinguishedName.location Resource Location.
+ *
+ * @param {object} [certificateDistinguishedName.tags] Resource tags.
+ *
+ * @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 {AppServiceCertificateOrder} - 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 AppServiceCertificateOrder} 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.
+ */
+ beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, 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._beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginCreateOrUpdate(resourceGroupName, certificateOrderName, certificateDistinguishedName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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.
+ */
+ beginCreateOrUpdateCertificateWithHttpOperationResponse(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Creates or updates a certificate and associates with key vault
+ * secret.
+ *
+ * Creates or updates a certificate and associates with key vault secret.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} certificateOrderName Name of the certificate order.
+ *
+ * @param {string} name Name of the certificate.
+ *
+ * @param {object} keyVaultCertificate Key vault certificate resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultId] Key Vault resource Id.
+ *
+ * @param {string} [keyVaultCertificate.keyVaultSecretName] Key Vault secret
+ * name.
+ *
+ * @param {string} [keyVaultCertificate.kind] Kind of resource.
+ *
+ * @param {string} keyVaultCertificate.location Resource Location.
+ *
+ * @param {object} [keyVaultCertificate.tags] Resource tags.
+ *
+ * @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 {AppServiceCertificateResource} - 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 AppServiceCertificateResource} 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.
+ */
+ beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, 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._beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, keyVaultCertificate, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary List all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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.
+ */
+ listNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listNext(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 all certificate orders in a subscription.
+ *
+ * List all certificate orders in a subscription.
+ *
+ * @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 {AppServiceCertificateOrderCollection} - 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 AppServiceCertificateOrderCollection} 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.
+ */
+ listNext(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._listNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @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.
+ */
+ listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listByResourceGroupNext(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 Get certificate orders in a resource group.
+ *
+ * Get certificate orders in a resource group.
+ *
+ * @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 {AppServiceCertificateOrderCollection} - 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 AppServiceCertificateOrderCollection} 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.
+ */
+ listByResourceGroupNext(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._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listByResourceGroupNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary List all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @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.
+ */
+ listCertificatesNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listCertificatesNext(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 all certificates associated with a certificate order.
+ *
+ * List all certificates associated with a certificate order.
+ *
+ * @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 {AppServiceCertificateCollection} - 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 AppServiceCertificateCollection} 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.
+ */
+ listCertificatesNext(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._listCertificatesNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listCertificatesNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+}
+
+module.exports = AppServiceCertificateOrders;
diff --git a/lib/services/websiteManagement2/lib/lib/operations/appServiceEnvironments.js b/lib/services/websiteManagement2/lib/lib/operations/appServiceEnvironments.js
new file mode 100644
index 0000000000..77b8ecdb35
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/operations/appServiceEnvironments.js
@@ -0,0 +1,18725 @@
+/*
+ * 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 msRest = require('ms-rest');
+const msRestAzure = require('ms-rest-azure');
+const WebResource = msRest.WebResource;
+
+/**
+ * @summary Get all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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 AppServiceEnvironmentCollection} 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 _list(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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments';
+ 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;
+ }
+ 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['AppServiceEnvironmentCollection']().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 all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 AppServiceEnvironmentCollection} 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 _listByResourceGroup(resourceGroupName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ 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;
+ }
+ 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['AppServiceEnvironmentCollection']().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 the properties of an App Service Environment.
+ *
+ * Get the properties of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 AppServiceEnvironmentResource} 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 _get(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['AppServiceEnvironmentResource']().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 Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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 AppServiceEnvironmentResource} 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 _createOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceEnvironmentResource']().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 Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteMethod(resourceGroupName, name, 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.');
+ }
+
+ // Send request
+ this.beginDeleteMethod(resourceGroupName, name, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+
+ return callback(null, result, httpRequest, response);
+ });
+ });
+}
+
+/**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentPatchResourceName Name of
+ * the App Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Location of the App
+ * Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @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 AppServiceEnvironmentResource} 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 _update(resourceGroupName, name, hostingEnvironmentEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (hostingEnvironmentEnvelope === null || hostingEnvironmentEnvelope === undefined) {
+ throw new Error('hostingEnvironmentEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (hostingEnvironmentEnvelope !== null && hostingEnvironmentEnvelope !== undefined) {
+ let requestModelMapper = new client.models['AppServiceEnvironmentPatchResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, hostingEnvironmentEnvelope, 'hostingEnvironmentEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(hostingEnvironmentEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['AppServiceEnvironmentResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceEnvironmentResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 StampCapacityCollection} 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 _listCapacities(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['StampCapacityCollection']().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 IP addresses assigned to an App Service Environment.
+ *
+ * Get IP addresses assigned to an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 AddressResponse} 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 _listVips(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['AddressResponse']().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 diagnostic information for an App Service Environment.
+ *
+ * Get diagnostic information for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _listDiagnostics(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'HostingEnvironmentDiagnosticsElementType',
+ type: {
+ name: 'Composite',
+ className: 'HostingEnvironmentDiagnostics'
+ }
+ }
+ }
+ };
+ 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 a diagnostics item for an App Service Environment.
+ *
+ * Get a diagnostics item for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} diagnosticsName Name of the diagnostics item.
+ *
+ * @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 HostingEnvironmentDiagnostics} 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 _getDiagnosticsItem(resourceGroupName, name, diagnosticsName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (diagnosticsName === null || diagnosticsName === undefined || typeof diagnosticsName.valueOf() !== 'string') {
+ throw new Error('diagnosticsName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{diagnosticsName}', encodeURIComponent(diagnosticsName));
+ 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;
+ }
+ 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['HostingEnvironmentDiagnostics']().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 global metric definitions of an App Service Environment.
+ *
+ * Get global metric definitions of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 MetricDefinition} 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 _listMetricDefinitions(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['MetricDefinition']().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 global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 ResourceMetricCollection} 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 _listMetrics(resourceGroupName, name, 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.');
+ }
+ let details = (options && options.details !== undefined) ? options.details : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WorkerPoolCollection} 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 _listMultiRolePools(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['WorkerPoolCollection']().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 properties of a multi-role pool.
+ *
+ * Get properties of a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WorkerPoolResource} 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 _getMultiRolePool(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['WorkerPoolResource']().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 Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().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 Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (multiRolePoolEnvelope === null || multiRolePoolEnvelope === undefined) {
+ throw new Error('multiRolePoolEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (multiRolePoolEnvelope !== null && multiRolePoolEnvelope !== undefined) {
+ let requestModelMapper = new client.models['WorkerPoolResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, multiRolePoolEnvelope, 'multiRolePoolEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(multiRolePoolEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['WorkerPoolResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (instance === null || instance === undefined || typeof instance.valueOf() !== 'string') {
+ throw new Error('instance 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // 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}/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{instance}', encodeURIComponent(instance));
+ 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;
+ }
+ 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['ResourceMetricDefinitionCollection']().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 metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @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 ResourceMetricCollection} 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 _listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, 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.');
+ }
+ let details = (options && options.details !== undefined) ? options.details : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (instance === null || instance === undefined || typeof instance.valueOf() !== 'string') {
+ throw new Error('instance cannot be null or undefined and it must be of type string.');
+ }
+ if (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // 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';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{instance}', encodeURIComponent(instance));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMultiRoleMetricDefinitions(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['ResourceMetricDefinitionCollection']().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 metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.startTime] Beginning time of the metrics query.
+ *
+ * @param {string} [options.endTime] End time of the metrics query.
+ *
+ * @param {string} [options.timeGrain] Time granularity of the metrics query.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 ResourceMetricCollection} 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 _listMultiRoleMetrics(resourceGroupName, name, 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.');
+ }
+ 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 details = (options && options.details !== undefined) ? options.details : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (startTime !== null && startTime !== undefined && typeof startTime.valueOf() !== 'string') {
+ throw new Error('startTime must be of type string.');
+ }
+ if (endTime !== null && endTime !== undefined && typeof endTime.valueOf() !== 'string') {
+ throw new Error('endTime must be of type string.');
+ }
+ if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') {
+ throw new Error('timeGrain must be of type string.');
+ }
+ if (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (startTime !== null && startTime !== undefined) {
+ queryParameters.push('startTime=' + encodeURIComponent(startTime));
+ }
+ if (endTime !== null && endTime !== undefined) {
+ queryParameters.push('endTime=' + encodeURIComponent(endTime));
+ }
+ if (timeGrain !== null && timeGrain !== undefined) {
+ queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain));
+ }
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 SkuInfoCollection} 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 _listMultiRolePoolSkus(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['SkuInfoCollection']().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 usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 UsageCollection} 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 _listMultiRoleUsages(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['UsageCollection']().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 all currently running operations on the App Service
+ * Environment.
+ *
+ * List all currently running operations on the App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _listOperations(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'OperationElementType',
+ type: {
+ name: 'Composite',
+ className: 'Operation'
+ }
+ }
+ }
+ };
+ 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 Reboot all machines in an App Service Environment.
+ *
+ * Reboot all machines in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _reboot(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'POST';
+ 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 !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+
+/**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _resume(resourceGroupName, name, 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.');
+ }
+
+ // Send request
+ this.beginResume(resourceGroupName, name, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().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 all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 AppServicePlanCollection} 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 _listAppServicePlans(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['AppServicePlanCollection']().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 all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.propertiesToInclude] Comma separated list of app
+ * properties to include.
+ *
+ * @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 WebAppCollection} 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 _listWebApps(resourceGroupName, name, 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.');
+ }
+ let propertiesToInclude = (options && options.propertiesToInclude !== undefined) ? options.propertiesToInclude : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (propertiesToInclude !== null && propertiesToInclude !== undefined && typeof propertiesToInclude.valueOf() !== 'string') {
+ throw new Error('propertiesToInclude 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (propertiesToInclude !== null && propertiesToInclude !== undefined) {
+ queryParameters.push('propertiesToInclude=' + encodeURIComponent(propertiesToInclude));
+ }
+ 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;
+ }
+ 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['WebAppCollection']().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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _suspend(resourceGroupName, name, 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.');
+ }
+
+ // Send request
+ this.beginSuspend(resourceGroupName, name, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().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 global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 CsmUsageQuotaCollection} 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 _listUsages(resourceGroupName, name, 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.');
+ }
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['CsmUsageQuotaCollection']().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 all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WorkerPoolCollection} 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 _listWorkerPools(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['WorkerPoolCollection']().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 properties of a worker pool.
+ *
+ * Get properties of a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 WorkerPoolResource} 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 _getWorkerPool(resourceGroupName, name, workerPoolName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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;
+ }
+ 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['WorkerPoolResource']().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 Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().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 Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _updateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName cannot be null or undefined and it must be of type string.');
+ }
+ if (workerPoolEnvelope === null || workerPoolEnvelope === undefined) {
+ throw new Error('workerPoolEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (workerPoolEnvelope !== null && workerPoolEnvelope !== undefined) {
+ let requestModelMapper = new client.models['WorkerPoolResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, workerPoolEnvelope, 'workerPoolEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(workerPoolEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['WorkerPoolResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName cannot be null or undefined and it must be of type string.');
+ }
+ if (instance === null || instance === undefined || typeof instance.valueOf() !== 'string') {
+ throw new Error('instance 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // 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}/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ requestUrl = requestUrl.replace('{instance}', encodeURIComponent(instance));
+ 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;
+ }
+ 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['ResourceMetricDefinitionCollection']().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 metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 ResourceMetricCollection} 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 _listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, 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.');
+ }
+ let details = (options && options.details !== undefined) ? options.details : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName cannot be null or undefined and it must be of type string.');
+ }
+ if (instance === null || instance === undefined || typeof instance.valueOf() !== 'string') {
+ throw new Error('instance cannot be null or undefined and it must be of type string.');
+ }
+ if (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // 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';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ requestUrl = requestUrl.replace('{instance}', encodeURIComponent(instance));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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;
+ }
+ 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['ResourceMetricDefinitionCollection']().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 metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of worker pool
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 ResourceMetricCollection} 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 _listWebWorkerMetrics(resourceGroupName, name, workerPoolName, 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.');
+ }
+ let details = (options && options.details !== undefined) ? options.details : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName cannot be null or undefined and it must be of type string.');
+ }
+ if (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 SkuInfoCollection} 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 _listWorkerPoolSkus(resourceGroupName, name, workerPoolName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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;
+ }
+ 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['SkuInfoCollection']().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 usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 UsageCollection} 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 _listWebWorkerUsages(resourceGroupName, name, workerPoolName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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;
+ }
+ 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['UsageCollection']().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 Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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 AppServiceEnvironmentResource} 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 _beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (hostingEnvironmentEnvelope === null || hostingEnvironmentEnvelope === undefined) {
+ throw new Error('hostingEnvironmentEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (hostingEnvironmentEnvelope !== null && hostingEnvironmentEnvelope !== undefined) {
+ let requestModelMapper = new client.models['AppServiceEnvironmentResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, hostingEnvironmentEnvelope, 'hostingEnvironmentEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(hostingEnvironmentEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['AppServiceEnvironmentResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServiceEnvironmentResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _beginDeleteMethod(resourceGroupName, name, 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.');
+ }
+ let forceDelete = (options && options.forceDelete !== undefined) ? options.forceDelete : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (forceDelete !== null && forceDelete !== undefined && typeof forceDelete !== 'boolean') {
+ throw new Error('forceDelete must be of type boolean.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (forceDelete !== null && forceDelete !== undefined) {
+ queryParameters.push('forceDelete=' + encodeURIComponent(forceDelete.toString()));
+ }
+ queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
+ if (queryParameters.length > 0) {
+ requestUrl += '?' + queryParameters.join('&');
+ }
+
+ // Create HTTP transport objects
+ let httpRequest = new WebResource();
+ httpRequest.method = 'DELETE';
+ 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 !== 202 && statusCode !== 204 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (multiRolePoolEnvelope === null || multiRolePoolEnvelope === undefined) {
+ throw new Error('multiRolePoolEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (multiRolePoolEnvelope !== null && multiRolePoolEnvelope !== undefined) {
+ let requestModelMapper = new client.models['WorkerPoolResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, multiRolePoolEnvelope, 'multiRolePoolEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(multiRolePoolEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['WorkerPoolResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _beginResume(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'POST';
+ 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 && statusCode !== 202) {
+ 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['WebAppCollection']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _beginSuspend(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'POST';
+ 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 && statusCode !== 202) {
+ 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['WebAppCollection']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 WorkerPoolResource} 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 _beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerPoolName === null || workerPoolName === undefined || typeof workerPoolName.valueOf() !== 'string') {
+ throw new Error('workerPoolName cannot be null or undefined and it must be of type string.');
+ }
+ if (workerPoolEnvelope === null || workerPoolEnvelope === undefined) {
+ throw new Error('workerPoolEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (workerPoolEnvelope !== null && workerPoolEnvelope !== undefined) {
+ let requestModelMapper = new client.models['WorkerPoolResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, workerPoolEnvelope, 'workerPoolEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(workerPoolEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) {
+ 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['WorkerPoolResource']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WorkerPoolResource']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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 AppServiceEnvironmentCollection} 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 _listNext(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['AppServiceEnvironmentCollection']().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 all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @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 AppServiceEnvironmentCollection} 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 _listByResourceGroupNext(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['AppServiceEnvironmentCollection']().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 the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @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 StampCapacityCollection} 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 _listCapacitiesNext(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['StampCapacityCollection']().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 global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @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 ResourceMetricCollection} 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 _listMetricsNext(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['ResourceMetricCollection']().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 all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @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 WorkerPoolCollection} 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 _listMultiRolePoolsNext(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['WorkerPoolCollection']().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 metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMultiRolePoolInstanceMetricDefinitionsNext(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['ResourceMetricDefinitionCollection']().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 metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @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 ResourceMetricCollection} 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 _listMultiRolePoolInstanceMetricsNext(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['ResourceMetricCollection']().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 metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMultiRoleMetricDefinitionsNext(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['ResourceMetricDefinitionCollection']().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 metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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 ResourceMetricCollection} 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 _listMultiRoleMetricsNext(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['ResourceMetricCollection']().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 available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @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 SkuInfoCollection} 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 _listMultiRolePoolSkusNext(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['SkuInfoCollection']().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 usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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 UsageCollection} 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 _listMultiRoleUsagesNext(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['UsageCollection']().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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _resumeNext(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.');
+ }
+
+ // Send request
+ this.beginResumeNext(nextPageLink, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().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 all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @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 AppServicePlanCollection} 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 _listAppServicePlansNext(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['AppServicePlanCollection']().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 all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _listWebAppsNext(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['WebAppCollection']().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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _suspendNext(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.');
+ }
+
+ // Send request
+ this.beginSuspendNext(nextPageLink, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().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 global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @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 CsmUsageQuotaCollection} 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 _listUsagesNext(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['CsmUsageQuotaCollection']().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 all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @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 WorkerPoolCollection} 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 _listWorkerPoolsNext(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['WorkerPoolCollection']().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 metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listWorkerPoolInstanceMetricDefinitionsNext(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['ResourceMetricDefinitionCollection']().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 metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @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 ResourceMetricCollection} 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 _listWorkerPoolInstanceMetricsNext(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['ResourceMetricCollection']().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 metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listWebWorkerMetricDefinitionsNext(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['ResourceMetricDefinitionCollection']().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 metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @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 ResourceMetricCollection} 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 _listWebWorkerMetricsNext(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['ResourceMetricCollection']().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 available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @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 SkuInfoCollection} 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 _listWorkerPoolSkusNext(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['SkuInfoCollection']().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 usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @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 UsageCollection} 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 _listWebWorkerUsagesNext(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['UsageCollection']().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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _beginResumeNext(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 = 'POST';
+ 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 && statusCode !== 202) {
+ 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['WebAppCollection']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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 WebAppCollection} 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 _beginSuspendNext(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 = 'POST';
+ 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 && statusCode !== 202) {
+ 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['WebAppCollection']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['WebAppCollection']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/** Class representing a AppServiceEnvironments. */
+class AppServiceEnvironments {
+ /**
+ * Create a AppServiceEnvironments.
+ * @param {WebSiteManagementClient} client Reference to the service client.
+ */
+ constructor(client) {
+ this.client = client;
+ this._list = _list;
+ this._listByResourceGroup = _listByResourceGroup;
+ this._get = _get;
+ this._createOrUpdate = _createOrUpdate;
+ this._deleteMethod = _deleteMethod;
+ this._update = _update;
+ this._listCapacities = _listCapacities;
+ this._listVips = _listVips;
+ this._listDiagnostics = _listDiagnostics;
+ this._getDiagnosticsItem = _getDiagnosticsItem;
+ this._listMetricDefinitions = _listMetricDefinitions;
+ this._listMetrics = _listMetrics;
+ this._listMultiRolePools = _listMultiRolePools;
+ this._getMultiRolePool = _getMultiRolePool;
+ this._createOrUpdateMultiRolePool = _createOrUpdateMultiRolePool;
+ this._updateMultiRolePool = _updateMultiRolePool;
+ this._listMultiRolePoolInstanceMetricDefinitions = _listMultiRolePoolInstanceMetricDefinitions;
+ this._listMultiRolePoolInstanceMetrics = _listMultiRolePoolInstanceMetrics;
+ this._listMultiRoleMetricDefinitions = _listMultiRoleMetricDefinitions;
+ this._listMultiRoleMetrics = _listMultiRoleMetrics;
+ this._listMultiRolePoolSkus = _listMultiRolePoolSkus;
+ this._listMultiRoleUsages = _listMultiRoleUsages;
+ this._listOperations = _listOperations;
+ this._reboot = _reboot;
+ this._resume = _resume;
+ this._listAppServicePlans = _listAppServicePlans;
+ this._listWebApps = _listWebApps;
+ this._suspend = _suspend;
+ this._listUsages = _listUsages;
+ this._listWorkerPools = _listWorkerPools;
+ this._getWorkerPool = _getWorkerPool;
+ this._createOrUpdateWorkerPool = _createOrUpdateWorkerPool;
+ this._updateWorkerPool = _updateWorkerPool;
+ this._listWorkerPoolInstanceMetricDefinitions = _listWorkerPoolInstanceMetricDefinitions;
+ this._listWorkerPoolInstanceMetrics = _listWorkerPoolInstanceMetrics;
+ this._listWebWorkerMetricDefinitions = _listWebWorkerMetricDefinitions;
+ this._listWebWorkerMetrics = _listWebWorkerMetrics;
+ this._listWorkerPoolSkus = _listWorkerPoolSkus;
+ this._listWebWorkerUsages = _listWebWorkerUsages;
+ this._beginCreateOrUpdate = _beginCreateOrUpdate;
+ this._beginDeleteMethod = _beginDeleteMethod;
+ this._beginCreateOrUpdateMultiRolePool = _beginCreateOrUpdateMultiRolePool;
+ this._beginResume = _beginResume;
+ this._beginSuspend = _beginSuspend;
+ this._beginCreateOrUpdateWorkerPool = _beginCreateOrUpdateWorkerPool;
+ this._listNext = _listNext;
+ this._listByResourceGroupNext = _listByResourceGroupNext;
+ this._listCapacitiesNext = _listCapacitiesNext;
+ this._listMetricsNext = _listMetricsNext;
+ this._listMultiRolePoolsNext = _listMultiRolePoolsNext;
+ this._listMultiRolePoolInstanceMetricDefinitionsNext = _listMultiRolePoolInstanceMetricDefinitionsNext;
+ this._listMultiRolePoolInstanceMetricsNext = _listMultiRolePoolInstanceMetricsNext;
+ this._listMultiRoleMetricDefinitionsNext = _listMultiRoleMetricDefinitionsNext;
+ this._listMultiRoleMetricsNext = _listMultiRoleMetricsNext;
+ this._listMultiRolePoolSkusNext = _listMultiRolePoolSkusNext;
+ this._listMultiRoleUsagesNext = _listMultiRoleUsagesNext;
+ this._resumeNext = _resumeNext;
+ this._listAppServicePlansNext = _listAppServicePlansNext;
+ this._listWebAppsNext = _listWebAppsNext;
+ this._suspendNext = _suspendNext;
+ this._listUsagesNext = _listUsagesNext;
+ this._listWorkerPoolsNext = _listWorkerPoolsNext;
+ this._listWorkerPoolInstanceMetricDefinitionsNext = _listWorkerPoolInstanceMetricDefinitionsNext;
+ this._listWorkerPoolInstanceMetricsNext = _listWorkerPoolInstanceMetricsNext;
+ this._listWebWorkerMetricDefinitionsNext = _listWebWorkerMetricDefinitionsNext;
+ this._listWebWorkerMetricsNext = _listWebWorkerMetricsNext;
+ this._listWorkerPoolSkusNext = _listWorkerPoolSkusNext;
+ this._listWebWorkerUsagesNext = _listWebWorkerUsagesNext;
+ this._beginResumeNext = _beginResumeNext;
+ this._beginSuspendNext = _beginSuspendNext;
+ }
+
+ /**
+ * @summary Get all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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.
+ */
+ listWithHttpOperationResponse(options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._list(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 all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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 {AppServiceEnvironmentCollection} - 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 AppServiceEnvironmentCollection} 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.
+ */
+ list(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._list(options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._list(options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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.
+ */
+ listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listByResourceGroup(resourceGroupName, 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 all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 {AppServiceEnvironmentCollection} - 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 AppServiceEnvironmentCollection} 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.
+ */
+ listByResourceGroup(resourceGroupName, 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._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listByResourceGroup(resourceGroupName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the properties of an App Service Environment.
+ *
+ * Get the properties of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ getWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._get(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 Get the properties of an App Service Environment.
+ *
+ * Get the properties of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {AppServiceEnvironmentResource} - 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 AppServiceEnvironmentResource} 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.
+ */
+ get(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._get(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._get(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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.
+ */
+ createOrUpdateWithHttpOperationResponse(resourceGroupName, name, hostingEnvironmentEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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 {AppServiceEnvironmentResource} - 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 AppServiceEnvironmentResource} 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.
+ */
+ createOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, 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._createOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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.
+ */
+ deleteMethodWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._deleteMethod(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 Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ deleteMethod(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._deleteMethod(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._deleteMethod(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentPatchResourceName Name of
+ * the App Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Location of the App
+ * Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateWithHttpOperationResponse(resourceGroupName, name, hostingEnvironmentEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._update(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentPatchResourceName Name of
+ * the App Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Location of the App
+ * Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @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 {AppServiceEnvironmentResource} - 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 AppServiceEnvironmentResource} 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.
+ */
+ update(resourceGroupName, name, hostingEnvironmentEnvelope, 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._update(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._update(resourceGroupName, name, hostingEnvironmentEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listCapacitiesWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listCapacities(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 Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {StampCapacityCollection} - 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 StampCapacityCollection} 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.
+ */
+ listCapacities(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._listCapacities(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listCapacities(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get IP addresses assigned to an App Service Environment.
+ *
+ * Get IP addresses assigned to an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listVipsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listVips(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 Get IP addresses assigned to an App Service Environment.
+ *
+ * Get IP addresses assigned to an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {AddressResponse} - 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 AddressResponse} 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.
+ */
+ listVips(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._listVips(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listVips(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get diagnostic information for an App Service Environment.
+ *
+ * Get diagnostic information for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listDiagnosticsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listDiagnostics(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 Get diagnostic information for an App Service Environment.
+ *
+ * Get diagnostic information for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {Array} - 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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ listDiagnostics(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._listDiagnostics(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listDiagnostics(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get a diagnostics item for an App Service Environment.
+ *
+ * Get a diagnostics item for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} diagnosticsName Name of the diagnostics item.
+ *
+ * @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.
+ */
+ getDiagnosticsItemWithHttpOperationResponse(resourceGroupName, name, diagnosticsName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getDiagnosticsItem(resourceGroupName, name, diagnosticsName, 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 a diagnostics item for an App Service Environment.
+ *
+ * Get a diagnostics item for an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} diagnosticsName Name of the diagnostics item.
+ *
+ * @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 {HostingEnvironmentDiagnostics} - 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 HostingEnvironmentDiagnostics} 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.
+ */
+ getDiagnosticsItem(resourceGroupName, name, diagnosticsName, 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._getDiagnosticsItem(resourceGroupName, name, diagnosticsName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getDiagnosticsItem(resourceGroupName, name, diagnosticsName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get global metric definitions of an App Service Environment.
+ *
+ * Get global metric definitions of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listMetricDefinitionsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMetricDefinitions(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 Get global metric definitions of an App Service Environment.
+ *
+ * Get global metric definitions of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {MetricDefinition} - 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 MetricDefinition} 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.
+ */
+ listMetricDefinitions(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._listMetricDefinitions(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMetricDefinitions(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listMetricsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMetrics(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 Get global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMetrics(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._listMetrics(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMetrics(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRolePoolsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePools(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 Get all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WorkerPoolCollection} - 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 WorkerPoolCollection} 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.
+ */
+ listMultiRolePools(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._listMultiRolePools(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePools(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get properties of a multi-role pool.
+ *
+ * Get properties of a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ getMultiRolePoolWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getMultiRolePool(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 Get properties of a multi-role pool.
+ *
+ * Get properties of a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ getMultiRolePool(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._getMultiRolePool(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getMultiRolePool(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ createOrUpdateMultiRolePoolWithHttpOperationResponse(resourceGroupName, name, multiRolePoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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._createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateMultiRolePoolWithHttpOperationResponse(resourceGroupName, name, multiRolePoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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._updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @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.
+ */
+ listMultiRolePoolInstanceMetricDefinitionsWithHttpOperationResponse(resourceGroupName, name, instance, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, 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 metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, 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._listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @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.
+ */
+ listMultiRolePoolInstanceMetricsWithHttpOperationResponse(resourceGroupName, name, instance, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, 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 metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} instance Name of the instance in the multi-role pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, 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._listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRoleMetricDefinitionsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleMetricDefinitions(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 Get metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listMultiRoleMetricDefinitions(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._listMultiRoleMetricDefinitions(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleMetricDefinitions(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.startTime] Beginning time of the metrics query.
+ *
+ * @param {string} [options.endTime] End time of the metrics query.
+ *
+ * @param {string} [options.timeGrain] Time granularity of the metrics query.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listMultiRoleMetricsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleMetrics(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 Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.startTime] Beginning time of the metrics query.
+ *
+ * @param {string} [options.endTime] End time of the metrics query.
+ *
+ * @param {string} [options.timeGrain] Time granularity of the metrics query.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMultiRoleMetrics(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._listMultiRoleMetrics(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleMetrics(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRolePoolSkusWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolSkus(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 Get available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {SkuInfoCollection} - 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 SkuInfoCollection} 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.
+ */
+ listMultiRolePoolSkus(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._listMultiRolePoolSkus(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolSkus(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRoleUsagesWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleUsages(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 Get usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {UsageCollection} - 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 UsageCollection} 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.
+ */
+ listMultiRoleUsages(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._listMultiRoleUsages(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleUsages(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary List all currently running operations on the App Service
+ * Environment.
+ *
+ * List all currently running operations on the App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listOperationsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listOperations(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 all currently running operations on the App Service
+ * Environment.
+ *
+ * List all currently running operations on the App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {Array} - 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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ listOperations(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._listOperations(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listOperations(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Reboot all machines in an App Service Environment.
+ *
+ * Reboot all machines in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ rebootWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._reboot(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 Reboot all machines in an App Service Environment.
+ *
+ * Reboot all machines in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ reboot(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._reboot(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._reboot(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ resumeWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._resume(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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ resume(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._resume(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._resume(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listAppServicePlansWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listAppServicePlans(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 Get all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {AppServicePlanCollection} - 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 AppServicePlanCollection} 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.
+ */
+ listAppServicePlans(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._listAppServicePlans(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listAppServicePlans(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.propertiesToInclude] Comma separated list of app
+ * properties to include.
+ *
+ * @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.
+ */
+ listWebAppsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebApps(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 Get all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.propertiesToInclude] Comma separated list of app
+ * properties to include.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ listWebApps(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._listWebApps(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebApps(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ suspendWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._suspend(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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ suspend(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._suspend(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._suspend(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listUsagesWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listUsages(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 Get global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {CsmUsageQuotaCollection} - 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 CsmUsageQuotaCollection} 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.
+ */
+ listUsages(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._listUsages(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listUsages(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ listWorkerPoolsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPools(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 Get all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WorkerPoolCollection} - 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 WorkerPoolCollection} 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.
+ */
+ listWorkerPools(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._listWorkerPools(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPools(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get properties of a worker pool.
+ *
+ * Get properties of a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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.
+ */
+ getWorkerPoolWithHttpOperationResponse(resourceGroupName, name, workerPoolName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getWorkerPool(resourceGroupName, name, workerPoolName, 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 properties of a worker pool.
+ *
+ * Get properties of a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ getWorkerPool(resourceGroupName, name, workerPoolName, 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._getWorkerPool(resourceGroupName, name, workerPoolName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getWorkerPool(resourceGroupName, name, workerPoolName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ createOrUpdateWorkerPoolWithHttpOperationResponse(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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._createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateWorkerPoolWithHttpOperationResponse(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._updateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ updateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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._updateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._updateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @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.
+ */
+ listWorkerPoolInstanceMetricDefinitionsWithHttpOperationResponse(resourceGroupName, name, workerPoolName, instance, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, 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 metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, 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._listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listWorkerPoolInstanceMetricsWithHttpOperationResponse(resourceGroupName, name, workerPoolName, instance, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, 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 metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {string} instance Name of the instance in the worker pool.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, 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._listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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.
+ */
+ listWebWorkerMetricDefinitionsWithHttpOperationResponse(resourceGroupName, name, workerPoolName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, 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 metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, 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._listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of worker pool
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listWebWorkerMetricsWithHttpOperationResponse(resourceGroupName, name, workerPoolName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerMetrics(resourceGroupName, name, workerPoolName, 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 metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of worker pool
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listWebWorkerMetrics(resourceGroupName, name, workerPoolName, 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._listWebWorkerMetrics(resourceGroupName, name, workerPoolName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerMetrics(resourceGroupName, name, workerPoolName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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.
+ */
+ listWorkerPoolSkusWithHttpOperationResponse(resourceGroupName, name, workerPoolName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolSkus(resourceGroupName, name, workerPoolName, 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 available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 {SkuInfoCollection} - 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 SkuInfoCollection} 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.
+ */
+ listWorkerPoolSkus(resourceGroupName, name, workerPoolName, 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._listWorkerPoolSkus(resourceGroupName, name, workerPoolName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolSkus(resourceGroupName, name, workerPoolName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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.
+ */
+ listWebWorkerUsagesWithHttpOperationResponse(resourceGroupName, name, workerPoolName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerUsages(resourceGroupName, name, workerPoolName, 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 usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @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 {UsageCollection} - 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 UsageCollection} 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.
+ */
+ listWebWorkerUsages(resourceGroupName, name, workerPoolName, 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._listWebWorkerUsages(resourceGroupName, name, workerPoolName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerUsages(resourceGroupName, name, workerPoolName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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.
+ */
+ beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, name, hostingEnvironmentEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update an App Service Environment.
+ *
+ * Create or update an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} hostingEnvironmentEnvelope Configuration details of the App
+ * Service Environment.
+ *
+ * @param {string} hostingEnvironmentEnvelope.appServiceEnvironmentResourceName
+ * Name of the App Service Environment.
+ *
+ * @param {string}
+ * hostingEnvironmentEnvelope.appServiceEnvironmentResourceLocation Location of
+ * the App Service Environment, e.g. "West US".
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetName] Name of the Virtual
+ * Network for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetResourceGroupName] Resource
+ * group of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.vnetSubnetName] Subnet of the
+ * Virtual Network.
+ *
+ * @param {object} hostingEnvironmentEnvelope.virtualNetwork Description of the
+ * Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.id] Resource id
+ * of the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.virtualNetwork.subnet] Subnet
+ * within the Virtual Network.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.internalLoadBalancingMode]
+ * Specifies which endpoints to serve internally in the Virtual Network for the
+ * App Service Environment. Possible values include: 'None', 'Web',
+ * 'Publishing'
+ *
+ * @param {string} [hostingEnvironmentEnvelope.multiSize] Front-end VM size,
+ * e.g. "Medium", "Large".
+ *
+ * @param {number} [hostingEnvironmentEnvelope.multiRoleCount] Number of
+ * front-end instances.
+ *
+ * @param {array} hostingEnvironmentEnvelope.workerPools Description of worker
+ * pools with worker size IDs, VM sizes, and number of workers in each pool.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.ipsslAddressCount] Number of IP
+ * SSL addresses reserved for the App Service Environment.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.dnsSuffix] DNS suffix of the App
+ * Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.networkAccessControlList] Access
+ * control list for controlling traffic to the App Service Environment.
+ *
+ * @param {number} [hostingEnvironmentEnvelope.frontEndScaleFactor] Scale
+ * factor for front-ends.
+ *
+ * @param {string} [hostingEnvironmentEnvelope.apiManagementAccountId] API
+ * Management Account associated with the App Service Environment.
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.suspended] true if
+ * the App Service Environment is suspended; otherwise, false. The
+ * environment can be suspended, e.g. when the management endpoint is no longer
+ * available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {boolean} [hostingEnvironmentEnvelope.dynamicCacheEnabled] True/false
+ * indicating whether the App Service Environment is suspended. The environment
+ * can be suspended e.g. when the management endpoint is no longer available
+ * (most likely because NSG blocked the incoming traffic).
+ *
+ * @param {array} [hostingEnvironmentEnvelope.clusterSettings] Custom settings
+ * for changing the behavior of the App Service Environment.
+ *
+ * @param {array} [hostingEnvironmentEnvelope.userWhitelistedIpRanges] User
+ * added ip ranges to whitelist on ASE db
+ *
+ * @param {string} [hostingEnvironmentEnvelope.kind] Kind of resource.
+ *
+ * @param {string} hostingEnvironmentEnvelope.location Resource Location.
+ *
+ * @param {object} [hostingEnvironmentEnvelope.tags] Resource tags.
+ *
+ * @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 {AppServiceEnvironmentResource} - 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 AppServiceEnvironmentResource} 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.
+ */
+ beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, 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._beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginCreateOrUpdate(resourceGroupName, name, hostingEnvironmentEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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.
+ */
+ beginDeleteMethodWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginDeleteMethod(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 Delete an App Service Environment.
+ *
+ * Delete an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.forceDelete] Specify true to force
+ * the deletion even if the App Service Environment contains resources. The
+ * default is false.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ beginDeleteMethod(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._beginDeleteMethod(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginDeleteMethod(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ beginCreateOrUpdateMultiRolePoolWithHttpOperationResponse(resourceGroupName, name, multiRolePoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a multi-role pool.
+ *
+ * Create or update a multi-role pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {object} multiRolePoolEnvelope Properties of the multi-role pool.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [multiRolePoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [multiRolePoolEnvelope.workerSize] VM size of the worker
+ * pool instances.
+ *
+ * @param {number} [multiRolePoolEnvelope.workerCount] Number of instances in
+ * the worker pool.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku]
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.tier] Service tier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.size] Size specifier of the
+ * resource SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.family] Family code of the
+ * resource SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [multiRolePoolEnvelope.sku.skuCapacity] Min, max, and
+ * default scale values of the SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.minimum] Minimum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.maximum] Maximum
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {number} [multiRolePoolEnvelope.sku.skuCapacity.default] Default
+ * number of workers for this App Service plan SKU.
+ *
+ * @param {string} [multiRolePoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [multiRolePoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [multiRolePoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, 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._beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginCreateOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ beginResumeWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginResume(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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ beginResume(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._beginResume(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginResume(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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.
+ */
+ beginSuspendWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginSuspend(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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ beginSuspend(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._beginSuspend(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginSuspend(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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.
+ */
+ beginCreateOrUpdateWorkerPoolWithHttpOperationResponse(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Create or update a worker pool.
+ *
+ * Create or update a worker pool.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service Environment.
+ *
+ * @param {string} workerPoolName Name of the worker pool.
+ *
+ * @param {object} workerPoolEnvelope Properties of the worker pool.
+ *
+ * @param {number} [workerPoolEnvelope.workerSizeId] Worker size ID for
+ * referencing this worker pool.
+ *
+ * @param {string} [workerPoolEnvelope.computeMode] Shared or dedicated app
+ * hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'
+ *
+ * @param {string} [workerPoolEnvelope.workerSize] VM size of the worker pool
+ * instances.
+ *
+ * @param {number} [workerPoolEnvelope.workerCount] Number of instances in the
+ * worker pool.
+ *
+ * @param {object} [workerPoolEnvelope.sku]
+ *
+ * @param {string} [workerPoolEnvelope.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.tier] Service tier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.family] Family code of the resource
+ * SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.capacity] Current number of
+ * instances assigned to the resource.
+ *
+ * @param {object} [workerPoolEnvelope.sku.skuCapacity] Min, max, and default
+ * scale values of the SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.minimum] Minimum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.maximum] Maximum number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {number} [workerPoolEnvelope.sku.skuCapacity.default] Default number
+ * of workers for this App Service plan SKU.
+ *
+ * @param {string} [workerPoolEnvelope.sku.skuCapacity.scaleType] Available
+ * scale configurations for an App Service plan.
+ *
+ * @param {array} [workerPoolEnvelope.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [workerPoolEnvelope.sku.capabilities] Capabilities of the
+ * SKU, e.g., is traffic manager enabled?
+ *
+ * @param {string} [workerPoolEnvelope.kind] Kind of resource.
+ *
+ * @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 {WorkerPoolResource} - 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 WorkerPoolResource} 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.
+ */
+ beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, 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._beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, workerPoolEnvelope, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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.
+ */
+ listNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listNext(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 Get all App Service Environments for a subscription.
+ *
+ * Get all App Service Environments for a subscription.
+ *
+ * @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 {AppServiceEnvironmentCollection} - 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 AppServiceEnvironmentCollection} 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.
+ */
+ listNext(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._listNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @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.
+ */
+ listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listByResourceGroupNext(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 Get all App Service Environments in a resource group.
+ *
+ * Get all App Service Environments in a resource group.
+ *
+ * @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 {AppServiceEnvironmentCollection} - 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 AppServiceEnvironmentCollection} 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.
+ */
+ listByResourceGroupNext(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._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listByResourceGroupNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @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.
+ */
+ listCapacitiesNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listCapacitiesNext(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 Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * Get the used, available, and total worker capacity an App Service
+ * Environment.
+ *
+ * @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 {StampCapacityCollection} - 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 StampCapacityCollection} 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.
+ */
+ listCapacitiesNext(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._listCapacitiesNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listCapacitiesNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @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.
+ */
+ listMetricsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMetricsNext(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 Get global metrics of an App Service Environment.
+ *
+ * Get global metrics of an App Service Environment.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMetricsNext(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._listMetricsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMetricsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @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.
+ */
+ listMultiRolePoolsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolsNext(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 Get all multi-role pools.
+ *
+ * Get all multi-role pools.
+ *
+ * @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 {WorkerPoolCollection} - 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 WorkerPoolCollection} 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.
+ */
+ listMultiRolePoolsNext(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._listMultiRolePoolsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRolePoolInstanceMetricDefinitionsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolInstanceMetricDefinitionsNext(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 Get metric definitions for a specific instance of a multi-role pool
+ * of an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a multi-role pool of an
+ * App Service Environment.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listMultiRolePoolInstanceMetricDefinitionsNext(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._listMultiRolePoolInstanceMetricDefinitionsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolInstanceMetricDefinitionsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @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.
+ */
+ listMultiRolePoolInstanceMetricsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolInstanceMetricsNext(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 Get metrics for a specific instance of a multi-role pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a multi-role pool of an App Service
+ * Environment.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMultiRolePoolInstanceMetricsNext(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._listMultiRolePoolInstanceMetricsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolInstanceMetricsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRoleMetricDefinitionsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleMetricDefinitionsNext(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 Get metric definitions for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a multi-role pool of an App Service Environment.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listMultiRoleMetricDefinitionsNext(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._listMultiRoleMetricDefinitionsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleMetricDefinitionsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRoleMetricsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleMetricsNext(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 Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * Get metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMultiRoleMetricsNext(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._listMultiRoleMetricsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleMetricsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @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.
+ */
+ listMultiRolePoolSkusNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRolePoolSkusNext(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 Get available SKUs for scaling a multi-role pool.
+ *
+ * Get available SKUs for scaling a multi-role pool.
+ *
+ * @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 {SkuInfoCollection} - 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 SkuInfoCollection} 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.
+ */
+ listMultiRolePoolSkusNext(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._listMultiRolePoolSkusNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRolePoolSkusNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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.
+ */
+ listMultiRoleUsagesNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMultiRoleUsagesNext(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 Get usage metrics for a multi-role pool of an App Service
+ * Environment.
+ *
+ * Get usage metrics for a multi-role pool of an App Service Environment.
+ *
+ * @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 {UsageCollection} - 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 UsageCollection} 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.
+ */
+ listMultiRoleUsagesNext(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._listMultiRoleUsagesNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMultiRoleUsagesNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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.
+ */
+ resumeNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._resumeNext(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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ resumeNext(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._resumeNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._resumeNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @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.
+ */
+ listAppServicePlansNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listAppServicePlansNext(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 Get all App Service plans in an App Service Environment.
+ *
+ * Get all App Service plans in an App Service Environment.
+ *
+ * @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 {AppServicePlanCollection} - 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 AppServicePlanCollection} 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.
+ */
+ listAppServicePlansNext(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._listAppServicePlansNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listAppServicePlansNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @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.
+ */
+ listWebAppsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebAppsNext(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 Get all apps in an App Service Environment.
+ *
+ * Get all apps in an App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ listWebAppsNext(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._listWebAppsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebAppsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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.
+ */
+ suspendNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._suspendNext(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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ suspendNext(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._suspendNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._suspendNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @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.
+ */
+ listUsagesNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listUsagesNext(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 Get global usage metrics of an App Service Environment.
+ *
+ * Get global usage metrics of an App Service Environment.
+ *
+ * @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 {CsmUsageQuotaCollection} - 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 CsmUsageQuotaCollection} 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.
+ */
+ listUsagesNext(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._listUsagesNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listUsagesNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @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.
+ */
+ listWorkerPoolsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolsNext(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 Get all worker pools of an App Service Environment.
+ *
+ * Get all worker pools of an App Service Environment.
+ *
+ * @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 {WorkerPoolCollection} - 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 WorkerPoolCollection} 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.
+ */
+ listWorkerPoolsNext(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._listWorkerPoolsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @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.
+ */
+ listWorkerPoolInstanceMetricDefinitionsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolInstanceMetricDefinitionsNext(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 Get metric definitions for a specific instance of a worker pool of
+ * an App Service Environment.
+ *
+ * Get metric definitions for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listWorkerPoolInstanceMetricDefinitionsNext(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._listWorkerPoolInstanceMetricDefinitionsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolInstanceMetricDefinitionsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @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.
+ */
+ listWorkerPoolInstanceMetricsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolInstanceMetricsNext(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 Get metrics for a specific instance of a worker pool of an App
+ * Service Environment.
+ *
+ * Get metrics for a specific instance of a worker pool of an App Service
+ * Environment.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listWorkerPoolInstanceMetricsNext(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._listWorkerPoolInstanceMetricsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolInstanceMetricsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @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.
+ */
+ listWebWorkerMetricDefinitionsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerMetricDefinitionsNext(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 Get metric definitions for a worker pool of an App Service
+ * Environment.
+ *
+ * Get metric definitions for a worker pool of an App Service Environment.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listWebWorkerMetricDefinitionsNext(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._listWebWorkerMetricDefinitionsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerMetricDefinitionsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @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.
+ */
+ listWebWorkerMetricsNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerMetricsNext(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 Get metrics for a worker pool of a AppServiceEnvironment (App
+ * Service Environment).
+ *
+ * Get metrics for a worker pool of a AppServiceEnvironment (App Service
+ * Environment).
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listWebWorkerMetricsNext(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._listWebWorkerMetricsNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerMetricsNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @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.
+ */
+ listWorkerPoolSkusNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWorkerPoolSkusNext(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 Get available SKUs for scaling a worker pool.
+ *
+ * Get available SKUs for scaling a worker pool.
+ *
+ * @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 {SkuInfoCollection} - 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 SkuInfoCollection} 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.
+ */
+ listWorkerPoolSkusNext(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._listWorkerPoolSkusNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWorkerPoolSkusNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @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.
+ */
+ listWebWorkerUsagesNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebWorkerUsagesNext(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 Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * Get usage metrics for a worker pool of an App Service Environment.
+ *
+ * @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 {UsageCollection} - 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 UsageCollection} 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.
+ */
+ listWebWorkerUsagesNext(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._listWebWorkerUsagesNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebWorkerUsagesNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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.
+ */
+ beginResumeNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginResumeNext(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 Resume an App Service Environment.
+ *
+ * Resume an App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ beginResumeNext(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._beginResumeNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginResumeNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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.
+ */
+ beginSuspendNextWithHttpOperationResponse(nextPageLink, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._beginSuspendNext(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 Suspend an App Service Environment.
+ *
+ * Suspend an App Service Environment.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ beginSuspendNext(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._beginSuspendNext(nextPageLink, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._beginSuspendNext(nextPageLink, options, optionalCallback);
+ }
+ }
+
+}
+
+module.exports = AppServiceEnvironments;
diff --git a/lib/services/websiteManagement2/lib/lib/operations/appServicePlans.js b/lib/services/websiteManagement2/lib/lib/operations/appServicePlans.js
new file mode 100644
index 0000000000..418daf0d0c
--- /dev/null
+++ b/lib/services/websiteManagement2/lib/lib/operations/appServicePlans.js
@@ -0,0 +1,10483 @@
+/*
+ * 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 msRest = require('ms-rest');
+const msRestAzure = require('ms-rest-azure');
+const WebResource = msRest.WebResource;
+
+/**
+ * @summary Get all App Service plans for a subcription.
+ *
+ * Get all App Service plans for a subcription.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.detailed] Specify true to return all
+ * App Service plan properties. The default is false, which
+ * returns a subset of the properties.
+ * Retrieval of all properties may increase the API latency.
+ *
+ * @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 AppServicePlanCollection} 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 _list(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.');
+ }
+ let detailed = (options && options.detailed !== undefined) ? options.detailed : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ if (detailed !== null && detailed !== undefined && typeof detailed !== 'boolean') {
+ throw new Error('detailed must be of type boolean.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms';
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (detailed !== null && detailed !== undefined) {
+ queryParameters.push('detailed=' + encodeURIComponent(detailed.toString()));
+ }
+ 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;
+ }
+ 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['AppServicePlanCollection']().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 all App Service plans in a resource group.
+ *
+ * Get all App Service plans in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 AppServicePlanCollection} 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 _listByResourceGroup(resourceGroupName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ 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;
+ }
+ 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['AppServicePlanCollection']().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 an App Service plan.
+ *
+ * Get an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 AppServicePlan} 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 _get(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 && statusCode !== 404) {
+ 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['AppServicePlan']().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 Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanName Name for the App Service
+ * plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {object} [appServicePlan.sku]
+ *
+ * @param {string} [appServicePlan.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.tier] Service tier of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [appServicePlan.sku.family] Family code of the resource SKU.
+ *
+ * @param {number} [appServicePlan.sku.capacity] Current number of instances
+ * assigned to the resource.
+ *
+ * @param {object} [appServicePlan.sku.skuCapacity] Min, max, and default scale
+ * values of the SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.minimum] Minimum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.maximum] Maximum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.default] Default number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {string} [appServicePlan.sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ *
+ * @param {array} [appServicePlan.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [appServicePlan.sku.capabilities] Capabilities of the SKU,
+ * e.g., is traffic manager enabled?
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @param {string} appServicePlan.location Resource Location.
+ *
+ * @param {object} [appServicePlan.tags] Resource tags.
+ *
+ * @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 AppServicePlan} 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 _createOrUpdate(resourceGroupName, name, appServicePlan, 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.');
+ }
+
+ // Send request
+ this.beginCreateOrUpdate(resourceGroupName, name, appServicePlan, options, (err, parsedResult, httpRequest, response) => {
+ if (err) return callback(err);
+
+ let initialResult = new msRest.HttpOperationResponse();
+ initialResult.request = httpRequest;
+ initialResult.response = response;
+ initialResult.body = response.body;
+ client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
+ if (err) return callback(err);
+
+ // Create Result
+ let result = null;
+
+ httpRequest = pollingResult.request;
+ response = pollingResult.response;
+ let responseBody = pollingResult.body;
+ if (responseBody === '') responseBody = null;
+
+ // Deserialize Response
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServicePlan']().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 Delete an App Service plan.
+ *
+ * Delete an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteMethod(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'DELETE';
+ 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 && statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanPatchResourceName Name for the
+ * App Service plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @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 AppServicePlan} 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 _update(resourceGroupName, name, appServicePlan, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (appServicePlan === null || appServicePlan === undefined) {
+ throw new Error('appServicePlan cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (appServicePlan !== null && appServicePlan !== undefined) {
+ let requestModelMapper = new client.models['AppServicePlanPatchResource']().mapper();
+ requestModel = client.serialize(requestModelMapper, appServicePlan, 'appServicePlan');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(appServicePlan, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202) {
+ 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['AppServicePlan']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServicePlan']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary List all capabilities of an App Service plan.
+ *
+ * List all capabilities of an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _listCapabilities(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'CapabilityElementType',
+ type: {
+ name: 'Composite',
+ className: 'Capability'
+ }
+ }
+ }
+ };
+ 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 Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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 HybridConnection} 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 _getHybridConnection(resourceGroupName, name, namespaceName, relayName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
+ throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
+ }
+ if (relayName === null || relayName === undefined || typeof relayName.valueOf() !== 'string') {
+ throw new Error('relayName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
+ requestUrl = requestUrl.replace('{relayName}', encodeURIComponent(relayName));
+ 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;
+ }
+ 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['HybridConnection']().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 Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
+ throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
+ }
+ if (relayName === null || relayName === undefined || typeof relayName.valueOf() !== 'string') {
+ throw new Error('relayName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
+ requestUrl = requestUrl.replace('{relayName}', encodeURIComponent(relayName));
+ 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 = 'DELETE';
+ 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 && statusCode !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get the send key name and value of a Hybrid Connection.
+ *
+ * Get the send key name and value of a Hybrid Connection.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName The name of the Service Bus namespace.
+ *
+ * @param {string} relayName The name of the Service Bus relay.
+ *
+ * @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 HybridConnectionKey} 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 _listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
+ throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
+ }
+ if (relayName === null || relayName === undefined || typeof relayName.valueOf() !== 'string') {
+ throw new Error('relayName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
+ requestUrl = requestUrl.replace('{relayName}', encodeURIComponent(relayName));
+ 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 = 'POST';
+ 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['HybridConnectionKey']().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 all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * Get all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Hybrid Connection namespace.
+ *
+ * @param {string} relayName Name of the Hybrid Connection relay.
+ *
+ * @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 ResourceCollection} 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 _listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
+ throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
+ }
+ if (relayName === null || relayName === undefined || typeof relayName.valueOf() !== 'string') {
+ throw new Error('relayName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
+ requestUrl = requestUrl.replace('{relayName}', encodeURIComponent(relayName));
+ 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;
+ }
+ 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['ResourceCollection']().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 the maximum number of Hybrid Connections allowed in an App
+ * Service plan.
+ *
+ * Get the maximum number of Hybrid Connections allowed in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 HybridConnectionLimits} 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 _getHybridConnectionPlanLimit(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['HybridConnectionLimits']().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 Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 HybridConnectionCollection} 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 _listHybridConnections(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['HybridConnectionCollection']().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 metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMetricDefintions(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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['ResourceMetricDefinitionCollection']().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 metrics for an App Serice plan.
+ *
+ * Get metrics for an App Serice plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 ResourceMetricCollection} 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 _listMetrics(resourceGroupName, name, 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.');
+ }
+ let details = (options && options.details !== undefined) ? options.details : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (details !== null && details !== undefined && typeof details !== 'boolean') {
+ throw new Error('details must be of type boolean.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (details !== null && details !== undefined) {
+ queryParameters.push('details=' + encodeURIComponent(details.toString()));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['ResourceMetricCollection']().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 Restart all apps in an App Service plan.
+ *
+ * Restart all apps in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.softRestart] Specify true to performa
+ * a soft restart, applies the configuration settings and restarts the apps if
+ * necessary. The default is false, which always restarts and
+ * reprovisions the apps
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _restartWebApps(resourceGroupName, name, 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.');
+ }
+ let softRestart = (options && options.softRestart !== undefined) ? options.softRestart : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (softRestart !== null && softRestart !== undefined && typeof softRestart !== 'boolean') {
+ throw new Error('softRestart must be of type boolean.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (softRestart !== null && softRestart !== undefined) {
+ queryParameters.push('softRestart=' + encodeURIComponent(softRestart.toString()));
+ }
+ queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
+ if (queryParameters.length > 0) {
+ requestUrl += '?' + queryParameters.join('&');
+ }
+
+ // Create HTTP transport objects
+ let httpRequest = new WebResource();
+ httpRequest.method = 'POST';
+ 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 !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get all apps associated with an App Service plan.
+ *
+ * Get all apps associated with an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.skipToken] Skip to a web app in the list of webapps
+ * associated with app service plan. If specified, the resulting list will
+ * contain web apps starting from (including) the skipToken. Otherwise, the
+ * resulting list contains web apps from the start of the list
+ *
+ * @param {string} [options.filter] Supported filter: $filter=state eq running.
+ * Returns only web apps that are currently running
+ *
+ * @param {string} [options.top] List page size. If specified, results are
+ * paged.
+ *
+ * @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 WebAppCollection} 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 _listWebApps(resourceGroupName, name, 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.');
+ }
+ let skipToken = (options && options.skipToken !== undefined) ? options.skipToken : undefined;
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let top = (options && options.top !== undefined) ? options.top : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (skipToken !== null && skipToken !== undefined && typeof skipToken.valueOf() !== 'string') {
+ throw new Error('skipToken must be of type string.');
+ }
+ if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter must be of type string.');
+ }
+ if (top !== null && top !== undefined && typeof top.valueOf() !== 'string') {
+ throw new Error('top 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (skipToken !== null && skipToken !== undefined) {
+ queryParameters.push('$skipToken=' + encodeURIComponent(skipToken));
+ }
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ if (top !== null && top !== undefined) {
+ queryParameters.push('$top=' + encodeURIComponent(top));
+ }
+ 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;
+ }
+ 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['WebAppCollection']().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 Gets all selectable sku's for a given App Service Plan
+ *
+ * Gets all selectable sku's for a given App Service Plan
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of App Service Plan
+ *
+ * @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.
+ *
+ * {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 _getServerFarmSkus(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Object'
+ }
+ };
+ 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 Gets server farm usage information
+ *
+ * Gets server farm usage information
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of App Service Plan
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2').
+ *
+ * @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 CsmUsageQuotaCollection} 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 _listUsages(resourceGroupName, name, 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.');
+ }
+ let filter = (options && options.filter !== undefined) ? options.filter : undefined;
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
+ throw new Error('filter 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
+ let queryParameters = [];
+ if (filter !== null && filter !== undefined) {
+ queryParameters.push('$filter=' + filter);
+ }
+ 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;
+ }
+ 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['CsmUsageQuotaCollection']().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 all Virtual Networks associated with an App Service plan.
+ *
+ * Get all Virtual Networks associated with an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _listVnets(resourceGroupName, name, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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.');
+ }
+ 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 baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VnetInfoElementType',
+ type: {
+ name: 'Composite',
+ className: 'VnetInfo'
+ }
+ }
+ }
+ };
+ 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 a Virtual Network associated with an App Service plan.
+ *
+ * Get a Virtual Network associated with an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @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 VnetInfo} 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 _getVnetFromServerFarm(resourceGroupName, name, vnetName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ 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;
+ }
+ 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 && statusCode !== 404) {
+ 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['VnetInfo']().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 a Virtual Network gateway.
+ *
+ * Get a Virtual Network gateway.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} gatewayName Name of the gateway. Only the 'primary' gateway
+ * is supported.
+ *
+ * @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 VnetGateway} 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 _getVnetGateway(resourceGroupName, name, vnetName, gatewayName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') {
+ throw new Error('gatewayName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName));
+ 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;
+ }
+ 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['VnetGateway']().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 Update a Virtual Network gateway.
+ *
+ * Update a Virtual Network gateway.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} gatewayName Name of the gateway. Only the 'primary' gateway
+ * is supported.
+ *
+ * @param {object} connectionEnvelope Definition of the gateway.
+ *
+ * @param {string} [connectionEnvelope.vnetName] The Virtual Network name.
+ *
+ * @param {string} connectionEnvelope.vpnPackageUri The URI where the VPN
+ * package can be downloaded.
+ *
+ * @param {string} [connectionEnvelope.kind] Kind of resource.
+ *
+ * @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 VnetGateway} 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 _updateVnetGateway(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') {
+ throw new Error('gatewayName cannot be null or undefined and it must be of type string.');
+ }
+ if (connectionEnvelope === null || connectionEnvelope === undefined) {
+ throw new Error('connectionEnvelope cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (connectionEnvelope !== null && connectionEnvelope !== undefined) {
+ let requestModelMapper = new client.models['VnetGateway']().mapper();
+ requestModel = client.serialize(requestModelMapper, connectionEnvelope, 'connectionEnvelope');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(connectionEnvelope, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // 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['VnetGateway']().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 all routes that are associated with a Virtual Network in an App
+ * Service plan.
+ *
+ * Get all routes that are associated with a Virtual Network in an App Service
+ * plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _listRoutesForVnet(resourceGroupName, name, vnetName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ 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;
+ }
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VnetRouteElementType',
+ type: {
+ name: 'Composite',
+ className: 'VnetRoute'
+ }
+ }
+ }
+ };
+ 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 a Virtual Network route in an App Service plan.
+ *
+ * Get a Virtual Network route in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} routeName Name of the Virtual Network route.
+ *
+ * @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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _getRouteForVnet(resourceGroupName, name, vnetName, routeName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (routeName === null || routeName === undefined || typeof routeName.valueOf() !== 'string') {
+ throw new Error('routeName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{routeName}', encodeURIComponent(routeName));
+ 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;
+ }
+ 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 && statusCode !== 404) {
+ 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 = {
+ required: false,
+ serializedName: 'parsedResponse',
+ type: {
+ name: 'Sequence',
+ element: {
+ required: false,
+ serializedName: 'VnetRouteElementType',
+ type: {
+ name: 'Composite',
+ className: 'VnetRoute'
+ }
+ }
+ }
+ };
+ 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 Create or update a Virtual Network route in an App Service plan.
+ *
+ * Create or update a Virtual Network route in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} routeName Name of the Virtual Network route.
+ *
+ * @param {object} route Definition of the Virtual Network route.
+ *
+ * @param {string} [route.vnetRouteName] The name of this route. This is only
+ * returned by the server and does not need to be set by the client.
+ *
+ * @param {string} [route.startAddress] The starting address for this route.
+ * This may also include a CIDR notation, in which case the end address must
+ * not be specified.
+ *
+ * @param {string} [route.endAddress] The ending address for this route. If the
+ * start address is specified in CIDR notation, this must be omitted.
+ *
+ * @param {string} [route.routeType] The type of route this is:
+ * DEFAULT - By default, every app has routes to the local address ranges
+ * specified by RFC1918
+ * INHERITED - Routes inherited from the real Virtual Network routes
+ * STATIC - Static route set on the app only
+ *
+ * These values will be used for syncing an app's routes with those from a
+ * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
+ *
+ * @param {string} [route.kind] Kind of resource.
+ *
+ * @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 VnetRoute} 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 _createOrUpdateVnetRoute(resourceGroupName, name, vnetName, routeName, route, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (routeName === null || routeName === undefined || typeof routeName.valueOf() !== 'string') {
+ throw new Error('routeName cannot be null or undefined and it must be of type string.');
+ }
+ if (route === null || route === undefined) {
+ throw new Error('route cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{routeName}', encodeURIComponent(routeName));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (route !== null && route !== undefined) {
+ let requestModelMapper = new client.models['VnetRoute']().mapper();
+ requestModel = client.serialize(requestModelMapper, route, 'route');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(route, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 400 && statusCode !== 404) {
+ 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['VnetRoute']().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 Delete a Virtual Network route in an App Service plan.
+ *
+ * Delete a Virtual Network route in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} routeName Name of the Virtual Network route.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _deleteVnetRoute(resourceGroupName, name, vnetName, routeName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (routeName === null || routeName === undefined || typeof routeName.valueOf() !== 'string') {
+ throw new Error('routeName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{routeName}', encodeURIComponent(routeName));
+ 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 = 'DELETE';
+ 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 && statusCode !== 404) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Create or update a Virtual Network route in an App Service plan.
+ *
+ * Create or update a Virtual Network route in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} vnetName Name of the Virtual Network.
+ *
+ * @param {string} routeName Name of the Virtual Network route.
+ *
+ * @param {object} route Definition of the Virtual Network route.
+ *
+ * @param {string} [route.vnetRouteName] The name of this route. This is only
+ * returned by the server and does not need to be set by the client.
+ *
+ * @param {string} [route.startAddress] The starting address for this route.
+ * This may also include a CIDR notation, in which case the end address must
+ * not be specified.
+ *
+ * @param {string} [route.endAddress] The ending address for this route. If the
+ * start address is specified in CIDR notation, this must be omitted.
+ *
+ * @param {string} [route.routeType] The type of route this is:
+ * DEFAULT - By default, every app has routes to the local address ranges
+ * specified by RFC1918
+ * INHERITED - Routes inherited from the real Virtual Network routes
+ * STATIC - Static route set on the app only
+ *
+ * These values will be used for syncing an app's routes with those from a
+ * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
+ *
+ * @param {string} [route.kind] Kind of resource.
+ *
+ * @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 VnetRoute} 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 _updateVnetRoute(resourceGroupName, name, vnetName, routeName, route, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (vnetName === null || vnetName === undefined || typeof vnetName.valueOf() !== 'string') {
+ throw new Error('vnetName cannot be null or undefined and it must be of type string.');
+ }
+ if (routeName === null || routeName === undefined || typeof routeName.valueOf() !== 'string') {
+ throw new Error('routeName cannot be null or undefined and it must be of type string.');
+ }
+ if (route === null || route === undefined) {
+ throw new Error('route cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{vnetName}', encodeURIComponent(vnetName));
+ requestUrl = requestUrl.replace('{routeName}', encodeURIComponent(routeName));
+ 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 = 'PATCH';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (route !== null && route !== undefined) {
+ let requestModelMapper = new client.models['VnetRoute']().mapper();
+ requestModel = client.serialize(requestModelMapper, route, 'route');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(route, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 400 && statusCode !== 404) {
+ 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['VnetRoute']().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 Reboot a worker machine in an App Service plan.
+ *
+ * Reboot a worker machine in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} workerName Name of worker machine, which typically starts
+ * with RD.
+ *
+ * @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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {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 _rebootWorker(resourceGroupName, name, workerName, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (workerName === null || workerName === undefined || typeof workerName.valueOf() !== 'string') {
+ throw new Error('workerName 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ requestUrl = requestUrl.replace('{workerName}', encodeURIComponent(workerName));
+ 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 = 'POST';
+ 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 !== 204) {
+ 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;
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanName Name for the App Service
+ * plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {object} [appServicePlan.sku]
+ *
+ * @param {string} [appServicePlan.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.tier] Service tier of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [appServicePlan.sku.family] Family code of the resource SKU.
+ *
+ * @param {number} [appServicePlan.sku.capacity] Current number of instances
+ * assigned to the resource.
+ *
+ * @param {object} [appServicePlan.sku.skuCapacity] Min, max, and default scale
+ * values of the SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.minimum] Minimum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.maximum] Maximum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.default] Default number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {string} [appServicePlan.sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ *
+ * @param {array} [appServicePlan.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [appServicePlan.sku.capabilities] Capabilities of the SKU,
+ * e.g., is traffic manager enabled?
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @param {string} appServicePlan.location Resource Location.
+ *
+ * @param {object} [appServicePlan.tags] Resource tags.
+ *
+ * @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 AppServicePlan} 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 _beginCreateOrUpdate(resourceGroupName, name, appServicePlan, 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.');
+ }
+ let apiVersion = '2016-09-01';
+ // Validate
+ try {
+ 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 (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 (appServicePlan === null || appServicePlan === undefined) {
+ throw new Error('appServicePlan cannot be null or undefined.');
+ }
+ 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.');
+ }
+ } catch (error) {
+ return callback(error);
+ }
+
+ // Construct URL
+ let baseUrl = this.client.baseUri;
+ let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}';
+ requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
+ requestUrl = requestUrl.replace('{name}', encodeURIComponent(name));
+ 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 = 'PUT';
+ 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];
+ }
+ }
+ }
+ // Serialize Request
+ let requestContent = null;
+ let requestModel = null;
+ try {
+ if (appServicePlan !== null && appServicePlan !== undefined) {
+ let requestModelMapper = new client.models['AppServicePlan']().mapper();
+ requestModel = client.serialize(requestModelMapper, appServicePlan, 'appServicePlan');
+ requestContent = JSON.stringify(requestModel);
+ }
+ } catch (error) {
+ let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
+ `payload - ${JSON.stringify(appServicePlan, null, 2)}.`);
+ return callback(serializationError);
+ }
+ httpRequest.body = requestContent;
+ // Send Request
+ return client.pipeline(httpRequest, (err, response, responseBody) => {
+ if (err) {
+ return callback(err);
+ }
+ let statusCode = response.statusCode;
+ if (statusCode !== 200 && statusCode !== 202) {
+ 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['AppServicePlan']().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);
+ }
+ }
+ // Deserialize Response
+ if (statusCode === 202) {
+ let parsedResponse = null;
+ try {
+ parsedResponse = JSON.parse(responseBody);
+ result = JSON.parse(responseBody);
+ if (parsedResponse !== null && parsedResponse !== undefined) {
+ let resultMapper = new client.models['AppServicePlan']().mapper();
+ result = client.deserialize(resultMapper, parsedResponse, 'result');
+ }
+ } catch (error) {
+ let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
+ deserializationError1.request = msRest.stripRequest(httpRequest);
+ deserializationError1.response = msRest.stripResponse(response);
+ return callback(deserializationError1);
+ }
+ }
+
+ return callback(null, result, httpRequest, response);
+ });
+}
+
+/**
+ * @summary Get all App Service plans for a subcription.
+ *
+ * Get all App Service plans for a subcription.
+ *
+ * @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 AppServicePlanCollection} 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 _listNext(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['AppServicePlanCollection']().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 all App Service plans in a resource group.
+ *
+ * Get all App Service plans in a resource group.
+ *
+ * @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 AppServicePlanCollection} 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 _listByResourceGroupNext(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['AppServicePlanCollection']().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 all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * Get all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * @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 ResourceCollection} 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 _listWebAppsByHybridConnectionNext(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['ResourceCollection']().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 Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * @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 HybridConnectionCollection} 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 _listHybridConnectionsNext(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['HybridConnectionCollection']().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 metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * @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 ResourceMetricDefinitionCollection} 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 _listMetricDefintionsNext(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['ResourceMetricDefinitionCollection']().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 metrics for an App Serice plan.
+ *
+ * Get metrics for an App Serice plan.
+ *
+ * @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 ResourceMetricCollection} 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 _listMetricsNext(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['ResourceMetricCollection']().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 all apps associated with an App Service plan.
+ *
+ * Get all apps associated with an App Service plan.
+ *
+ * @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 WebAppCollection} 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 _listWebAppsNext(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['WebAppCollection']().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 Gets server farm usage information
+ *
+ * Gets server farm usage information
+ *
+ * @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 CsmUsageQuotaCollection} 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 _listUsagesNext(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['CsmUsageQuotaCollection']().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 AppServicePlans. */
+class AppServicePlans {
+ /**
+ * Create a AppServicePlans.
+ * @param {WebSiteManagementClient} client Reference to the service client.
+ */
+ constructor(client) {
+ this.client = client;
+ this._list = _list;
+ this._listByResourceGroup = _listByResourceGroup;
+ this._get = _get;
+ this._createOrUpdate = _createOrUpdate;
+ this._deleteMethod = _deleteMethod;
+ this._update = _update;
+ this._listCapabilities = _listCapabilities;
+ this._getHybridConnection = _getHybridConnection;
+ this._deleteHybridConnection = _deleteHybridConnection;
+ this._listHybridConnectionKeys = _listHybridConnectionKeys;
+ this._listWebAppsByHybridConnection = _listWebAppsByHybridConnection;
+ this._getHybridConnectionPlanLimit = _getHybridConnectionPlanLimit;
+ this._listHybridConnections = _listHybridConnections;
+ this._listMetricDefintions = _listMetricDefintions;
+ this._listMetrics = _listMetrics;
+ this._restartWebApps = _restartWebApps;
+ this._listWebApps = _listWebApps;
+ this._getServerFarmSkus = _getServerFarmSkus;
+ this._listUsages = _listUsages;
+ this._listVnets = _listVnets;
+ this._getVnetFromServerFarm = _getVnetFromServerFarm;
+ this._getVnetGateway = _getVnetGateway;
+ this._updateVnetGateway = _updateVnetGateway;
+ this._listRoutesForVnet = _listRoutesForVnet;
+ this._getRouteForVnet = _getRouteForVnet;
+ this._createOrUpdateVnetRoute = _createOrUpdateVnetRoute;
+ this._deleteVnetRoute = _deleteVnetRoute;
+ this._updateVnetRoute = _updateVnetRoute;
+ this._rebootWorker = _rebootWorker;
+ this._beginCreateOrUpdate = _beginCreateOrUpdate;
+ this._listNext = _listNext;
+ this._listByResourceGroupNext = _listByResourceGroupNext;
+ this._listWebAppsByHybridConnectionNext = _listWebAppsByHybridConnectionNext;
+ this._listHybridConnectionsNext = _listHybridConnectionsNext;
+ this._listMetricDefintionsNext = _listMetricDefintionsNext;
+ this._listMetricsNext = _listMetricsNext;
+ this._listWebAppsNext = _listWebAppsNext;
+ this._listUsagesNext = _listUsagesNext;
+ }
+
+ /**
+ * @summary Get all App Service plans for a subcription.
+ *
+ * Get all App Service plans for a subcription.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.detailed] Specify true to return all
+ * App Service plan properties. The default is false, which
+ * returns a subset of the properties.
+ * Retrieval of all properties may increase the API latency.
+ *
+ * @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.
+ */
+ listWithHttpOperationResponse(options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._list(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 all App Service plans for a subcription.
+ *
+ * Get all App Service plans for a subcription.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.detailed] Specify true to return all
+ * App Service plan properties. The default is false, which
+ * returns a subset of the properties.
+ * Retrieval of all properties may increase the API latency.
+ *
+ * @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 {AppServicePlanCollection} - 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 AppServicePlanCollection} 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.
+ */
+ list(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._list(options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._list(options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all App Service plans in a resource group.
+ *
+ * Get all App Service plans in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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.
+ */
+ listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listByResourceGroup(resourceGroupName, 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 all App Service plans in a resource group.
+ *
+ * Get all App Service plans in a resource group.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @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 {AppServicePlanCollection} - 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 AppServicePlanCollection} 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.
+ */
+ listByResourceGroup(resourceGroupName, 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._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listByResourceGroup(resourceGroupName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get an App Service plan.
+ *
+ * Get an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ getWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._get(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 Get an App Service plan.
+ *
+ * Get an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {AppServicePlan} - 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 AppServicePlan} 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.
+ */
+ get(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._get(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._get(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanName Name for the App Service
+ * plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {object} [appServicePlan.sku]
+ *
+ * @param {string} [appServicePlan.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.tier] Service tier of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [appServicePlan.sku.family] Family code of the resource SKU.
+ *
+ * @param {number} [appServicePlan.sku.capacity] Current number of instances
+ * assigned to the resource.
+ *
+ * @param {object} [appServicePlan.sku.skuCapacity] Min, max, and default scale
+ * values of the SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.minimum] Minimum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.maximum] Maximum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.default] Default number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {string} [appServicePlan.sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ *
+ * @param {array} [appServicePlan.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [appServicePlan.sku.capabilities] Capabilities of the SKU,
+ * e.g., is traffic manager enabled?
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @param {string} appServicePlan.location Resource Location.
+ *
+ * @param {object} [appServicePlan.tags] Resource tags.
+ *
+ * @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.
+ */
+ createOrUpdateWithHttpOperationResponse(resourceGroupName, name, appServicePlan, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._createOrUpdate(resourceGroupName, name, appServicePlan, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanName Name for the App Service
+ * plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {object} [appServicePlan.sku]
+ *
+ * @param {string} [appServicePlan.sku.name] Name of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.tier] Service tier of the resource SKU.
+ *
+ * @param {string} [appServicePlan.sku.size] Size specifier of the resource
+ * SKU.
+ *
+ * @param {string} [appServicePlan.sku.family] Family code of the resource SKU.
+ *
+ * @param {number} [appServicePlan.sku.capacity] Current number of instances
+ * assigned to the resource.
+ *
+ * @param {object} [appServicePlan.sku.skuCapacity] Min, max, and default scale
+ * values of the SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.minimum] Minimum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.maximum] Maximum number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {number} [appServicePlan.sku.skuCapacity.default] Default number of
+ * workers for this App Service plan SKU.
+ *
+ * @param {string} [appServicePlan.sku.skuCapacity.scaleType] Available scale
+ * configurations for an App Service plan.
+ *
+ * @param {array} [appServicePlan.sku.locations] Locations of the SKU.
+ *
+ * @param {array} [appServicePlan.sku.capabilities] Capabilities of the SKU,
+ * e.g., is traffic manager enabled?
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @param {string} appServicePlan.location Resource Location.
+ *
+ * @param {object} [appServicePlan.tags] Resource tags.
+ *
+ * @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 {AppServicePlan} - 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 AppServicePlan} 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.
+ */
+ createOrUpdate(resourceGroupName, name, appServicePlan, 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._createOrUpdate(resourceGroupName, name, appServicePlan, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._createOrUpdate(resourceGroupName, name, appServicePlan, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete an App Service plan.
+ *
+ * Delete an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ deleteMethodWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._deleteMethod(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 Delete an App Service plan.
+ *
+ * Delete an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ deleteMethod(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._deleteMethod(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._deleteMethod(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanPatchResourceName Name for the
+ * App Service plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @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.
+ */
+ updateWithHttpOperationResponse(resourceGroupName, name, appServicePlan, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._update(resourceGroupName, name, appServicePlan, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Creates or updates an App Service Plan.
+ *
+ * Creates or updates an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} appServicePlan Details of the App Service plan.
+ *
+ * @param {string} appServicePlan.appServicePlanPatchResourceName Name for the
+ * App Service plan.
+ *
+ * @param {string} [appServicePlan.workerTierName] Target worker tier assigned
+ * to the App Service plan.
+ *
+ * @param {string} [appServicePlan.adminSiteName] App Service plan
+ * administration site.
+ *
+ * @param {object} [appServicePlan.hostingEnvironmentProfile] Specification for
+ * the App Service Environment to use for the App Service plan.
+ *
+ * @param {string} [appServicePlan.hostingEnvironmentProfile.id] Resource ID of
+ * the App Service Environment.
+ *
+ * @param {boolean} [appServicePlan.perSiteScaling] If true, apps
+ * assigned to this App Service plan can be scaled independently.
+ * If false, apps assigned to this App Service plan will scale to
+ * all instances of the plan.
+ *
+ * @param {boolean} [appServicePlan.isSpot] If true, this App
+ * Service Plan owns spot instances.
+ *
+ * @param {date} [appServicePlan.spotExpirationTime] The time when the server
+ * farm expires. Valid only if it is a spot server farm.
+ *
+ * @param {boolean} [appServicePlan.reserved] If Linux app service plan
+ * true, false otherwise.
+ *
+ * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count.
+ *
+ * @param {number} [appServicePlan.targetWorkerSizeId] Scaling worker size ID.
+ *
+ * @param {string} [appServicePlan.kind] Kind of resource.
+ *
+ * @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 {AppServicePlan} - 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 AppServicePlan} 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.
+ */
+ update(resourceGroupName, name, appServicePlan, 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._update(resourceGroupName, name, appServicePlan, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._update(resourceGroupName, name, appServicePlan, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary List all capabilities of an App Service plan.
+ *
+ * List all capabilities of an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ listCapabilitiesWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listCapabilities(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 all capabilities of an App Service plan.
+ *
+ * List all capabilities of an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {Array} - 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.
+ *
+ * {array} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ listCapabilities(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._listCapabilities(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listCapabilities(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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.
+ */
+ getHybridConnectionWithHttpOperationResponse(resourceGroupName, name, namespaceName, relayName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getHybridConnection(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * Retrieve a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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 {HybridConnection} - 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 HybridConnection} 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.
+ */
+ getHybridConnection(resourceGroupName, name, namespaceName, relayName, 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._getHybridConnection(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getHybridConnection(resourceGroupName, name, namespaceName, relayName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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.
+ */
+ deleteHybridConnectionWithHttpOperationResponse(resourceGroupName, name, namespaceName, relayName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
+ httpOperationResponse.body = result;
+ if (err) { reject(err); }
+ else { resolve(httpOperationResponse); }
+ return;
+ });
+ });
+ }
+
+ /**
+ * @summary Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * Delete a Hybrid Connection in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Service Bus namespace.
+ *
+ * @param {string} relayName Name of the Service Bus relay.
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, 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._deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the send key name and value of a Hybrid Connection.
+ *
+ * Get the send key name and value of a Hybrid Connection.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName The name of the Service Bus namespace.
+ *
+ * @param {string} relayName The name of the Service Bus relay.
+ *
+ * @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.
+ */
+ listHybridConnectionKeysWithHttpOperationResponse(resourceGroupName, name, namespaceName, relayName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, 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 the send key name and value of a Hybrid Connection.
+ *
+ * Get the send key name and value of a Hybrid Connection.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName The name of the Service Bus namespace.
+ *
+ * @param {string} relayName The name of the Service Bus relay.
+ *
+ * @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 {HybridConnectionKey} - 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 HybridConnectionKey} 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.
+ */
+ listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, 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._listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * Get all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Hybrid Connection namespace.
+ *
+ * @param {string} relayName Name of the Hybrid Connection relay.
+ *
+ * @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.
+ */
+ listWebAppsByHybridConnectionWithHttpOperationResponse(resourceGroupName, name, namespaceName, relayName, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, 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 all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * Get all apps that use a Hybrid Connection in an App Service Plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {string} namespaceName Name of the Hybrid Connection namespace.
+ *
+ * @param {string} relayName Name of the Hybrid Connection relay.
+ *
+ * @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 {ResourceCollection} - 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 ResourceCollection} 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.
+ */
+ listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, 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._listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get the maximum number of Hybrid Connections allowed in an App
+ * Service plan.
+ *
+ * Get the maximum number of Hybrid Connections allowed in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ getHybridConnectionPlanLimitWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._getHybridConnectionPlanLimit(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 Get the maximum number of Hybrid Connections allowed in an App
+ * Service plan.
+ *
+ * Get the maximum number of Hybrid Connections allowed in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {HybridConnectionLimits} - 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 HybridConnectionLimits} 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.
+ */
+ getHybridConnectionPlanLimit(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._getHybridConnectionPlanLimit(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._getHybridConnectionPlanLimit(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ listHybridConnectionsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listHybridConnections(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 Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * Retrieve all Hybrid Connections in use in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {HybridConnectionCollection} - 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 HybridConnectionCollection} 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.
+ */
+ listHybridConnections(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._listHybridConnections(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listHybridConnections(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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.
+ */
+ listMetricDefintionsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMetricDefintions(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 Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * Get metrics that can be queried for an App Service plan, and their
+ * definitions.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @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 {ResourceMetricDefinitionCollection} - 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 ResourceMetricDefinitionCollection} 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.
+ */
+ listMetricDefintions(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._listMetricDefintions(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMetricDefintions(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get metrics for an App Serice plan.
+ *
+ * Get metrics for an App Serice plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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.
+ */
+ listMetricsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listMetrics(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 Get metrics for an App Serice plan.
+ *
+ * Get metrics for an App Serice plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.details] Specify true to include
+ * instance details. The default is false.
+ *
+ * @param {string} [options.filter] Return only usages/metrics specified in the
+ * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq
+ * 'Metric1' or name.value eq 'Metric2') and startTime eq
+ * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain
+ * eq duration'[Hour|Minute|Day]'.
+ *
+ * @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 {ResourceMetricCollection} - 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 ResourceMetricCollection} 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.
+ */
+ listMetrics(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._listMetrics(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listMetrics(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Restart all apps in an App Service plan.
+ *
+ * Restart all apps in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.softRestart] Specify true to performa
+ * a soft restart, applies the configuration settings and restarts the apps if
+ * necessary. The default is false, which always restarts and
+ * reprovisions the apps
+ *
+ * @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.
+ */
+ restartWebAppsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._restartWebApps(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 Restart all apps in an App Service plan.
+ *
+ * Restart all apps in an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {boolean} [options.softRestart] Specify true to performa
+ * a soft restart, applies the configuration settings and restarts the apps if
+ * necessary. The default is false, which always restarts and
+ * reprovisions the apps
+ *
+ * @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 {null} - 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.
+ *
+ * {null} [result] - The deserialized result object if an error did not occur.
+ *
+ * {object} [request] - The HTTP Request object if an error did not occur.
+ *
+ * {stream} [response] - The HTTP Response stream if an error did not occur.
+ */
+ restartWebApps(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._restartWebApps(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._restartWebApps(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Get all apps associated with an App Service plan.
+ *
+ * Get all apps associated with an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.skipToken] Skip to a web app in the list of webapps
+ * associated with app service plan. If specified, the resulting list will
+ * contain web apps starting from (including) the skipToken. Otherwise, the
+ * resulting list contains web apps from the start of the list
+ *
+ * @param {string} [options.filter] Supported filter: $filter=state eq running.
+ * Returns only web apps that are currently running
+ *
+ * @param {string} [options.top] List page size. If specified, results are
+ * paged.
+ *
+ * @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.
+ */
+ listWebAppsWithHttpOperationResponse(resourceGroupName, name, options) {
+ let client = this.client;
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self._listWebApps(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 Get all apps associated with an App Service plan.
+ *
+ * Get all apps associated with an App Service plan.
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of the App Service plan.
+ *
+ * @param {object} [options] Optional Parameters.
+ *
+ * @param {string} [options.skipToken] Skip to a web app in the list of webapps
+ * associated with app service plan. If specified, the resulting list will
+ * contain web apps starting from (including) the skipToken. Otherwise, the
+ * resulting list contains web apps from the start of the list
+ *
+ * @param {string} [options.filter] Supported filter: $filter=state eq running.
+ * Returns only web apps that are currently running
+ *
+ * @param {string} [options.top] List page size. If specified, results are
+ * paged.
+ *
+ * @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 {WebAppCollection} - 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 WebAppCollection} 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.
+ */
+ listWebApps(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._listWebApps(resourceGroupName, name, options, (err, result, request, response) => {
+ if (err) { reject(err); }
+ else { resolve(result); }
+ return;
+ });
+ });
+ } else {
+ return self._listWebApps(resourceGroupName, name, options, optionalCallback);
+ }
+ }
+
+ /**
+ * @summary Gets all selectable sku's for a given App Service Plan
+ *
+ * Gets all selectable sku's for a given App Service Plan
+ *
+ * @param {string} resourceGroupName Name of the resource group to which the
+ * resource belongs.
+ *
+ * @param {string} name Name of App Service Plan
+ *
+ * @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