diff --git a/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.d.ts b/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.d.ts index cadd9b8e02..a77ea0d650 100644 --- a/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.d.ts +++ b/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.d.ts @@ -10,9 +10,10 @@ import { ServiceClientCredentials } from 'ms-rest'; import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; import * as operations from "./operations"; -declare class DataLakeAnalyticsAccountManagementClient extends AzureServiceClient { +export default class DataLakeAnalyticsAccountManagementClient extends AzureServiceClient { /** * Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class. * @constructor @@ -33,11 +34,11 @@ declare class DataLakeAnalyticsAccountManagementClient extends AzureServiceClien * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); @@ -55,11 +56,13 @@ declare class DataLakeAnalyticsAccountManagementClient extends AzureServiceClien generateClientRequestId: boolean; // Operation groups + accounts: operations.Accounts; + dataLakeStoreAccounts: operations.DataLakeStoreAccounts; + storageAccounts: operations.StorageAccounts; computePolicies: operations.ComputePolicies; firewallRules: operations.FirewallRules; - storageAccounts: operations.StorageAccounts; - dataLakeStoreAccounts: operations.DataLakeStoreAccounts; - account: operations.Account; + operations: operations.Operations; + locations: operations.Locations; } -export = DataLakeAnalyticsAccountManagementClient; +export { DataLakeAnalyticsAccountManagementClient, models as DataLakeAnalyticsAccountManagementModels }; diff --git a/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.js b/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.js index 459861a323..05b317db2e 100644 --- a/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.js +++ b/lib/services/dataLake.Analytics/lib/account/dataLakeAnalyticsAccountManagementClient.js @@ -34,9 +34,9 @@ class DataLakeAnalyticsAccountManagementClient extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { @@ -72,11 +72,13 @@ class DataLakeAnalyticsAccountManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } + this.accounts = new operations.Accounts(this); + this.dataLakeStoreAccounts = new operations.DataLakeStoreAccounts(this); + this.storageAccounts = new operations.StorageAccounts(this); this.computePolicies = new operations.ComputePolicies(this); this.firewallRules = new operations.FirewallRules(this); - this.storageAccounts = new operations.StorageAccounts(this); - this.dataLakeStoreAccounts = new operations.DataLakeStoreAccounts(this); - this.account = new operations.Account(this); + this.operations = new operations.Operations(this); + this.locations = new operations.Locations(this); this.models = models; msRest.addSerializationMixin(this); } @@ -84,3 +86,6 @@ class DataLakeAnalyticsAccountManagementClient extends ServiceClient { } module.exports = DataLakeAnalyticsAccountManagementClient; +module.exports['default'] = DataLakeAnalyticsAccountManagementClient; +module.exports.DataLakeAnalyticsAccountManagementClient = DataLakeAnalyticsAccountManagementClient; +module.exports.DataLakeAnalyticsAccountManagementModels = models; diff --git a/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreParameters.js b/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreParameters.js index 2c0282559a..26c845c4cb 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreParameters.js +++ b/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreParameters.js @@ -11,13 +11,13 @@ 'use strict'; /** - * Additional Data Lake Store parameters. + * The parameters used to add a new Data Lake Store account. * */ class AddDataLakeStoreParameters { /** * Create a AddDataLakeStoreParameters. - * @member {string} [suffix] the optional suffix for the Data Lake Store + * @member {string} [suffix] The optional suffix for the Data Lake Store * account. */ constructor() { diff --git a/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreWithAccountParameters.js new file mode 100644 index 0000000000..9892cde6d3 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/addDataLakeStoreWithAccountParameters.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'; + +/** + * The parameters used to add a new Data Lake Store account while creating a + * new Data Lake Analytics account. + * + */ +class AddDataLakeStoreWithAccountParameters { + /** + * Create a AddDataLakeStoreWithAccountParameters. + * @member {string} name The unique name of the Data Lake Store account to + * add. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. + */ + constructor() { + } + + /** + * Defines the metadata of AddDataLakeStoreWithAccountParameters + * + * @returns {object} metadata of AddDataLakeStoreWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'AddDataLakeStoreWithAccountParameters', + type: { + name: 'Composite', + className: 'AddDataLakeStoreWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + suffix: { + required: false, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AddDataLakeStoreWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountParameters.js index 4651375a31..d916b9f4f2 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountParameters.js +++ b/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountParameters.js @@ -11,16 +11,15 @@ 'use strict'; /** - * Storage account parameters for a storage account being added to a Data Lake - * Analytics account. + * The parameters used to add a new Azure Storage account. * */ class AddStorageAccountParameters { /** * Create a AddStorageAccountParameters. - * @member {string} accessKey the access key associated with this Azure + * @member {string} accessKey The access key associated with this Azure * Storage account that will be used to connect to it. - * @member {string} [suffix] the optional suffix for the storage account. + * @member {string} [suffix] The optional suffix for the storage account. */ constructor() { } diff --git a/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountWithAccountParameters.js new file mode 100644 index 0000000000..e02508add2 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/addStorageAccountWithAccountParameters.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'; + +/** + * The parameters used to add a new Azure Storage account while creating a new + * Data Lake Analytics account. + * + */ +class AddStorageAccountWithAccountParameters { + /** + * Create a AddStorageAccountWithAccountParameters. + * @member {string} name The unique name of the Azure Storage account to add. + * @member {string} accessKey The access key associated with this Azure + * Storage account that will be used to connect to it. + * @member {string} [suffix] The optional suffix for the storage account. + */ + constructor() { + } + + /** + * Defines the metadata of AddStorageAccountWithAccountParameters + * + * @returns {object} metadata of AddStorageAccountWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'AddStorageAccountWithAccountParameters', + type: { + name: 'Composite', + className: 'AddStorageAccountWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + accessKey: { + required: true, + serializedName: 'properties.accessKey', + type: { + name: 'String' + } + }, + suffix: { + required: false, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AddStorageAccountWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/capabilityInformation.js b/lib/services/dataLake.Analytics/lib/account/models/capabilityInformation.js new file mode 100644 index 0000000000..a85636e2c6 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/capabilityInformation.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'; + +/** + * Subscription-level properties and limits for Data Lake Analytics. + * + */ +class CapabilityInformation { + /** + * Create a CapabilityInformation. + * @member {uuid} [subscriptionId] The subscription credentials that uniquely + * identifies the subscription. + * @member {string} [state] The subscription state. Possible values include: + * 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned' + * @member {number} [maxAccountCount] The maximum supported number of + * accounts under this subscription. + * @member {number} [accountCount] The current number of accounts under this + * subscription. + * @member {boolean} [migrationState] The Boolean value of true or false to + * indicate the maintenance state. + */ + constructor() { + } + + /** + * Defines the metadata of CapabilityInformation + * + * @returns {object} metadata of CapabilityInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'CapabilityInformation', + type: { + name: 'Composite', + className: 'CapabilityInformation', + modelProperties: { + subscriptionId: { + required: false, + readOnly: true, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + maxAccountCount: { + required: false, + readOnly: true, + serializedName: 'maxAccountCount', + type: { + name: 'Number' + } + }, + accountCount: { + required: false, + readOnly: true, + serializedName: 'accountCount', + type: { + name: 'Number' + } + }, + migrationState: { + required: false, + readOnly: true, + serializedName: 'migrationState', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = CapabilityInformation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/checkNameAvailabilityParameters.js b/lib/services/dataLake.Analytics/lib/account/models/checkNameAvailabilityParameters.js new file mode 100644 index 0000000000..cc465b4204 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/checkNameAvailabilityParameters.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'; + +/** + * Data Lake Analytics account name availability check parameters. + * + */ +class CheckNameAvailabilityParameters { + /** + * Create a CheckNameAvailabilityParameters. + * @member {string} name The Data Lake Analytics name to check availability + * for. + */ + constructor() { + } + + /** + * Defines the metadata of CheckNameAvailabilityParameters + * + * @returns {object} metadata of CheckNameAvailabilityParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CheckNameAvailabilityParameters', + type: { + name: 'Composite', + className: 'CheckNameAvailabilityParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'Microsoft.DataLakeAnalytics/accounts', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CheckNameAvailabilityParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/computePolicy.js b/lib/services/dataLake.Analytics/lib/account/models/computePolicy.js index 0f41c9d77d..dbc8f8cb48 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/computePolicy.js +++ b/lib/services/dataLake.Analytics/lib/account/models/computePolicy.js @@ -10,14 +10,16 @@ 'use strict'; +const models = require('./index'); + /** - * The parameters used to create a new compute policy. + * Data Lake Analytics compute policy information. * + * @extends models['SubResource'] */ -class ComputePolicy { +class ComputePolicy extends models['SubResource'] { /** * Create a ComputePolicy. - * @member {string} [name] The name of the compute policy * @member {uuid} [objectId] The AAD object identifier for the entity to * create a policy for. * @member {string} [objectType] The type of AAD object the object identifier @@ -28,6 +30,7 @@ class ComputePolicy { * user can use to submit jobs. */ constructor() { + super(); } /** @@ -44,6 +47,14 @@ class ComputePolicy { name: 'Composite', className: 'ComputePolicy', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, name: { required: false, readOnly: true, @@ -52,6 +63,14 @@ class ComputePolicy { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, objectId: { required: false, readOnly: true, @@ -70,6 +89,7 @@ class ComputePolicy { }, maxDegreeOfParallelismPerJob: { required: false, + readOnly: true, serializedName: 'properties.maxDegreeOfParallelismPerJob', constraints: { InclusiveMinimum: 1 @@ -80,6 +100,7 @@ class ComputePolicy { }, minPriorityPerJob: { required: false, + readOnly: true, serializedName: 'properties.minPriorityPerJob', constraints: { InclusiveMinimum: 1 diff --git a/lib/services/dataLake.Analytics/lib/account/models/computePolicyListResult.js b/lib/services/dataLake.Analytics/lib/account/models/computePolicyListResult.js index a7d2e1bb51..6d8280d591 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/computePolicyListResult.js +++ b/lib/services/dataLake.Analytics/lib/account/models/computePolicyListResult.js @@ -16,7 +16,7 @@ class ComputePolicyListResult extends Array { /** * Create a ComputePolicyListResult. - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ constructor() { super(); diff --git a/lib/services/dataLake.Analytics/lib/account/models/createComputePolicyWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/createComputePolicyWithAccountParameters.js new file mode 100644 index 0000000000..a90652a943 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/createComputePolicyWithAccountParameters.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'; + +/** + * The parameters used to create a new compute policy while creating a new Data + * Lake Analytics account. + * + */ +class CreateComputePolicyWithAccountParameters { + /** + * Create a CreateComputePolicyWithAccountParameters. + * @member {string} name The unique name of the compute policy to create. + * @member {uuid} objectId The AAD object identifier for the entity to create + * a policy for. + * @member {string} objectType The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this + * user can use to submit jobs. This property, the max degree of parallelism + * per job property, or both must be passed. + */ + constructor() { + } + + /** + * Defines the metadata of CreateComputePolicyWithAccountParameters + * + * @returns {object} metadata of CreateComputePolicyWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateComputePolicyWithAccountParameters', + type: { + name: 'Composite', + className: 'CreateComputePolicyWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + objectId: { + required: true, + serializedName: 'properties.objectId', + type: { + name: 'String' + } + }, + objectType: { + required: true, + serializedName: 'properties.objectType', + type: { + name: 'String' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = CreateComputePolicyWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/createDataLakeAnalyticsAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/createDataLakeAnalyticsAccountParameters.js new file mode 100644 index 0000000000..148fd5c1d2 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/createDataLakeAnalyticsAccountParameters.js @@ -0,0 +1,244 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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 parameters to use for creating a Data Lake Analytics account. + * + */ +class CreateDataLakeAnalyticsAccountParameters { + /** + * Create a CreateDataLakeAnalyticsAccountParameters. + * @member {string} location The resource location. + * @member {object} [tags] The resource tags. + * @member {string} defaultDataLakeStoreAccount The default Data Lake Store + * account associated with this account. + * @member {array} dataLakeStoreAccounts The list of Data Lake Store accounts + * associated with this account. + * @member {array} [storageAccounts] The list of Azure Blob Storage accounts + * associated with this account. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. + * @member {string} [firewallState] The current state of the IP address + * firewall for this account. Possible values include: 'Enabled', 'Disabled' + * @member {string} [firewallAllowAzureIps] The current state of allowing or + * disallowing IPs originating within Azure through the firewall. If the + * firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * @member {string} [newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', + * 'Commitment_5000AUHours', 'Commitment_10000AUHours', + * 'Commitment_50000AUHours', 'Commitment_100000AUHours', + * 'Commitment_500000AUHours' + * @member {number} [maxJobCount] The maximum supported jobs running under + * the account at the same time. Default value: 3 . + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. Default value: 30 . + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported + * degree of parallelism per job for this account. + * @member {number} [minPriorityPerJob] The minimum supported priority per + * job for this account. + * @member {number} [queryStoreRetention] The number of days that job + * metadata is retained. Default value: 30 . + */ + constructor() { + } + + /** + * Defines the metadata of CreateDataLakeAnalyticsAccountParameters + * + * @returns {object} metadata of CreateDataLakeAnalyticsAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateDataLakeAnalyticsAccountParameters', + type: { + name: 'Composite', + className: 'CreateDataLakeAnalyticsAccountParameters', + modelProperties: { + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + defaultDataLakeStoreAccount: { + required: true, + serializedName: 'properties.defaultDataLakeStoreAccount', + type: { + name: 'String' + } + }, + dataLakeStoreAccounts: { + required: true, + serializedName: 'properties.dataLakeStoreAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AddDataLakeStoreWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'AddDataLakeStoreWithAccountParameters' + } + } + } + }, + storageAccounts: { + required: false, + serializedName: 'properties.storageAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AddStorageAccountWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'AddStorageAccountWithAccountParameters' + } + } + } + }, + computePolicies: { + required: false, + serializedName: 'properties.computePolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CreateComputePolicyWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'CreateComputePolicyWithAccountParameters' + } + } + } + }, + firewallRules: { + required: false, + serializedName: 'properties.firewallRules', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CreateFirewallRuleWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'CreateFirewallRuleWithAccountParameters' + } + } + } + }, + firewallState: { + required: false, + serializedName: 'properties.firewallState', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, + firewallAllowAzureIps: { + required: false, + serializedName: 'properties.firewallAllowAzureIps', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, + newTier: { + required: false, + serializedName: 'properties.newTier', + type: { + name: 'Enum', + allowedValues: [ 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' ] + } + }, + maxJobCount: { + required: false, + serializedName: 'properties.maxJobCount', + defaultValue: 3, + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + maxDegreeOfParallelism: { + required: false, + serializedName: 'properties.maxDegreeOfParallelism', + defaultValue: 30, + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + queryStoreRetention: { + required: false, + serializedName: 'properties.queryStoreRetention', + defaultValue: 30, + constraints: { + InclusiveMaximum: 180, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = CreateDataLakeAnalyticsAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/createFirewallRuleWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/createFirewallRuleWithAccountParameters.js new file mode 100644 index 0000000000..d6b7187813 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/createFirewallRuleWithAccountParameters.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'; + +/** + * The parameters used to create a new firewall rule while creating a new Data + * Lake Analytics account. + * + */ +class CreateFirewallRuleWithAccountParameters { + /** + * Create a CreateFirewallRuleWithAccountParameters. + * @member {string} name The unique name of the firewall rule to create. + * @member {string} startIpAddress The start IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} endIpAddress The end IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + */ + constructor() { + } + + /** + * Defines the metadata of CreateFirewallRuleWithAccountParameters + * + * @returns {object} metadata of CreateFirewallRuleWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateFirewallRuleWithAccountParameters', + type: { + name: 'Composite', + className: 'CreateFirewallRuleWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + startIpAddress: { + required: true, + serializedName: 'properties.startIpAddress', + type: { + name: 'String' + } + }, + endIpAddress: { + required: true, + serializedName: 'properties.endIpAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CreateFirewallRuleWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateComputePolicyParameters.js b/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateComputePolicyParameters.js new file mode 100644 index 0000000000..e3aabc3cc1 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateComputePolicyParameters.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'; + +/** + * The parameters used to create a new compute policy. + * + */ +class CreateOrUpdateComputePolicyParameters { + /** + * Create a CreateOrUpdateComputePolicyParameters. + * @member {uuid} objectId The AAD object identifier for the entity to create + * a policy for. + * @member {string} objectType The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this + * user can use to submit jobs. This property, the max degree of parallelism + * per job property, or both must be passed. + */ + constructor() { + } + + /** + * Defines the metadata of CreateOrUpdateComputePolicyParameters + * + * @returns {object} metadata of CreateOrUpdateComputePolicyParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateOrUpdateComputePolicyParameters', + type: { + name: 'Composite', + className: 'CreateOrUpdateComputePolicyParameters', + modelProperties: { + objectId: { + required: true, + serializedName: 'properties.objectId', + type: { + name: 'String' + } + }, + objectType: { + required: true, + serializedName: 'properties.objectType', + type: { + name: 'String' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = CreateOrUpdateComputePolicyParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateFirewallRuleParameters.js b/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateFirewallRuleParameters.js new file mode 100644 index 0000000000..db03719387 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/createOrUpdateFirewallRuleParameters.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'; + +/** + * The parameters used to create a new firewall rule. + * + */ +class CreateOrUpdateFirewallRuleParameters { + /** + * Create a CreateOrUpdateFirewallRuleParameters. + * @member {string} startIpAddress The start IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} endIpAddress The end IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + */ + constructor() { + } + + /** + * Defines the metadata of CreateOrUpdateFirewallRuleParameters + * + * @returns {object} metadata of CreateOrUpdateFirewallRuleParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'CreateOrUpdateFirewallRuleParameters', + type: { + name: 'Composite', + className: 'CreateOrUpdateFirewallRuleParameters', + modelProperties: { + startIpAddress: { + required: true, + serializedName: 'properties.startIpAddress', + type: { + name: 'String' + } + }, + endIpAddress: { + required: true, + serializedName: 'properties.endIpAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CreateOrUpdateFirewallRuleParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccount.js b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccount.js index 77ff3b56eb..54fba01f8a 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccount.js +++ b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccount.js @@ -21,62 +21,61 @@ const models = require('./index'); class DataLakeAnalyticsAccount extends models['Resource'] { /** * Create a DataLakeAnalyticsAccount. - * @member {string} [provisioningState] the provisioning status of the Data + * @member {uuid} [accountId] The unique identifier associated with this Data + * Lake Analytics account. + * @member {string} [provisioningState] The provisioning status of the Data * Lake Analytics account. Possible values include: 'Failed', 'Creating', * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', * 'Deleted', 'Undeleting', 'Canceled' - * @member {string} [state] the state of the Data Lake Analytics account. + * @member {string} [state] The state of the Data Lake Analytics account. * Possible values include: 'Active', 'Suspended' - * @member {date} [creationTime] the account creation time. - * @member {date} [lastModifiedTime] the account last modified time. - * @member {string} [endpoint] the full CName endpoint for this account. - * @member {uuid} [accountId] The unique identifier associated with this Data - * Lake Analytics account. - * @member {string} defaultDataLakeStoreAccount the default data lake storage - * account associated with this Data Lake Analytics account. - * @member {number} [maxDegreeOfParallelism] the maximum supported degree of - * parallelism for this account. Default value: 30 . - * @member {number} [queryStoreRetention] the number of days that job - * metadata is retained. Default value: 30 . - * @member {number} [maxJobCount] the maximum supported jobs running under - * the account at the same time. Default value: 3 . - * @member {number} [systemMaxDegreeOfParallelism] the system defined maximum - * supported degree of parallelism for this account, which restricts the - * maximum value of parallelism the user can set for the account.. - * @member {number} [systemMaxJobCount] the system defined maximum supported - * jobs running under the account at the same time, which restricts the - * maximum number of running jobs the user can set for the account. - * @member {array} dataLakeStoreAccounts the list of Data Lake storage + * @member {date} [creationTime] The account creation time. + * @member {date} [lastModifiedTime] The account last modified time. + * @member {string} [endpoint] The full CName endpoint for this account. + * @member {string} [defaultDataLakeStoreAccount] The default Data Lake Store + * account associated with this account. + * @member {array} [dataLakeStoreAccounts] The list of Data Lake Store * accounts associated with this account. - * @member {array} [storageAccounts] the list of Azure Blob storage accounts + * @member {array} [storageAccounts] The list of Azure Blob Storage accounts * associated with this account. - * @member {string} [newTier] the commitment tier for the next month. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. + * @member {string} [firewallState] The current state of the IP address + * firewall for this account. Possible values include: 'Enabled', 'Disabled' + * @member {string} [firewallAllowAzureIps] The current state of allowing or + * disallowing IPs originating within Azure through the firewall. If the + * firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * @member {string} [newTier] The commitment tier for the next month. * Possible values include: 'Consumption', 'Commitment_100AUHours', * 'Commitment_500AUHours', 'Commitment_1000AUHours', * 'Commitment_5000AUHours', 'Commitment_10000AUHours', * 'Commitment_50000AUHours', 'Commitment_100000AUHours', * 'Commitment_500000AUHours' - * @member {string} [currentTier] the commitment tier in use for the current + * @member {string} [currentTier] The commitment tier in use for the current * month. Possible values include: 'Consumption', 'Commitment_100AUHours', * 'Commitment_500AUHours', 'Commitment_1000AUHours', * 'Commitment_5000AUHours', 'Commitment_10000AUHours', * 'Commitment_50000AUHours', 'Commitment_100000AUHours', * 'Commitment_500000AUHours' - * @member {string} [firewallState] The current state of the IP address - * firewall for this Data Lake Analytics account. Possible values include: - * 'Enabled', 'Disabled' - * @member {string} [firewallAllowAzureIps] The current state of allowing or - * disallowing IPs originating within Azure through the firewall. If the - * firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' - * @member {array} [firewallRules] The list of firewall rules associated with - * this Data Lake Analytics account. - * @member {number} [maxDegreeOfParallelismPerJob] the maximum supported + * @member {number} [maxJobCount] The maximum supported jobs running under + * the account at the same time. Default value: 3 . + * @member {number} [systemMaxJobCount] The system defined maximum supported + * jobs running under the account at the same time, which restricts the + * maximum number of running jobs the user can set for the account. + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. Default value: 30 . + * @member {number} [systemMaxDegreeOfParallelism] The system defined maximum + * supported degree of parallelism for this account, which restricts the + * maximum value of parallelism the user can set for the account. + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported * degree of parallelism per job for this account. - * @member {number} [minPriorityPerJob] the minimum supported priority per + * @member {number} [minPriorityPerJob] The minimum supported priority per * job for this account. - * @member {array} [computePolicies] the list of compute policies to create - * in this account. + * @member {number} [queryStoreRetention] The number of days that job + * metadata is retained. Default value: 30 . */ constructor() { super(); @@ -121,7 +120,8 @@ class DataLakeAnalyticsAccount extends models['Resource'] { } }, location: { - required: true, + required: false, + readOnly: true, serializedName: 'location', type: { name: 'String' @@ -129,6 +129,7 @@ class DataLakeAnalyticsAccount extends models['Resource'] { }, tags: { required: false, + readOnly: true, serializedName: 'tags', type: { name: 'Dictionary', @@ -141,6 +142,14 @@ class DataLakeAnalyticsAccount extends models['Resource'] { } } }, + accountId: { + required: false, + readOnly: true, + serializedName: 'properties.accountId', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, @@ -183,103 +192,99 @@ class DataLakeAnalyticsAccount extends models['Resource'] { name: 'String' } }, - accountId: { + defaultDataLakeStoreAccount: { required: false, readOnly: true, - serializedName: 'properties.accountId', - type: { - name: 'String' - } - }, - defaultDataLakeStoreAccount: { - required: true, serializedName: 'properties.defaultDataLakeStoreAccount', type: { name: 'String' } }, - maxDegreeOfParallelism: { - required: false, - serializedName: 'properties.maxDegreeOfParallelism', - defaultValue: 30, - constraints: { - InclusiveMinimum: 1 - }, - type: { - name: 'Number' - } - }, - queryStoreRetention: { - required: false, - serializedName: 'properties.queryStoreRetention', - defaultValue: 30, - constraints: { - InclusiveMaximum: 180, - InclusiveMinimum: 1 - }, - type: { - name: 'Number' - } - }, - maxJobCount: { + dataLakeStoreAccounts: { required: false, - serializedName: 'properties.maxJobCount', - defaultValue: 3, - constraints: { - InclusiveMinimum: 1 - }, + readOnly: true, + serializedName: 'properties.dataLakeStoreAccounts', type: { - name: 'Number' + name: 'Sequence', + element: { + required: false, + serializedName: 'DataLakeStoreAccountInformationElementType', + type: { + name: 'Composite', + className: 'DataLakeStoreAccountInformation' + } + } } }, - systemMaxDegreeOfParallelism: { + storageAccounts: { required: false, readOnly: true, - serializedName: 'properties.systemMaxDegreeOfParallelism', + serializedName: 'properties.storageAccounts', type: { - name: 'Number' + name: 'Sequence', + element: { + required: false, + serializedName: 'StorageAccountInformationElementType', + type: { + name: 'Composite', + className: 'StorageAccountInformation' + } + } } }, - systemMaxJobCount: { + computePolicies: { required: false, readOnly: true, - serializedName: 'properties.systemMaxJobCount', - type: { - name: 'Number' - } - }, - dataLakeStoreAccounts: { - required: true, - serializedName: 'properties.dataLakeStoreAccounts', + serializedName: 'properties.computePolicies', type: { name: 'Sequence', element: { required: false, - serializedName: 'DataLakeStoreAccountInfoElementType', + serializedName: 'ComputePolicyElementType', type: { name: 'Composite', - className: 'DataLakeStoreAccountInfo' + className: 'ComputePolicy' } } } }, - storageAccounts: { + firewallRules: { required: false, - serializedName: 'properties.storageAccounts', + readOnly: true, + serializedName: 'properties.firewallRules', type: { name: 'Sequence', element: { required: false, - serializedName: 'StorageAccountInfoElementType', + serializedName: 'FirewallRuleElementType', type: { name: 'Composite', - className: 'StorageAccountInfo' + className: 'FirewallRule' } } } }, + firewallState: { + required: false, + readOnly: true, + serializedName: 'properties.firewallState', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, + firewallAllowAzureIps: { + required: false, + readOnly: true, + serializedName: 'properties.firewallAllowAzureIps', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, newTier: { required: false, + readOnly: true, serializedName: 'properties.newTier', type: { name: 'Enum', @@ -295,39 +300,49 @@ class DataLakeAnalyticsAccount extends models['Resource'] { allowedValues: [ 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' ] } }, - firewallState: { + maxJobCount: { required: false, - serializedName: 'properties.firewallState', + readOnly: true, + serializedName: 'properties.maxJobCount', + defaultValue: 3, + constraints: { + InclusiveMinimum: 1 + }, type: { - name: 'Enum', - allowedValues: [ 'Enabled', 'Disabled' ] + name: 'Number' } }, - firewallAllowAzureIps: { + systemMaxJobCount: { required: false, - serializedName: 'properties.firewallAllowAzureIps', + readOnly: true, + serializedName: 'properties.systemMaxJobCount', type: { - name: 'Enum', - allowedValues: [ 'Enabled', 'Disabled' ] + name: 'Number' } }, - firewallRules: { + maxDegreeOfParallelism: { required: false, - serializedName: 'properties.firewallRules', + readOnly: true, + serializedName: 'properties.maxDegreeOfParallelism', + defaultValue: 30, + constraints: { + InclusiveMinimum: 1 + }, type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'FirewallRuleElementType', - type: { - name: 'Composite', - className: 'FirewallRule' - } - } + name: 'Number' + } + }, + systemMaxDegreeOfParallelism: { + required: false, + readOnly: true, + serializedName: 'properties.systemMaxDegreeOfParallelism', + type: { + name: 'Number' } }, maxDegreeOfParallelismPerJob: { required: false, + readOnly: true, serializedName: 'properties.maxDegreeOfParallelismPerJob', constraints: { InclusiveMinimum: 1 @@ -338,6 +353,7 @@ class DataLakeAnalyticsAccount extends models['Resource'] { }, minPriorityPerJob: { required: false, + readOnly: true, serializedName: 'properties.minPriorityPerJob', constraints: { InclusiveMinimum: 1 @@ -346,19 +362,17 @@ class DataLakeAnalyticsAccount extends models['Resource'] { name: 'Number' } }, - computePolicies: { + queryStoreRetention: { required: false, - serializedName: 'properties.computePolicies', + readOnly: true, + serializedName: 'properties.queryStoreRetention', + defaultValue: 30, + constraints: { + InclusiveMaximum: 180, + InclusiveMinimum: 1 + }, type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ComputePolicyAccountCreateParametersElementType', - type: { - name: 'Composite', - className: 'ComputePolicyAccountCreateParameters' - } - } + name: 'Number' } } } diff --git a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountBasic.js b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountBasic.js index 5376be545f..aea9785c1a 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountBasic.js +++ b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountBasic.js @@ -21,17 +21,17 @@ const models = require('./index'); class DataLakeAnalyticsAccountBasic extends models['Resource'] { /** * Create a DataLakeAnalyticsAccountBasic. - * @member {string} [provisioningState] the provisioning status of the Data + * @member {uuid} [accountId] The unique identifier associated with this Data + * Lake Analytics account. + * @member {string} [provisioningState] The provisioning status of the Data * Lake Analytics account. Possible values include: 'Failed', 'Creating', * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', * 'Deleted', 'Undeleting', 'Canceled' - * @member {string} [state] the state of the Data Lake Analytics account. + * @member {string} [state] The state of the Data Lake Analytics account. * Possible values include: 'Active', 'Suspended' - * @member {date} [creationTime] the account creation time. - * @member {date} [lastModifiedTime] the account last modified time. - * @member {string} [endpoint] the full CName endpoint for this account. - * @member {uuid} [accountId] The unique identifier associated with this Data - * Lake Analytics account. + * @member {date} [creationTime] The account creation time. + * @member {date} [lastModifiedTime] The account last modified time. + * @member {string} [endpoint] The full CName endpoint for this account. */ constructor() { super(); @@ -76,7 +76,8 @@ class DataLakeAnalyticsAccountBasic extends models['Resource'] { } }, location: { - required: true, + required: false, + readOnly: true, serializedName: 'location', type: { name: 'String' @@ -84,6 +85,7 @@ class DataLakeAnalyticsAccountBasic extends models['Resource'] { }, tags: { required: false, + readOnly: true, serializedName: 'tags', type: { name: 'Dictionary', @@ -96,6 +98,14 @@ class DataLakeAnalyticsAccountBasic extends models['Resource'] { } } }, + accountId: { + required: false, + readOnly: true, + serializedName: 'properties.accountId', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, @@ -137,14 +147,6 @@ class DataLakeAnalyticsAccountBasic extends models['Resource'] { type: { name: 'String' } - }, - accountId: { - required: false, - readOnly: true, - serializedName: 'properties.accountId', - type: { - name: 'String' - } } } } diff --git a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountListResult.js b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountListResult.js index 2d2d036d0c..2f3a6ad4d8 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountListResult.js +++ b/lib/services/dataLake.Analytics/lib/account/models/dataLakeAnalyticsAccountListResult.js @@ -11,12 +11,12 @@ 'use strict'; /** - * DataLakeAnalytics Account list information. + * Data Lake Analytics account list information. */ class DataLakeAnalyticsAccountListResult extends Array { /** * Create a DataLakeAnalyticsAccountListResult. - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ constructor() { super(); diff --git a/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformation.js b/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformation.js new file mode 100644 index 0000000000..3d70eee0aa --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformation.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Data Lake Store account information. + * + * @extends models['SubResource'] + */ +class DataLakeStoreAccountInformation extends models['SubResource'] { + /** + * Create a DataLakeStoreAccountInformation. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataLakeStoreAccountInformation + * + * @returns {object} metadata of DataLakeStoreAccountInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'DataLakeStoreAccountInformation', + type: { + name: 'Composite', + className: 'DataLakeStoreAccountInformation', + modelProperties: { + id: { + required: false, + readOnly: true, + 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' + } + }, + suffix: { + required: false, + readOnly: true, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataLakeStoreAccountInformation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformationListResult.js b/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformationListResult.js new file mode 100644 index 0000000000..6d73ae6961 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/dataLakeStoreAccountInformationListResult.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'; + +/** + * Data Lake Store account list information. + */ +class DataLakeStoreAccountInformationListResult extends Array { + /** + * Create a DataLakeStoreAccountInformationListResult. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DataLakeStoreAccountInformationListResult + * + * @returns {object} metadata of DataLakeStoreAccountInformationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'DataLakeStoreAccountInformationListResult', + type: { + name: 'Composite', + className: 'DataLakeStoreAccountInformationListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataLakeStoreAccountInformationElementType', + type: { + name: 'Composite', + className: 'DataLakeStoreAccountInformation' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataLakeStoreAccountInformationListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/firewallRule.js b/lib/services/dataLake.Analytics/lib/account/models/firewallRule.js index fbf3046c69..9d29b310e7 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/firewallRule.js +++ b/lib/services/dataLake.Analytics/lib/account/models/firewallRule.js @@ -13,17 +13,17 @@ const models = require('./index'); /** - * Data Lake Analytics firewall rule information + * Data Lake Analytics firewall rule information. * - * @extends models['OptionalSubResource'] + * @extends models['SubResource'] */ -class FirewallRule extends models['OptionalSubResource'] { +class FirewallRule extends models['SubResource'] { /** * Create a FirewallRule. - * @member {string} startIpAddress the start IP address for the firewall + * @member {string} [startIpAddress] The start IP address for the firewall * rule. This can be either ipv4 or ipv6. Start and End should be in the same * protocol. - * @member {string} endIpAddress the end IP address for the firewall rule. + * @member {string} [endIpAddress] The end IP address for the firewall rule. * This can be either ipv4 or ipv6. Start and End should be in the same * protocol. */ @@ -55,6 +55,7 @@ class FirewallRule extends models['OptionalSubResource'] { }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' @@ -69,14 +70,16 @@ class FirewallRule extends models['OptionalSubResource'] { } }, startIpAddress: { - required: true, + required: false, + readOnly: true, serializedName: 'properties.startIpAddress', type: { name: 'String' } }, endIpAddress: { - required: true, + required: false, + readOnly: true, serializedName: 'properties.endIpAddress', type: { name: 'String' diff --git a/lib/services/dataLake.Analytics/lib/account/models/firewallRuleListResult.js b/lib/services/dataLake.Analytics/lib/account/models/firewallRuleListResult.js new file mode 100644 index 0000000000..811c5f0ea3 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/firewallRuleListResult.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'; + +/** + * Data Lake Analytics firewall rule list information. + */ +class FirewallRuleListResult extends Array { + /** + * Create a FirewallRuleListResult. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FirewallRuleListResult + * + * @returns {object} metadata of FirewallRuleListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'FirewallRuleListResult', + type: { + name: 'Composite', + className: 'FirewallRuleListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FirewallRuleElementType', + type: { + name: 'Composite', + className: 'FirewallRule' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FirewallRuleListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/index.d.ts b/lib/services/dataLake.Analytics/lib/account/models/index.d.ts index b5e5017b3b..d82827a74a 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/index.d.ts +++ b/lib/services/dataLake.Analytics/lib/account/models/index.d.ts @@ -16,35 +16,219 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * The resource model definition. + * + * @member {string} [id] The resource identifer. + * @member {string} [name] The resource name. + * @member {string} [type] The resource type. + * @member {string} [location] The resource location. + * @member {object} [tags] The resource tags. + */ +export interface Resource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; + readonly location?: string; + readonly tags?: { [propertyName: string]: string }; +} + /** * @class * Initializes a new instance of the SubResource class. * @constructor - * The Sub Resource model definition. + * The resource model definition for a nested resource. * - * @member {string} [id] Resource Id - * @member {string} name Resource name - * @member {string} [type] Resource type + * @member {string} [id] The resource identifier. + * @member {string} [name] The resource name. + * @member {string} [type] The resource type. */ -export interface SubResource { +export interface SubResource extends BaseResource { readonly id?: string; - name: string; + readonly name?: string; readonly type?: string; } /** * @class - * Initializes a new instance of the StorageAccountInfo class. + * Initializes a new instance of the DataLakeStoreAccountInformation class. + * @constructor + * Data Lake Store account information. + * + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. + */ +export interface DataLakeStoreAccountInformation extends SubResource { + readonly suffix?: string; +} + +/** + * @class + * Initializes a new instance of the StorageAccountInformation class. * @constructor * Azure Storage account information. * - * @member {string} accessKey the access key associated with this Azure Storage - * account that will be used to connect to it. - * @member {string} [suffix] the optional suffix for the storage account. + * @member {string} [suffix] The optional suffix for the storage account. */ -export interface StorageAccountInfo extends SubResource { - accessKey: string; - suffix?: string; +export interface StorageAccountInformation extends SubResource { + readonly suffix?: string; +} + +/** + * @class + * Initializes a new instance of the ComputePolicy class. + * @constructor + * Data Lake Analytics compute policy information. + * + * @member {uuid} [objectId] The AAD object identifier for the entity to create + * a policy for. + * @member {string} [objectType] The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. + * @member {number} [minPriorityPerJob] The minimum priority per job this user + * can use to submit jobs. + */ +export interface ComputePolicy extends SubResource { + readonly objectId?: string; + readonly objectType?: string; + readonly maxDegreeOfParallelismPerJob?: number; + readonly minPriorityPerJob?: number; +} + +/** + * @class + * Initializes a new instance of the FirewallRule class. + * @constructor + * Data Lake Analytics firewall rule information. + * + * @member {string} [startIpAddress] The start IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} [endIpAddress] The end IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + */ +export interface FirewallRule extends SubResource { + readonly startIpAddress?: string; + readonly endIpAddress?: string; +} + +/** + * @class + * Initializes a new instance of the DataLakeAnalyticsAccount class. + * @constructor + * A Data Lake Analytics account object, containing all information associated + * with the named Data Lake Analytics account. + * + * @member {uuid} [accountId] The unique identifier associated with this Data + * Lake Analytics account. + * @member {string} [provisioningState] The provisioning status of the Data + * Lake Analytics account. Possible values include: 'Failed', 'Creating', + * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', + * 'Deleted', 'Undeleting', 'Canceled' + * @member {string} [state] The state of the Data Lake Analytics account. + * Possible values include: 'Active', 'Suspended' + * @member {date} [creationTime] The account creation time. + * @member {date} [lastModifiedTime] The account last modified time. + * @member {string} [endpoint] The full CName endpoint for this account. + * @member {string} [defaultDataLakeStoreAccount] The default Data Lake Store + * account associated with this account. + * @member {array} [dataLakeStoreAccounts] The list of Data Lake Store accounts + * associated with this account. + * @member {array} [storageAccounts] The list of Azure Blob Storage accounts + * associated with this account. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. + * @member {string} [firewallState] The current state of the IP address + * firewall for this account. Possible values include: 'Enabled', 'Disabled' + * @member {string} [firewallAllowAzureIps] The current state of allowing or + * disallowing IPs originating within Azure through the firewall. If the + * firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * @member {string} [newTier] The commitment tier for the next month. Possible + * values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @member {string} [currentTier] The commitment tier in use for the current + * month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @member {number} [maxJobCount] The maximum supported jobs running under the + * account at the same time. Default value: 3 . + * @member {number} [systemMaxJobCount] The system defined maximum supported + * jobs running under the account at the same time, which restricts the maximum + * number of running jobs the user can set for the account. + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. Default value: 30 . + * @member {number} [systemMaxDegreeOfParallelism] The system defined maximum + * supported degree of parallelism for this account, which restricts the + * maximum value of parallelism the user can set for the account. + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported degree + * of parallelism per job for this account. + * @member {number} [minPriorityPerJob] The minimum supported priority per job + * for this account. + * @member {number} [queryStoreRetention] The number of days that job metadata + * is retained. Default value: 30 . + */ +export interface DataLakeAnalyticsAccount extends Resource { + readonly accountId?: string; + readonly provisioningState?: string; + readonly state?: string; + readonly creationTime?: Date; + readonly lastModifiedTime?: Date; + readonly endpoint?: string; + readonly defaultDataLakeStoreAccount?: string; + readonly dataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; + readonly storageAccounts?: StorageAccountInformation[]; + readonly computePolicies?: ComputePolicy[]; + readonly firewallRules?: FirewallRule[]; + readonly firewallState?: string; + readonly firewallAllowAzureIps?: string; + readonly newTier?: string; + readonly currentTier?: string; + readonly maxJobCount?: number; + readonly systemMaxJobCount?: number; + readonly maxDegreeOfParallelism?: number; + readonly systemMaxDegreeOfParallelism?: number; + readonly maxDegreeOfParallelismPerJob?: number; + readonly minPriorityPerJob?: number; + readonly queryStoreRetention?: number; +} + +/** + * @class + * Initializes a new instance of the DataLakeAnalyticsAccountBasic class. + * @constructor + * A Data Lake Analytics account object, containing all information associated + * with the named Data Lake Analytics account. + * + * @member {uuid} [accountId] The unique identifier associated with this Data + * Lake Analytics account. + * @member {string} [provisioningState] The provisioning status of the Data + * Lake Analytics account. Possible values include: 'Failed', 'Creating', + * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', + * 'Deleted', 'Undeleting', 'Canceled' + * @member {string} [state] The state of the Data Lake Analytics account. + * Possible values include: 'Active', 'Suspended' + * @member {date} [creationTime] The account creation time. + * @member {date} [lastModifiedTime] The account last modified time. + * @member {string} [endpoint] The full CName endpoint for this account. + */ +export interface DataLakeAnalyticsAccountBasic extends Resource { + readonly accountId?: string; + readonly provisioningState?: string; + readonly state?: string; + readonly creationTime?: Date; + readonly lastModifiedTime?: Date; + readonly endpoint?: string; } /** @@ -53,86 +237,166 @@ export interface StorageAccountInfo extends SubResource { * @constructor * Azure Storage blob container information. * - * @member {string} [id] the unique identifier of the blob container. - * @member {string} [name] the name of the blob container. - * @member {string} [type] the type of the blob container. - * @member {date} [lastModifiedTime] the last modified time of the blob + * @member {date} [lastModifiedTime] The last modified time of the blob * container. */ -export interface StorageContainer { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export interface StorageContainer extends SubResource { readonly lastModifiedTime?: Date; } /** * @class - * Initializes a new instance of the SasTokenInfo class. + * Initializes a new instance of the SasTokenInformation class. * @constructor * SAS token information. * - * @member {string} [accessToken] the access token for the associated Azure + * @member {string} [accessToken] The access token for the associated Azure * Storage Container. */ -export interface SasTokenInfo { +export interface SasTokenInformation { readonly accessToken?: string; } /** * @class - * Initializes a new instance of the DataLakeStoreAccountInfo class. + * Initializes a new instance of the OperationDisplay class. * @constructor - * Data Lake Store account information. + * The display information for a particular operation. * - * @member {string} [suffix] the optional suffix for the Data Lake Store - * account. + * @member {string} [provider] The resource provider of the operation. + * @member {string} [resource] The resource type of the operation. + * @member {string} [operation] A friendly name of the operation. + * @member {string} [description] A friendly description of the operation. */ -export interface DataLakeStoreAccountInfo extends SubResource { - suffix?: string; +export interface OperationDisplay { + readonly provider?: string; + readonly resource?: string; + readonly operation?: string; + readonly description?: string; } /** * @class - * Initializes a new instance of the OptionalSubResource class. + * Initializes a new instance of the Operation class. * @constructor - * The Resource model definition for a nested resource with no required - * properties. + * An available operation for Data Lake Analytics. * - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type + * @member {string} [name] The name of the operation. + * @member {object} [display] The display information for the operation. + * @member {string} [display.provider] The resource provider of the operation. + * @member {string} [display.resource] The resource type of the operation. + * @member {string} [display.operation] A friendly name of the operation. + * @member {string} [display.description] A friendly description of the + * operation. + * @member {string} [origin] The intended executor of the operation. Possible + * values include: 'user', 'system', 'user,system' */ -export interface OptionalSubResource { - readonly id?: string; - name?: string; - readonly type?: string; +export interface Operation { + readonly name?: string; + readonly display?: OperationDisplay; + readonly origin?: string; } /** * @class - * Initializes a new instance of the FirewallRule class. + * Initializes a new instance of the OperationListResult class. * @constructor - * Data Lake Analytics firewall rule information + * The list of available operations for Data Lake Analytics. * - * @member {string} startIpAddress the start IP address for the firewall rule. - * This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. - * @member {string} endIpAddress the end IP address for the firewall rule. This - * can be either ipv4 or ipv6. Start and End should be in the same protocol. + * @member {array} [value] The results of the list operation. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface FirewallRule extends OptionalSubResource { - startIpAddress: string; - endIpAddress: string; +export interface OperationListResult { + readonly value?: Operation[]; + readonly nextLink?: string; } /** * @class - * Initializes a new instance of the ComputePolicyAccountCreateParameters class. + * Initializes a new instance of the CapabilityInformation class. * @constructor - * The parameters used to create a new compute policy. + * Subscription-level properties and limits for Data Lake Analytics. + * + * @member {uuid} [subscriptionId] The subscription credentials that uniquely + * identifies the subscription. + * @member {string} [state] The subscription state. Possible values include: + * 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned' + * @member {number} [maxAccountCount] The maximum supported number of accounts + * under this subscription. + * @member {number} [accountCount] The current number of accounts under this + * subscription. + * @member {boolean} [migrationState] The Boolean value of true or false to + * indicate the maintenance state. + */ +export interface CapabilityInformation { + readonly subscriptionId?: string; + readonly state?: string; + readonly maxAccountCount?: number; + readonly accountCount?: number; + readonly migrationState?: boolean; +} + +/** + * @class + * Initializes a new instance of the NameAvailabilityInformation class. + * @constructor + * Data Lake Analytics account name availability result information. + * + * @member {boolean} [nameAvailable] The Boolean value of true or false to + * indicate whether the Data Lake Analytics account name is available or not. + * @member {string} [reason] The reason why the Data Lake Analytics account + * name is not available, if nameAvailable is false. + * @member {string} [message] The message describing why the Data Lake + * Analytics account name is not available, if nameAvailable is false. + */ +export interface NameAvailabilityInformation { + readonly nameAvailable?: boolean; + readonly reason?: string; + readonly message?: string; +} + +/** + * @class + * Initializes a new instance of the AddDataLakeStoreWithAccountParameters class. + * @constructor + * The parameters used to add a new Data Lake Store account while creating a + * new Data Lake Analytics account. + * + * @member {string} name The unique name of the Data Lake Store account to add. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. + */ +export interface AddDataLakeStoreWithAccountParameters { + name: string; + suffix?: string; +} + +/** + * @class + * Initializes a new instance of the AddStorageAccountWithAccountParameters class. + * @constructor + * The parameters used to add a new Azure Storage account while creating a new + * Data Lake Analytics account. + * + * @member {string} name The unique name of the Azure Storage account to add. + * @member {string} accessKey The access key associated with this Azure Storage + * account that will be used to connect to it. + * @member {string} [suffix] The optional suffix for the storage account. + */ +export interface AddStorageAccountWithAccountParameters { + name: string; + accessKey: string; + suffix?: string; +} + +/** + * @class + * Initializes a new instance of the CreateComputePolicyWithAccountParameters class. + * @constructor + * The parameters used to create a new compute policy while creating a new Data + * Lake Analytics account. * - * @member {string} name The unique name of the policy to create + * @member {string} name The unique name of the compute policy to create. * @member {uuid} objectId The AAD object identifier for the entity to create a * policy for. * @member {string} objectType The type of AAD object the object identifier @@ -144,7 +408,7 @@ export interface FirewallRule extends OptionalSubResource { * can use to submit jobs. This property, the max degree of parallelism per job * property, or both must be passed. */ -export interface ComputePolicyAccountCreateParameters { +export interface CreateComputePolicyWithAccountParameters { name: string; objectId: string; objectType: string; @@ -154,82 +418,129 @@ export interface ComputePolicyAccountCreateParameters { /** * @class - * Initializes a new instance of the ComputePolicy class. + * Initializes a new instance of the CreateFirewallRuleWithAccountParameters class. * @constructor - * The parameters used to create a new compute policy. + * The parameters used to create a new firewall rule while creating a new Data + * Lake Analytics account. * - * @member {string} [name] The name of the compute policy - * @member {uuid} [objectId] The AAD object identifier for the entity to create - * a policy for. - * @member {string} [objectType] The type of AAD object the object identifier - * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' - * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of - * parallelism per job this user can use to submit jobs. - * @member {number} [minPriorityPerJob] The minimum priority per job this user - * can use to submit jobs. + * @member {string} name The unique name of the firewall rule to create. + * @member {string} startIpAddress The start IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} endIpAddress The end IP address for the firewall rule. This + * can be either ipv4 or ipv6. Start and End should be in the same protocol. */ -export interface ComputePolicy { - readonly name?: string; - readonly objectId?: string; - readonly objectType?: string; - maxDegreeOfParallelismPerJob?: number; - minPriorityPerJob?: number; +export interface CreateFirewallRuleWithAccountParameters { + name: string; + startIpAddress: string; + endIpAddress: string; } /** * @class - * Initializes a new instance of the AddDataLakeStoreParameters class. + * Initializes a new instance of the CreateDataLakeAnalyticsAccountParameters class. * @constructor - * Additional Data Lake Store parameters. + * The parameters to use for creating a Data Lake Analytics account. * - * @member {string} [suffix] the optional suffix for the Data Lake Store - * account. + * @member {string} location The resource location. + * @member {object} [tags] The resource tags. + * @member {string} defaultDataLakeStoreAccount The default Data Lake Store + * account associated with this account. + * @member {array} dataLakeStoreAccounts The list of Data Lake Store accounts + * associated with this account. + * @member {array} [storageAccounts] The list of Azure Blob Storage accounts + * associated with this account. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. + * @member {string} [firewallState] The current state of the IP address + * firewall for this account. Possible values include: 'Enabled', 'Disabled' + * @member {string} [firewallAllowAzureIps] The current state of allowing or + * disallowing IPs originating within Azure through the firewall. If the + * firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * @member {string} [newTier] The commitment tier for the next month. Possible + * values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @member {number} [maxJobCount] The maximum supported jobs running under the + * account at the same time. Default value: 3 . + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. Default value: 30 . + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported degree + * of parallelism per job for this account. + * @member {number} [minPriorityPerJob] The minimum supported priority per job + * for this account. + * @member {number} [queryStoreRetention] The number of days that job metadata + * is retained. Default value: 30 . */ -export interface AddDataLakeStoreParameters { - suffix?: string; +export interface CreateDataLakeAnalyticsAccountParameters { + location: string; + tags?: { [propertyName: string]: string }; + defaultDataLakeStoreAccount: string; + dataLakeStoreAccounts: AddDataLakeStoreWithAccountParameters[]; + storageAccounts?: AddStorageAccountWithAccountParameters[]; + computePolicies?: CreateComputePolicyWithAccountParameters[]; + firewallRules?: CreateFirewallRuleWithAccountParameters[]; + firewallState?: string; + firewallAllowAzureIps?: string; + newTier?: string; + maxJobCount?: number; + maxDegreeOfParallelism?: number; + maxDegreeOfParallelismPerJob?: number; + minPriorityPerJob?: number; + queryStoreRetention?: number; } /** * @class - * Initializes a new instance of the AddStorageAccountParameters class. + * Initializes a new instance of the UpdateDataLakeStoreWithAccountParameters class. * @constructor - * Storage account parameters for a storage account being added to a Data Lake - * Analytics account. + * The parameters used to update a Data Lake Store account while updating a + * Data Lake Analytics account. * - * @member {string} accessKey the access key associated with this Azure Storage - * account that will be used to connect to it. - * @member {string} [suffix] the optional suffix for the storage account. + * @member {string} name The unique name of the Data Lake Store account to + * update. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. */ -export interface AddStorageAccountParameters { - accessKey: string; +export interface UpdateDataLakeStoreWithAccountParameters { + name: string; suffix?: string; } /** * @class - * Initializes a new instance of the UpdateStorageAccountParameters class. + * Initializes a new instance of the UpdateStorageAccountWithAccountParameters class. * @constructor - * Storage account parameters for a storage account being updated in a Data + * The parameters used to update an Azure Storage account while updating a Data * Lake Analytics account. * - * @member {string} [accessKey] the updated access key associated with this + * @member {string} name The unique name of the Azure Storage account to + * update. + * @member {string} [accessKey] The updated access key associated with this * Azure Storage account that will be used to connect to it. - * @member {string} [suffix] the optional suffix for the storage account. + * @member {string} [suffix] The optional suffix for the storage account. */ -export interface UpdateStorageAccountParameters { +export interface UpdateStorageAccountWithAccountParameters { + name: string; accessKey?: string; suffix?: string; } /** * @class - * Initializes a new instance of the ComputePolicyCreateOrUpdateParameters class. + * Initializes a new instance of the UpdateComputePolicyWithAccountParameters class. * @constructor - * The parameters used to create a new compute policy. + * The parameters used to update a compute policy while updating a Data Lake + * Analytics account. * - * @member {uuid} objectId The AAD object identifier for the entity to create a - * policy for. - * @member {string} objectType The type of AAD object the object identifier + * @member {string} name The unique name of the compute policy to update. + * @member {uuid} [objectId] The AAD object identifier for the entity to create + * a policy for. + * @member {string} [objectType] The type of AAD object the object identifier * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of * parallelism per job this user can use to submit jobs. This property, the min @@ -238,235 +549,209 @@ export interface UpdateStorageAccountParameters { * can use to submit jobs. This property, the max degree of parallelism per job * property, or both must be passed. */ -export interface ComputePolicyCreateOrUpdateParameters { - objectId: string; - objectType: string; +export interface UpdateComputePolicyWithAccountParameters { + name: string; + objectId?: string; + objectType?: string; maxDegreeOfParallelismPerJob?: number; minPriorityPerJob?: number; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountUpdateParameters class. + * Initializes a new instance of the UpdateFirewallRuleWithAccountParameters class. + * @constructor + * The parameters used to update a firewall rule while updating a Data Lake + * Analytics account. + * + * @member {string} name The unique name of the firewall rule to update. + * @member {string} [startIpAddress] The start IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} [endIpAddress] The end IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + */ +export interface UpdateFirewallRuleWithAccountParameters { + name: string; + startIpAddress?: string; + endIpAddress?: string; +} + +/** + * @class + * Initializes a new instance of the UpdateDataLakeAnalyticsAccountParameters class. * @constructor * The parameters that can be used to update an existing Data Lake Analytics * account. * - * @member {object} [tags] Resource tags - * @member {number} [maxDegreeOfParallelism] the maximum supported degree of - * parallelism for this account. - * @member {number} [queryStoreRetention] the number of days that job metadata - * is retained. - * @member {number} [maxJobCount] the maximum supported jobs running under the - * account at the same time. - * @member {string} [newTier] the commitment tier to use for next month. - * Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @member {object} [tags] The resource tags. + * @member {array} [dataLakeStoreAccounts] The list of Data Lake Store accounts + * associated with this account. + * @member {array} [storageAccounts] The list of Azure Blob storage accounts + * associated with this account. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. * @member {string} [firewallState] The current state of the IP address - * firewall for this Data Lake Analytics account. Possible values include: - * 'Enabled', 'Disabled' + * firewall for this account. Disabling the firewall does not remove existing + * rules, they will just be ignored until the firewall is re-enabled. Possible + * values include: 'Enabled', 'Disabled' * @member {string} [firewallAllowAzureIps] The current state of allowing or * disallowing IPs originating within Azure through the firewall. If the * firewall is disabled, this is not enforced. Possible values include: * 'Enabled', 'Disabled' - * @member {array} [firewallRules] The list of firewall rules associated with - * this Data Lake Analytics account. - * @member {number} [maxDegreeOfParallelismPerJob] the maximum supported degree + * @member {string} [newTier] The commitment tier to use for next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @member {number} [maxJobCount] The maximum supported jobs running under the + * account at the same time. + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported degree * of parallelism per job for this account. - * @member {number} [minPriorityPerJob] the minimum supported priority per job + * @member {number} [minPriorityPerJob] The minimum supported priority per job * for this account. - * @member {array} [computePolicies] the list of existing compute policies to - * update in this account. + * @member {number} [queryStoreRetention] The number of days that job metadata + * is retained. */ -export interface DataLakeAnalyticsAccountUpdateParameters { +export interface UpdateDataLakeAnalyticsAccountParameters { tags?: { [propertyName: string]: string }; - maxDegreeOfParallelism?: number; - queryStoreRetention?: number; - maxJobCount?: number; - newTier?: string; + dataLakeStoreAccounts?: UpdateDataLakeStoreWithAccountParameters[]; + storageAccounts?: UpdateStorageAccountWithAccountParameters[]; + computePolicies?: UpdateComputePolicyWithAccountParameters[]; + firewallRules?: UpdateFirewallRuleWithAccountParameters[]; firewallState?: string; firewallAllowAzureIps?: string; - firewallRules?: FirewallRule[]; + newTier?: string; + maxJobCount?: number; + maxDegreeOfParallelism?: number; maxDegreeOfParallelismPerJob?: number; minPriorityPerJob?: number; - computePolicies?: ComputePolicy[]; + queryStoreRetention?: number; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountPropertiesBasic class. + * Initializes a new instance of the AddDataLakeStoreParameters class. * @constructor - * The basic account specific properties that are associated with an underlying - * Data Lake Analytics account. + * The parameters used to add a new Data Lake Store account. * - * @member {string} [provisioningState] the provisioning status of the Data - * Lake Analytics account. Possible values include: 'Failed', 'Creating', - * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', - * 'Deleted', 'Undeleting', 'Canceled' - * @member {string} [state] the state of the Data Lake Analytics account. - * Possible values include: 'Active', 'Suspended' - * @member {date} [creationTime] the account creation time. - * @member {date} [lastModifiedTime] the account last modified time. - * @member {string} [endpoint] the full CName endpoint for this account. - * @member {uuid} [accountId] The unique identifier associated with this Data - * Lake Analytics account. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. */ -export interface DataLakeAnalyticsAccountPropertiesBasic { - readonly provisioningState?: string; - readonly state?: string; - readonly creationTime?: Date; - readonly lastModifiedTime?: Date; - readonly endpoint?: string; - readonly accountId?: string; +export interface AddDataLakeStoreParameters { + suffix?: string; } /** * @class - * Initializes a new instance of the Resource class. + * Initializes a new instance of the AddStorageAccountParameters class. * @constructor - * The Resource model definition. + * The parameters used to add a new Azure Storage account. * - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type - * @member {string} location Resource location - * @member {object} [tags] Resource tags + * @member {string} accessKey The access key associated with this Azure Storage + * account that will be used to connect to it. + * @member {string} [suffix] The optional suffix for the storage account. */ -export interface Resource extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; - location: string; - tags?: { [propertyName: string]: string }; +export interface AddStorageAccountParameters { + accessKey: string; + suffix?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountBasic class. + * Initializes a new instance of the UpdateStorageAccountParameters class. * @constructor - * A Data Lake Analytics account object, containing all information associated - * with the named Data Lake Analytics account. + * The parameters used to update an Azure Storage account. * - * @member {string} [provisioningState] the provisioning status of the Data - * Lake Analytics account. Possible values include: 'Failed', 'Creating', - * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', - * 'Deleted', 'Undeleting', 'Canceled' - * @member {string} [state] the state of the Data Lake Analytics account. - * Possible values include: 'Active', 'Suspended' - * @member {date} [creationTime] the account creation time. - * @member {date} [lastModifiedTime] the account last modified time. - * @member {string} [endpoint] the full CName endpoint for this account. - * @member {uuid} [accountId] The unique identifier associated with this Data - * Lake Analytics account. + * @member {string} [accessKey] The updated access key associated with this + * Azure Storage account that will be used to connect to it. + * @member {string} [suffix] The optional suffix for the storage account. */ -export interface DataLakeAnalyticsAccountBasic extends Resource { - readonly provisioningState?: string; - readonly state?: string; - readonly creationTime?: Date; - readonly lastModifiedTime?: Date; - readonly endpoint?: string; - readonly accountId?: string; +export interface UpdateStorageAccountParameters { + accessKey?: string; + suffix?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccount class. + * Initializes a new instance of the CreateOrUpdateComputePolicyParameters class. * @constructor - * A Data Lake Analytics account object, containing all information associated - * with the named Data Lake Analytics account. + * The parameters used to create a new compute policy. * - * @member {string} [provisioningState] the provisioning status of the Data - * Lake Analytics account. Possible values include: 'Failed', 'Creating', - * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', - * 'Deleted', 'Undeleting', 'Canceled' - * @member {string} [state] the state of the Data Lake Analytics account. - * Possible values include: 'Active', 'Suspended' - * @member {date} [creationTime] the account creation time. - * @member {date} [lastModifiedTime] the account last modified time. - * @member {string} [endpoint] the full CName endpoint for this account. - * @member {uuid} [accountId] The unique identifier associated with this Data - * Lake Analytics account. - * @member {string} defaultDataLakeStoreAccount the default data lake storage - * account associated with this Data Lake Analytics account. - * @member {number} [maxDegreeOfParallelism] the maximum supported degree of - * parallelism for this account. Default value: 30 . - * @member {number} [queryStoreRetention] the number of days that job metadata - * is retained. Default value: 30 . - * @member {number} [maxJobCount] the maximum supported jobs running under the - * account at the same time. Default value: 3 . - * @member {number} [systemMaxDegreeOfParallelism] the system defined maximum - * supported degree of parallelism for this account, which restricts the - * maximum value of parallelism the user can set for the account.. - * @member {number} [systemMaxJobCount] the system defined maximum supported - * jobs running under the account at the same time, which restricts the maximum - * number of running jobs the user can set for the account. - * @member {array} dataLakeStoreAccounts the list of Data Lake storage accounts - * associated with this account. - * @member {array} [storageAccounts] the list of Azure Blob storage accounts - * associated with this account. - * @member {string} [newTier] the commitment tier for the next month. Possible - * values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' - * @member {string} [currentTier] the commitment tier in use for the current - * month. Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' - * @member {string} [firewallState] The current state of the IP address - * firewall for this Data Lake Analytics account. Possible values include: - * 'Enabled', 'Disabled' - * @member {string} [firewallAllowAzureIps] The current state of allowing or - * disallowing IPs originating within Azure through the firewall. If the - * firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' - * @member {array} [firewallRules] The list of firewall rules associated with - * this Data Lake Analytics account. - * @member {number} [maxDegreeOfParallelismPerJob] the maximum supported degree - * of parallelism per job for this account. - * @member {number} [minPriorityPerJob] the minimum supported priority per job - * for this account. - * @member {array} [computePolicies] the list of compute policies to create in - * this account. + * @member {uuid} objectId The AAD object identifier for the entity to create a + * policy for. + * @member {string} objectType The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the min + * priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this user + * can use to submit jobs. This property, the max degree of parallelism per job + * property, or both must be passed. */ -export interface DataLakeAnalyticsAccount extends Resource { - readonly provisioningState?: string; - readonly state?: string; - readonly creationTime?: Date; - readonly lastModifiedTime?: Date; - readonly endpoint?: string; - readonly accountId?: string; - defaultDataLakeStoreAccount: string; - maxDegreeOfParallelism?: number; - queryStoreRetention?: number; - maxJobCount?: number; - readonly systemMaxDegreeOfParallelism?: number; - readonly systemMaxJobCount?: number; - dataLakeStoreAccounts: DataLakeStoreAccountInfo[]; - storageAccounts?: StorageAccountInfo[]; - newTier?: string; - readonly currentTier?: string; - firewallState?: string; - firewallAllowAzureIps?: string; - firewallRules?: FirewallRule[]; +export interface CreateOrUpdateComputePolicyParameters { + objectId: string; + objectType: string; maxDegreeOfParallelismPerJob?: number; minPriorityPerJob?: number; - computePolicies?: ComputePolicyAccountCreateParameters[]; +} + +/** + * @class + * Initializes a new instance of the UpdateComputePolicyParameters class. + * @constructor + * The parameters used to update a compute policy. + * + * @member {uuid} [objectId] The AAD object identifier for the entity to create + * a policy for. + * @member {string} [objectType] The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the min + * priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this user + * can use to submit jobs. This property, the max degree of parallelism per job + * property, or both must be passed. + */ +export interface UpdateComputePolicyParameters { + objectId?: string; + objectType?: string; + maxDegreeOfParallelismPerJob?: number; + minPriorityPerJob?: number; +} + +/** + * @class + * Initializes a new instance of the CreateOrUpdateFirewallRuleParameters class. + * @constructor + * The parameters used to create a new firewall rule. + * + * @member {string} startIpAddress The start IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} endIpAddress The end IP address for the firewall rule. This + * can be either ipv4 or ipv6. Start and End should be in the same protocol. + */ +export interface CreateOrUpdateFirewallRuleParameters { + startIpAddress: string; + endIpAddress: string; } /** * @class * Initializes a new instance of the UpdateFirewallRuleParameters class. * @constructor - * Data Lake Analytics firewall rule update parameters + * The parameters used to update a firewall rule. * - * @member {string} [startIpAddress] the start IP address for the firewall + * @member {string} [startIpAddress] The start IP address for the firewall * rule. This can be either ipv4 or ipv6. Start and End should be in the same * protocol. - * @member {string} [endIpAddress] the end IP address for the firewall rule. + * @member {string} [endIpAddress] The end IP address for the firewall rule. * This can be either ipv4 or ipv6. Start and End should be in the same * protocol. */ @@ -475,89 +760,102 @@ export interface UpdateFirewallRuleParameters { endIpAddress?: string; } +/** + * @class + * Initializes a new instance of the CheckNameAvailabilityParameters class. + * @constructor + * Data Lake Analytics account name availability check parameters. + * + * @member {string} name The Data Lake Analytics name to check availability + * for. + */ +export interface CheckNameAvailabilityParameters { + name: string; +} + /** * @class - * Initializes a new instance of the ComputePolicyListResult class. + * Initializes a new instance of the DataLakeAnalyticsAccountListResult class. * @constructor - * The list of compute policies in the account. + * Data Lake Analytics account list information. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface ComputePolicyListResult extends Array { +export interface DataLakeAnalyticsAccountListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsFirewallRuleListResult class. + * Initializes a new instance of the DataLakeStoreAccountInformationListResult class. * @constructor - * Data Lake Analytics firewall rule list information. + * Data Lake Store account list information. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface DataLakeAnalyticsFirewallRuleListResult extends Array { +export interface DataLakeStoreAccountInformationListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the ListStorageContainersResult class. + * Initializes a new instance of the StorageAccountInformationListResult class. * @constructor - * The list of blob containers associated with the storage account attached to - * the Data Lake Analytics account. + * Azure Storage account list information. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface ListStorageContainersResult extends Array { +export interface StorageAccountInformationListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the ListSasTokensResult class. + * Initializes a new instance of the StorageContainerListResult class. * @constructor - * The SAS response that contains the storage account, container and associated - * SAS token for connection use. + * The list of blob containers associated with the storage account attached to + * the Data Lake Analytics account. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface ListSasTokensResult extends Array { +export interface StorageContainerListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountListStorageAccountsResult class. + * Initializes a new instance of the SasTokenInformationListResult class. * @constructor - * Azure Storage Account list information. + * The SAS response that contains the storage account, container and associated + * SAS token for connection use. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface DataLakeAnalyticsAccountListStorageAccountsResult extends Array { +export interface SasTokenInformationListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountListDataLakeStoreResult class. + * Initializes a new instance of the ComputePolicyListResult class. * @constructor - * Data Lake Account list information. + * The list of compute policies in the account. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface DataLakeAnalyticsAccountListDataLakeStoreResult extends Array { +export interface ComputePolicyListResult extends Array { readonly nextLink?: string; } /** * @class - * Initializes a new instance of the DataLakeAnalyticsAccountListResult class. + * Initializes a new instance of the FirewallRuleListResult class. * @constructor - * DataLakeAnalytics Account list information. + * Data Lake Analytics firewall rule list information. * - * @member {string} [nextLink] the link (url) to the next page of results. + * @member {string} [nextLink] The link (url) to the next page of results. */ -export interface DataLakeAnalyticsAccountListResult extends Array { +export interface FirewallRuleListResult extends Array { readonly nextLink?: string; } diff --git a/lib/services/dataLake.Analytics/lib/account/models/index.js b/lib/services/dataLake.Analytics/lib/account/models/index.js index 95b8890042..c544bf52ef 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/index.js +++ b/lib/services/dataLake.Analytics/lib/account/models/index.js @@ -18,29 +18,43 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.Resource = require('./resource'); exports.SubResource = require('./subResource'); -exports.StorageAccountInfo = require('./storageAccountInfo'); -exports.StorageContainer = require('./storageContainer'); -exports.SasTokenInfo = require('./sasTokenInfo'); -exports.DataLakeStoreAccountInfo = require('./dataLakeStoreAccountInfo'); -exports.OptionalSubResource = require('./optionalSubResource'); -exports.FirewallRule = require('./firewallRule'); -exports.ComputePolicyAccountCreateParameters = require('./computePolicyAccountCreateParameters'); +exports.DataLakeStoreAccountInformation = require('./dataLakeStoreAccountInformation'); +exports.StorageAccountInformation = require('./storageAccountInformation'); exports.ComputePolicy = require('./computePolicy'); +exports.FirewallRule = require('./firewallRule'); +exports.DataLakeAnalyticsAccount = require('./dataLakeAnalyticsAccount'); +exports.DataLakeAnalyticsAccountBasic = require('./dataLakeAnalyticsAccountBasic'); +exports.StorageContainer = require('./storageContainer'); +exports.SasTokenInformation = require('./sasTokenInformation'); +exports.OperationDisplay = require('./operationDisplay'); +exports.Operation = require('./operation'); +exports.OperationListResult = require('./operationListResult'); +exports.CapabilityInformation = require('./capabilityInformation'); +exports.NameAvailabilityInformation = require('./nameAvailabilityInformation'); +exports.AddDataLakeStoreWithAccountParameters = require('./addDataLakeStoreWithAccountParameters'); +exports.AddStorageAccountWithAccountParameters = require('./addStorageAccountWithAccountParameters'); +exports.CreateComputePolicyWithAccountParameters = require('./createComputePolicyWithAccountParameters'); +exports.CreateFirewallRuleWithAccountParameters = require('./createFirewallRuleWithAccountParameters'); +exports.CreateDataLakeAnalyticsAccountParameters = require('./createDataLakeAnalyticsAccountParameters'); +exports.UpdateDataLakeStoreWithAccountParameters = require('./updateDataLakeStoreWithAccountParameters'); +exports.UpdateStorageAccountWithAccountParameters = require('./updateStorageAccountWithAccountParameters'); +exports.UpdateComputePolicyWithAccountParameters = require('./updateComputePolicyWithAccountParameters'); +exports.UpdateFirewallRuleWithAccountParameters = require('./updateFirewallRuleWithAccountParameters'); +exports.UpdateDataLakeAnalyticsAccountParameters = require('./updateDataLakeAnalyticsAccountParameters'); exports.AddDataLakeStoreParameters = require('./addDataLakeStoreParameters'); exports.AddStorageAccountParameters = require('./addStorageAccountParameters'); exports.UpdateStorageAccountParameters = require('./updateStorageAccountParameters'); -exports.ComputePolicyCreateOrUpdateParameters = require('./computePolicyCreateOrUpdateParameters'); -exports.DataLakeAnalyticsAccountUpdateParameters = require('./dataLakeAnalyticsAccountUpdateParameters'); -exports.DataLakeAnalyticsAccountPropertiesBasic = require('./dataLakeAnalyticsAccountPropertiesBasic'); -exports.Resource = require('./resource'); -exports.DataLakeAnalyticsAccountBasic = require('./dataLakeAnalyticsAccountBasic'); -exports.DataLakeAnalyticsAccount = require('./dataLakeAnalyticsAccount'); +exports.CreateOrUpdateComputePolicyParameters = require('./createOrUpdateComputePolicyParameters'); +exports.UpdateComputePolicyParameters = require('./updateComputePolicyParameters'); +exports.CreateOrUpdateFirewallRuleParameters = require('./createOrUpdateFirewallRuleParameters'); exports.UpdateFirewallRuleParameters = require('./updateFirewallRuleParameters'); -exports.ComputePolicyListResult = require('./computePolicyListResult'); -exports.DataLakeAnalyticsFirewallRuleListResult = require('./dataLakeAnalyticsFirewallRuleListResult'); -exports.ListStorageContainersResult = require('./listStorageContainersResult'); -exports.ListSasTokensResult = require('./listSasTokensResult'); -exports.DataLakeAnalyticsAccountListStorageAccountsResult = require('./dataLakeAnalyticsAccountListStorageAccountsResult'); -exports.DataLakeAnalyticsAccountListDataLakeStoreResult = require('./dataLakeAnalyticsAccountListDataLakeStoreResult'); +exports.CheckNameAvailabilityParameters = require('./checkNameAvailabilityParameters'); exports.DataLakeAnalyticsAccountListResult = require('./dataLakeAnalyticsAccountListResult'); +exports.DataLakeStoreAccountInformationListResult = require('./dataLakeStoreAccountInformationListResult'); +exports.StorageAccountInformationListResult = require('./storageAccountInformationListResult'); +exports.StorageContainerListResult = require('./storageContainerListResult'); +exports.SasTokenInformationListResult = require('./sasTokenInformationListResult'); +exports.ComputePolicyListResult = require('./computePolicyListResult'); +exports.FirewallRuleListResult = require('./firewallRuleListResult'); diff --git a/lib/services/dataLake.Analytics/lib/account/models/nameAvailabilityInformation.js b/lib/services/dataLake.Analytics/lib/account/models/nameAvailabilityInformation.js new file mode 100644 index 0000000000..57b31def7b --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/nameAvailabilityInformation.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'; + +/** + * Data Lake Analytics account name availability result information. + * + */ +class NameAvailabilityInformation { + /** + * Create a NameAvailabilityInformation. + * @member {boolean} [nameAvailable] The Boolean value of true or false to + * indicate whether the Data Lake Analytics account name is available or not. + * @member {string} [reason] The reason why the Data Lake Analytics account + * name is not available, if nameAvailable is false. + * @member {string} [message] The message describing why the Data Lake + * Analytics account name is not available, if nameAvailable is false. + */ + constructor() { + } + + /** + * Defines the metadata of NameAvailabilityInformation + * + * @returns {object} metadata of NameAvailabilityInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'NameAvailabilityInformation', + type: { + name: 'Composite', + className: 'NameAvailabilityInformation', + modelProperties: { + nameAvailable: { + required: false, + readOnly: true, + serializedName: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + readOnly: true, + serializedName: 'reason', + type: { + name: 'String' + } + }, + message: { + required: false, + readOnly: true, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NameAvailabilityInformation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/operation.js b/lib/services/dataLake.Analytics/lib/account/models/operation.js new file mode 100644 index 0000000000..8a14be17c6 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/operation.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'; + +/** + * An available operation for Data Lake Analytics. + * + */ +class Operation { + /** + * Create a Operation. + * @member {string} [name] The name of the operation. + * @member {object} [display] The display information for the operation. + * @member {string} [display.provider] The resource provider of the + * operation. + * @member {string} [display.resource] The resource type of the operation. + * @member {string} [display.operation] A friendly name of the operation. + * @member {string} [display.description] A friendly description of the + * operation. + * @member {string} [origin] The intended executor of the operation. Possible + * values include: 'user', 'system', 'user,system' + */ + constructor() { + } + + /** + * Defines the metadata of Operation + * + * @returns {object} metadata of Operation + * + */ + mapper() { + return { + required: false, + serializedName: 'Operation', + type: { + name: 'Composite', + className: 'Operation', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + readOnly: true, + serializedName: 'display', + type: { + name: 'Composite', + className: 'OperationDisplay' + } + }, + origin: { + required: false, + readOnly: true, + serializedName: 'origin', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Operation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/operationDisplay.js b/lib/services/dataLake.Analytics/lib/account/models/operationDisplay.js new file mode 100644 index 0000000000..2a91978e71 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/operationDisplay.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'; + +/** + * The display information for a particular operation. + * + */ +class OperationDisplay { + /** + * Create a OperationDisplay. + * @member {string} [provider] The resource provider of the operation. + * @member {string} [resource] The resource type of the operation. + * @member {string} [operation] A friendly name of the operation. + * @member {string} [description] A friendly description of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of OperationDisplay + * + * @returns {object} metadata of OperationDisplay + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationDisplay', + type: { + name: 'Composite', + className: 'OperationDisplay', + modelProperties: { + provider: { + required: false, + readOnly: true, + serializedName: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + readOnly: true, + serializedName: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + readOnly: true, + serializedName: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + readOnly: true, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationDisplay; diff --git a/lib/services/dataLake.Analytics/lib/account/models/operationListResult.js b/lib/services/dataLake.Analytics/lib/account/models/operationListResult.js new file mode 100644 index 0000000000..b5d96f76ff --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/operationListResult.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'; + +/** + * The list of available operations for Data Lake Analytics. + * + */ +class OperationListResult { + /** + * Create a OperationListResult. + * @member {array} [value] The results of the list operation. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + } + + /** + * Defines the metadata of OperationListResult + * + * @returns {object} metadata of OperationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationListResult', + type: { + name: 'Composite', + className: 'OperationListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationElementType', + type: { + name: 'Composite', + className: 'Operation' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OperationListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/resource.js b/lib/services/dataLake.Analytics/lib/account/models/resource.js index 7c1448890e..ed5be5606b 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/resource.js +++ b/lib/services/dataLake.Analytics/lib/account/models/resource.js @@ -13,18 +13,18 @@ const models = require('./index'); /** - * The Resource model definition. + * The resource model definition. * * @extends models['BaseResource'] */ class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Resource Id - * @member {string} [name] Resource name - * @member {string} [type] Resource type - * @member {string} location Resource location - * @member {object} [tags] Resource tags + * @member {string} [id] The resource identifer. + * @member {string} [name] The resource name. + * @member {string} [type] The resource type. + * @member {string} [location] The resource location. + * @member {object} [tags] The resource tags. */ constructor() { super(); @@ -69,7 +69,8 @@ class Resource extends models['BaseResource'] { } }, location: { - required: true, + required: false, + readOnly: true, serializedName: 'location', type: { name: 'String' @@ -77,6 +78,7 @@ class Resource extends models['BaseResource'] { }, tags: { required: false, + readOnly: true, serializedName: 'tags', type: { name: 'Dictionary', diff --git a/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformation.js b/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformation.js new file mode 100644 index 0000000000..f985d2b9d9 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformation.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * SAS token information. + * + */ +class SasTokenInformation { + /** + * Create a SasTokenInformation. + * @member {string} [accessToken] The access token for the associated Azure + * Storage Container. + */ + constructor() { + } + + /** + * Defines the metadata of SasTokenInformation + * + * @returns {object} metadata of SasTokenInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'SasTokenInformation', + type: { + name: 'Composite', + className: 'SasTokenInformation', + modelProperties: { + accessToken: { + required: false, + readOnly: true, + serializedName: 'accessToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SasTokenInformation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformationListResult.js b/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformationListResult.js new file mode 100644 index 0000000000..bd76144941 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/sasTokenInformationListResult.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'; + +/** + * The SAS response that contains the storage account, container and associated + * SAS token for connection use. + */ +class SasTokenInformationListResult extends Array { + /** + * Create a SasTokenInformationListResult. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SasTokenInformationListResult + * + * @returns {object} metadata of SasTokenInformationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'SasTokenInformationListResult', + type: { + name: 'Composite', + className: 'SasTokenInformationListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SasTokenInformationElementType', + type: { + name: 'Composite', + className: 'SasTokenInformation' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SasTokenInformationListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformation.js b/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformation.js new file mode 100644 index 0000000000..71ae4f19b5 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformation.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'); + +/** + * Azure Storage account information. + * + * @extends models['SubResource'] + */ +class StorageAccountInformation extends models['SubResource'] { + /** + * Create a StorageAccountInformation. + * @member {string} [suffix] The optional suffix for the storage account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StorageAccountInformation + * + * @returns {object} metadata of StorageAccountInformation + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageAccountInformation', + type: { + name: 'Composite', + className: 'StorageAccountInformation', + modelProperties: { + id: { + required: false, + readOnly: true, + 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' + } + }, + suffix: { + required: false, + readOnly: true, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = StorageAccountInformation; diff --git a/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformationListResult.js b/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformationListResult.js new file mode 100644 index 0000000000..0c6556730d --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/storageAccountInformationListResult.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'; + +/** + * Azure Storage account list information. + */ +class StorageAccountInformationListResult extends Array { + /** + * Create a StorageAccountInformationListResult. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StorageAccountInformationListResult + * + * @returns {object} metadata of StorageAccountInformationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageAccountInformationListResult', + type: { + name: 'Composite', + className: 'StorageAccountInformationListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StorageAccountInformationElementType', + type: { + name: 'Composite', + className: 'StorageAccountInformation' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = StorageAccountInformationListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/storageContainer.js b/lib/services/dataLake.Analytics/lib/account/models/storageContainer.js index 7f50f4a763..75fc9b45d7 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/storageContainer.js +++ b/lib/services/dataLake.Analytics/lib/account/models/storageContainer.js @@ -10,20 +10,21 @@ 'use strict'; +const models = require('./index'); + /** * Azure Storage blob container information. * + * @extends models['SubResource'] */ -class StorageContainer { +class StorageContainer extends models['SubResource'] { /** * Create a StorageContainer. - * @member {string} [id] the unique identifier of the blob container. - * @member {string} [name] the name of the blob container. - * @member {string} [type] the type of the blob container. - * @member {date} [lastModifiedTime] the last modified time of the blob + * @member {date} [lastModifiedTime] The last modified time of the blob * container. */ constructor() { + super(); } /** diff --git a/lib/services/dataLake.Analytics/lib/account/models/storageContainerListResult.js b/lib/services/dataLake.Analytics/lib/account/models/storageContainerListResult.js new file mode 100644 index 0000000000..135310f421 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/storageContainerListResult.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'; + +/** + * The list of blob containers associated with the storage account attached to + * the Data Lake Analytics account. + */ +class StorageContainerListResult extends Array { + /** + * Create a StorageContainerListResult. + * @member {string} [nextLink] The link (url) to the next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StorageContainerListResult + * + * @returns {object} metadata of StorageContainerListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageContainerListResult', + type: { + name: 'Composite', + className: 'StorageContainerListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StorageContainerElementType', + type: { + name: 'Composite', + className: 'StorageContainer' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = StorageContainerListResult; diff --git a/lib/services/dataLake.Analytics/lib/account/models/subResource.js b/lib/services/dataLake.Analytics/lib/account/models/subResource.js index f5e9c0557b..4976b3677a 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/subResource.js +++ b/lib/services/dataLake.Analytics/lib/account/models/subResource.js @@ -10,18 +10,22 @@ 'use strict'; +const models = require('./index'); + /** - * The Sub Resource model definition. + * The resource model definition for a nested resource. * + * @extends models['BaseResource'] */ -class SubResource { +class SubResource extends models['BaseResource'] { /** * Create a SubResource. - * @member {string} [id] Resource Id - * @member {string} name Resource name - * @member {string} [type] Resource type + * @member {string} [id] The resource identifier. + * @member {string} [name] The resource name. + * @member {string} [type] The resource type. */ constructor() { + super(); } /** @@ -47,7 +51,8 @@ class SubResource { } }, name: { - required: true, + required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyParameters.js new file mode 100644 index 0000000000..9f083e9906 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyParameters.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'; + +/** + * The parameters used to update a compute policy. + * + */ +class UpdateComputePolicyParameters { + /** + * Create a UpdateComputePolicyParameters. + * @member {uuid} [objectId] The AAD object identifier for the entity to + * create a policy for. + * @member {string} [objectType] The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this + * user can use to submit jobs. This property, the max degree of parallelism + * per job property, or both must be passed. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateComputePolicyParameters + * + * @returns {object} metadata of UpdateComputePolicyParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateComputePolicyParameters', + type: { + name: 'Composite', + className: 'UpdateComputePolicyParameters', + modelProperties: { + objectId: { + required: false, + serializedName: 'properties.objectId', + type: { + name: 'String' + } + }, + objectType: { + required: false, + serializedName: 'properties.objectType', + type: { + name: 'String' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = UpdateComputePolicyParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyWithAccountParameters.js new file mode 100644 index 0000000000..a149031a02 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateComputePolicyWithAccountParameters.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'; + +/** + * The parameters used to update a compute policy while updating a Data Lake + * Analytics account. + * + */ +class UpdateComputePolicyWithAccountParameters { + /** + * Create a UpdateComputePolicyWithAccountParameters. + * @member {string} name The unique name of the compute policy to update. + * @member {uuid} [objectId] The AAD object identifier for the entity to + * create a policy for. + * @member {string} [objectType] The type of AAD object the object identifier + * refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + * @member {number} [maxDegreeOfParallelismPerJob] The maximum degree of + * parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * @member {number} [minPriorityPerJob] The minimum priority per job this + * user can use to submit jobs. This property, the max degree of parallelism + * per job property, or both must be passed. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateComputePolicyWithAccountParameters + * + * @returns {object} metadata of UpdateComputePolicyWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateComputePolicyWithAccountParameters', + type: { + name: 'Composite', + className: 'UpdateComputePolicyWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + objectId: { + required: false, + serializedName: 'properties.objectId', + type: { + name: 'String' + } + }, + objectType: { + required: false, + serializedName: 'properties.objectType', + type: { + name: 'String' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = UpdateComputePolicyWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeAnalyticsAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeAnalyticsAccountParameters.js new file mode 100644 index 0000000000..d609e9e1ff --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeAnalyticsAccountParameters.js @@ -0,0 +1,227 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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 parameters that can be used to update an existing Data Lake Analytics + * account. + * + */ +class UpdateDataLakeAnalyticsAccountParameters { + /** + * Create a UpdateDataLakeAnalyticsAccountParameters. + * @member {object} [tags] The resource tags. + * @member {array} [dataLakeStoreAccounts] The list of Data Lake Store + * accounts associated with this account. + * @member {array} [storageAccounts] The list of Azure Blob storage accounts + * associated with this account. + * @member {array} [computePolicies] The list of compute policies associated + * with this account. + * @member {array} [firewallRules] The list of firewall rules associated with + * this account. + * @member {string} [firewallState] The current state of the IP address + * firewall for this account. Disabling the firewall does not remove existing + * rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * @member {string} [firewallAllowAzureIps] The current state of allowing or + * disallowing IPs originating within Azure through the firewall. If the + * firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * @member {string} [newTier] The commitment tier to use for next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', + * 'Commitment_5000AUHours', 'Commitment_10000AUHours', + * 'Commitment_50000AUHours', 'Commitment_100000AUHours', + * 'Commitment_500000AUHours' + * @member {number} [maxJobCount] The maximum supported jobs running under + * the account at the same time. + * @member {number} [maxDegreeOfParallelism] The maximum supported degree of + * parallelism for this account. + * @member {number} [maxDegreeOfParallelismPerJob] The maximum supported + * degree of parallelism per job for this account. + * @member {number} [minPriorityPerJob] The minimum supported priority per + * job for this account. + * @member {number} [queryStoreRetention] The number of days that job + * metadata is retained. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateDataLakeAnalyticsAccountParameters + * + * @returns {object} metadata of UpdateDataLakeAnalyticsAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateDataLakeAnalyticsAccountParameters', + type: { + name: 'Composite', + className: 'UpdateDataLakeAnalyticsAccountParameters', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + dataLakeStoreAccounts: { + required: false, + serializedName: 'properties.dataLakeStoreAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateDataLakeStoreWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'UpdateDataLakeStoreWithAccountParameters' + } + } + } + }, + storageAccounts: { + required: false, + serializedName: 'properties.storageAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateStorageAccountWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'UpdateStorageAccountWithAccountParameters' + } + } + } + }, + computePolicies: { + required: false, + serializedName: 'properties.computePolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateComputePolicyWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'UpdateComputePolicyWithAccountParameters' + } + } + } + }, + firewallRules: { + required: false, + serializedName: 'properties.firewallRules', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpdateFirewallRuleWithAccountParametersElementType', + type: { + name: 'Composite', + className: 'UpdateFirewallRuleWithAccountParameters' + } + } + } + }, + firewallState: { + required: false, + serializedName: 'properties.firewallState', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, + firewallAllowAzureIps: { + required: false, + serializedName: 'properties.firewallAllowAzureIps', + type: { + name: 'Enum', + allowedValues: [ 'Enabled', 'Disabled' ] + } + }, + newTier: { + required: false, + serializedName: 'properties.newTier', + type: { + name: 'Enum', + allowedValues: [ 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' ] + } + }, + maxJobCount: { + required: false, + serializedName: 'properties.maxJobCount', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + maxDegreeOfParallelism: { + required: false, + serializedName: 'properties.maxDegreeOfParallelism', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + maxDegreeOfParallelismPerJob: { + required: false, + serializedName: 'properties.maxDegreeOfParallelismPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + minPriorityPerJob: { + required: false, + serializedName: 'properties.minPriorityPerJob', + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + queryStoreRetention: { + required: false, + serializedName: 'properties.queryStoreRetention', + constraints: { + InclusiveMaximum: 180, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = UpdateDataLakeAnalyticsAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeStoreWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeStoreWithAccountParameters.js new file mode 100644 index 0000000000..429eacbddb --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateDataLakeStoreWithAccountParameters.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'; + +/** + * The parameters used to update a Data Lake Store account while updating a + * Data Lake Analytics account. + * + */ +class UpdateDataLakeStoreWithAccountParameters { + /** + * Create a UpdateDataLakeStoreWithAccountParameters. + * @member {string} name The unique name of the Data Lake Store account to + * update. + * @member {string} [suffix] The optional suffix for the Data Lake Store + * account. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateDataLakeStoreWithAccountParameters + * + * @returns {object} metadata of UpdateDataLakeStoreWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateDataLakeStoreWithAccountParameters', + type: { + name: 'Composite', + className: 'UpdateDataLakeStoreWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + suffix: { + required: false, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpdateDataLakeStoreWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleParameters.js index 5d3aa00b18..efee0938d1 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleParameters.js +++ b/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleParameters.js @@ -11,16 +11,16 @@ 'use strict'; /** - * Data Lake Analytics firewall rule update parameters + * The parameters used to update a firewall rule. * */ class UpdateFirewallRuleParameters { /** * Create a UpdateFirewallRuleParameters. - * @member {string} [startIpAddress] the start IP address for the firewall + * @member {string} [startIpAddress] The start IP address for the firewall * rule. This can be either ipv4 or ipv6. Start and End should be in the same * protocol. - * @member {string} [endIpAddress] the end IP address for the firewall rule. + * @member {string} [endIpAddress] The end IP address for the firewall rule. * This can be either ipv4 or ipv6. Start and End should be in the same * protocol. */ diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleWithAccountParameters.js new file mode 100644 index 0000000000..1d14b5b595 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateFirewallRuleWithAccountParameters.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'; + +/** + * The parameters used to update a firewall rule while updating a Data Lake + * Analytics account. + * + */ +class UpdateFirewallRuleWithAccountParameters { + /** + * Create a UpdateFirewallRuleWithAccountParameters. + * @member {string} name The unique name of the firewall rule to update. + * @member {string} [startIpAddress] The start IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * @member {string} [endIpAddress] The end IP address for the firewall rule. + * This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateFirewallRuleWithAccountParameters + * + * @returns {object} metadata of UpdateFirewallRuleWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateFirewallRuleWithAccountParameters', + type: { + name: 'Composite', + className: 'UpdateFirewallRuleWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + startIpAddress: { + required: false, + serializedName: 'properties.startIpAddress', + type: { + name: 'String' + } + }, + endIpAddress: { + required: false, + serializedName: 'properties.endIpAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpdateFirewallRuleWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountParameters.js index 7b9b99a640..14f3816aab 100644 --- a/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountParameters.js +++ b/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountParameters.js @@ -11,16 +11,15 @@ 'use strict'; /** - * Storage account parameters for a storage account being updated in a Data - * Lake Analytics account. + * The parameters used to update an Azure Storage account. * */ class UpdateStorageAccountParameters { /** * Create a UpdateStorageAccountParameters. - * @member {string} [accessKey] the updated access key associated with this + * @member {string} [accessKey] The updated access key associated with this * Azure Storage account that will be used to connect to it. - * @member {string} [suffix] the optional suffix for the storage account. + * @member {string} [suffix] The optional suffix for the storage account. */ constructor() { } diff --git a/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountWithAccountParameters.js b/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountWithAccountParameters.js new file mode 100644 index 0000000000..a261ef2248 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/models/updateStorageAccountWithAccountParameters.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'; + +/** + * The parameters used to update an Azure Storage account while updating a Data + * Lake Analytics account. + * + */ +class UpdateStorageAccountWithAccountParameters { + /** + * Create a UpdateStorageAccountWithAccountParameters. + * @member {string} name The unique name of the Azure Storage account to + * update. + * @member {string} [accessKey] The updated access key associated with this + * Azure Storage account that will be used to connect to it. + * @member {string} [suffix] The optional suffix for the storage account. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateStorageAccountWithAccountParameters + * + * @returns {object} metadata of UpdateStorageAccountWithAccountParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'UpdateStorageAccountWithAccountParameters', + type: { + name: 'Composite', + className: 'UpdateStorageAccountWithAccountParameters', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + accessKey: { + required: false, + serializedName: 'properties.accessKey', + type: { + name: 'String' + } + }, + suffix: { + required: false, + serializedName: 'properties.suffix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpdateStorageAccountWithAccountParameters; diff --git a/lib/services/dataLake.Analytics/lib/account/operations/accounts.js b/lib/services/dataLake.Analytics/lib/account/operations/accounts.js new file mode 100644 index 0000000000..ff7e1e227c --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/operations/accounts.js @@ -0,0 +1,3497 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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; + +/** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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 DataLakeAnalyticsAccountListResult} 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 filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let select = (options && options.select !== undefined) ? options.select : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + let count = (options && options.count !== undefined) ? options.count : undefined; + // 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (top !== null && top !== undefined) { + if (top < 1) + { + throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (skip !== null && skip !== undefined) { + if (skip < 1) + { + throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { + throw new Error('select must be of type string.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); + } + if (count !== null && count !== undefined && typeof count !== 'boolean') { + throw new Error('count must be of type boolean.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + } + if (select !== null && select !== undefined) { + queryParameters.push('$select=' + encodeURIComponent(select)); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + if (count !== null && count !== undefined) { + queryParameters.push('$count=' + encodeURIComponent(count.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['DataLakeAnalyticsAccountListResult']().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); + }); +} + +/** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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 DataLakeAnalyticsAccountListResult} 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 filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let select = (options && options.select !== undefined) ? options.select : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + let count = (options && options.count !== undefined) ? options.count : undefined; + // 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 (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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (top !== null && top !== undefined) { + if (top < 1) + { + throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (skip !== null && skip !== undefined) { + if (skip < 1) + { + throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { + throw new Error('select must be of type string.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); + } + if (count !== null && count !== undefined && typeof count !== 'boolean') { + throw new Error('count must be of type boolean.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + } + if (select !== null && select !== undefined) { + queryParameters.push('$select=' + encodeURIComponent(select)); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + if (count !== null && count !== undefined) { + queryParameters.push('$count=' + encodeURIComponent(count.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['DataLakeAnalyticsAccountListResult']().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); + }); +} + + +/** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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 DataLakeAnalyticsAccount} 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 _create(resourceGroupName, accountName, parameters, 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.beginCreate(resourceGroupName, accountName, parameters, 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['DataLakeAnalyticsAccount']().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); + }); + }); +} + +/** + * Gets details of the specified Data Lake Analytics account. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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 DataLakeAnalyticsAccount} 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, accountName, 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 (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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts/{accountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['DataLakeAnalyticsAccount']().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); + }); +} + + +/** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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 DataLakeAnalyticsAccount} 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, accountName, 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.beginUpdate(resourceGroupName, accountName, 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['DataLakeAnalyticsAccount']().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); + }); + }); +} + + +/** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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, accountName, 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, accountName, 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); + }); + }); +} + +/** + * Checks whether the specified account name is available or taken. + * + * @param {string} location The resource location without whitespace. + * + * @param {object} parameters Parameters supplied to check the Data Lake + * Analytics account name availability. + * + * @param {string} parameters.name The Data Lake Analytics name to check + * availability for. + * + * @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 NameAvailabilityInformation} 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 _checkNameAvailability(location, parameters, 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.'); + } + if (parameters === null || parameters === undefined) + { + parameters = {}; + } + // 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 (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/locations/{location}/checkNameAvailability'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['CheckNameAvailabilityParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, 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['NameAvailabilityInformation']().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); + }); +} + +/** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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 DataLakeAnalyticsAccount} 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 _beginCreate(resourceGroupName, accountName, parameters, 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 (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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts/{accountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['CreateDataLakeAnalyticsAccountParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, 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['DataLakeAnalyticsAccount']().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['DataLakeAnalyticsAccount']().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); + }); +} + +/** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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 DataLakeAnalyticsAccount} 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 _beginUpdate(resourceGroupName, accountName, 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 parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; + // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts/{accountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['UpdateDataLakeAnalyticsAccountParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, 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 && 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['DataLakeAnalyticsAccount']().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['DataLakeAnalyticsAccount']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DataLakeAnalyticsAccount']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError2.request = msRest.stripRequest(httpRequest); + deserializationError2.response = msRest.stripResponse(response); + return callback(deserializationError2); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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 _beginDeleteMethod(resourceGroupName, accountName, 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 (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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts/{accountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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 !== 202 && 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); + }); +} + +/** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @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 DataLakeAnalyticsAccountListResult} 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['DataLakeAnalyticsAccountListResult']().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); + }); +} + +/** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @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 DataLakeAnalyticsAccountListResult} 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['DataLakeAnalyticsAccountListResult']().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 Accounts. */ +class Accounts { + /** + * Create a Accounts. + * @param {DataLakeAnalyticsAccountManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._create = _create; + this._get = _get; + this._update = _update; + this._deleteMethod = _deleteMethod; + this._checkNameAvailability = _checkNameAvailability; + this._beginCreate = _beginCreate; + this._beginUpdate = _beginUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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; + }); + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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 {DataLakeAnalyticsAccountListResult} - 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 DataLakeAnalyticsAccountListResult} 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); + } + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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; + }); + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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 {DataLakeAnalyticsAccountListResult} - 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 DataLakeAnalyticsAccountListResult} 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); + } + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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. + */ + createWithHttpOperationResponse(resourceGroupName, accountName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(resourceGroupName, accountName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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 {DataLakeAnalyticsAccount} - 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 DataLakeAnalyticsAccount} 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. + */ + create(resourceGroupName, accountName, parameters, 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._create(resourceGroupName, accountName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(resourceGroupName, accountName, parameters, options, optionalCallback); + } + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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 {DataLakeAnalyticsAccount} - 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 DataLakeAnalyticsAccount} 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, accountName, 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, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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 {DataLakeAnalyticsAccount} - 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 DataLakeAnalyticsAccount} 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, accountName, 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, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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, accountName, 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, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param {string} location The resource location without whitespace. + * + * @param {object} parameters Parameters supplied to check the Data Lake + * Analytics account name availability. + * + * @param {string} parameters.name The Data Lake Analytics name to check + * availability for. + * + * @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. + */ + checkNameAvailabilityWithHttpOperationResponse(location, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._checkNameAvailability(location, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Checks whether the specified account name is available or taken. + * + * @param {string} location The resource location without whitespace. + * + * @param {object} parameters Parameters supplied to check the Data Lake + * Analytics account name availability. + * + * @param {string} parameters.name The Data Lake Analytics name to check + * availability for. + * + * @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 {NameAvailabilityInformation} - 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 NameAvailabilityInformation} 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. + */ + checkNameAvailability(location, parameters, 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._checkNameAvailability(location, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._checkNameAvailability(location, parameters, options, optionalCallback); + } + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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. + */ + beginCreateWithHttpOperationResponse(resourceGroupName, accountName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreate(resourceGroupName, accountName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. + * + * @param {string} parameters.location The resource location. + * + * @param {object} [parameters.tags] The resource tags. + * + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. + * + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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 {DataLakeAnalyticsAccount} - 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 DataLakeAnalyticsAccount} 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. + */ + beginCreate(resourceGroupName, accountName, parameters, 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._beginCreate(resourceGroupName, accountName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreate(resourceGroupName, accountName, parameters, options, optionalCallback); + } + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * + * @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 {DataLakeAnalyticsAccount} - 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 DataLakeAnalyticsAccount} 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. + */ + beginUpdate(resourceGroupName, accountName, 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._beginUpdate(resourceGroupName, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @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. + */ + beginDeleteMethod(resourceGroupName, accountName, 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, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @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; + }); + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. + * + * @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 {DataLakeAnalyticsAccountListResult} - 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 DataLakeAnalyticsAccountListResult} 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); + } + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @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; + }); + }); + } + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @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 {DataLakeAnalyticsAccountListResult} - 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 DataLakeAnalyticsAccountListResult} 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); + } + } + +} + +module.exports = Accounts; diff --git a/lib/services/dataLake.Analytics/lib/account/operations/computePolicies.js b/lib/services/dataLake.Analytics/lib/account/operations/computePolicies.js index 0e3b5016ce..99265a21a0 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/computePolicies.js +++ b/lib/services/dataLake.Analytics/lib/account/operations/computePolicies.js @@ -15,37 +15,12 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Creates or updates the specified compute policy. During update, the compute - * policy with the specified name will be replaced with this new compute - * policy. An account supports, at most, 50 policies - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the compute policy. - * - * @param {string} computePolicyName The name of the compute policy to create - * or update. - * - * @param {object} parameters Parameters supplied to create or update the - * compute policy. The max degree of parallelism per job property, min priority - * per job property, or both must be present. - * - * @param {uuid} parameters.objectId The AAD object identifier for the entity - * to create a policy for. - * - * @param {string} parameters.objectType The type of AAD object the object - * identifier refers to. Possible values include: 'User', 'Group', - * 'ServicePrincipal' + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree - * of parallelism per job this user can use to submit jobs. This property, the - * min priority per job property, or both must be passed. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [parameters.minPriorityPerJob] The minimum priority per job - * this user can use to submit jobs. This property, the max degree of - * parallelism per job property, or both must be passed. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -59,13 +34,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicy} for more information. + * See {@link ComputePolicyListResult} 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, accountName, computePolicyName, parameters, options, callback) { +function _listByAccount(resourceGroupName, accountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -77,24 +53,18 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para } // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } - if (computePolicyName === null || computePolicyName === undefined || typeof computePolicyName.valueOf() !== 'string') { - throw new Error('computePolicyName cannot be null or undefined and it must be of type string.'); - } - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -104,11 +74,10 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{computePolicyName}', encodeURIComponent(computePolicyName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -117,7 +86,7 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -135,21 +104,7 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['ComputePolicyCreateOrUpdateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -191,7 +146,7 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ComputePolicy']().mapper(); + let resultMapper = new client.models['ComputePolicyListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -207,26 +162,37 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para } /** - * Updates the specified compute policy. + * Creates or updates the specified compute policy. During update, the compute + * policy with the specified name will be replaced with this new compute + * policy. An account supports, at most, 50 policies * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to update. + * @param {string} computePolicyName The name of the compute policy to create + * or update. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to create or update the + * compute policy. The max degree of parallelism per job property, min priority + * per job property, or both must be present. * - * @param {object} [options.parameters] Parameters supplied to update the - * compute policy. + * @param {uuid} parameters.objectId The AAD object identifier for the entity + * to create a policy for. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The - * maximum degree of parallelism per job this user can use to submit jobs. + * @param {string} parameters.objectType The type of AAD object the object + * identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {number} [options.parameters.minPriorityPerJob] The minimum priority - * per job this user can use to submit jobs. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree + * of parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * + * @param {number} [parameters.minPriorityPerJob] The minimum priority per job + * this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -244,7 +210,7 @@ function _createOrUpdate(resourceGroupName, accountName, computePolicyName, para * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, accountName, computePolicyName, options, callback) { +function _createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -254,9 +220,11 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -266,12 +234,12 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal if (computePolicyName === null || computePolicyName === undefined || typeof computePolicyName.valueOf() !== 'string') { throw new Error('computePolicyName cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -282,10 +250,10 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{computePolicyName}', encodeURIComponent(computePolicyName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -294,7 +262,7 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -317,7 +285,7 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['ComputePolicy']().mapper(); + let requestModelMapper = new client.models['CreateOrUpdateComputePolicyParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -384,16 +352,14 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal } /** - * Deletes the specified compute policy from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to delete. + * @param {string} computePolicyName The name of the compute policy to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -406,13 +372,14 @@ function _update(resourceGroupName, accountName, computePolicyName, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicy} 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 _deleteMethod(resourceGroupName, accountName, computePolicyName, options, callback) { +function _get(resourceGroupName, accountName, computePolicyName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -424,6 +391,9 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -436,9 +406,6 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -449,10 +416,10 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{computePolicyName}', encodeURIComponent(computePolicyName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -461,7 +428,7 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -486,7 +453,7 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -514,25 +481,57 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option // 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['ComputePolicy']().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); }); } /** - * Gets the specified Data Lake Analytics compute policy. + * Updates the specified compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to - * retrieve. + * @param {string} computePolicyName The name of the compute policy to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * compute policy. + * + * @param {uuid} [options.parameters.objectId] The AAD object identifier for + * the entity to create a policy for. + * + * @param {string} [options.parameters.objectType] The type of AAD object the + * object identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum degree of parallelism per job this user can use to submit jobs. This + * property, the min priority per job property, or both must be passed. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum priority + * per job this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -549,7 +548,7 @@ function _deleteMethod(resourceGroupName, accountName, computePolicyName, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, accountName, computePolicyName, options, callback) { +function _update(resourceGroupName, accountName, computePolicyName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -559,8 +558,12 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } + let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -573,9 +576,6 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -586,10 +586,10 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{computePolicyName}', encodeURIComponent(computePolicyName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -598,7 +598,7 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -616,7 +616,21 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['UpdateComputePolicyParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -674,14 +688,14 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba } /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Deletes the specified compute policy from the specified Data Lake Analytics + * account * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policies. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} computePolicyName The name of the compute policy to delete. * * @param {object} [options] Optional Parameters. * @@ -694,15 +708,13 @@ function _get(resourceGroupName, accountName, computePolicyName, options, callba * * {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 ComputePolicyListResult} for more - * information. + * {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 _listByAccount(resourceGroupName, accountName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, computePolicyName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -714,18 +726,21 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { } // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } + if (computePolicyName === null || computePolicyName === undefined || typeof computePolicyName.valueOf() !== 'string') { + throw new Error('computePolicyName cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -735,10 +750,11 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{computePolicyName}', encodeURIComponent(computePolicyName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -747,7 +763,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -772,7 +788,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -800,23 +816,6 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // 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['ComputePolicyListResult']().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); }); @@ -959,46 +958,21 @@ class ComputePolicies { */ constructor(client) { this.client = client; + this._listByAccount = _listByAccount; this._createOrUpdate = _createOrUpdate; + this._get = _get; this._update = _update; this._deleteMethod = _deleteMethod; - this._get = _get; - this._listByAccount = _listByAccount; this._listByAccountNext = _listByAccountNext; } /** - * Creates or updates the specified compute policy. During update, the compute - * policy with the specified name will be replaced with this new compute - * policy. An account supports, at most, 50 policies - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the compute policy. - * - * @param {string} computePolicyName The name of the compute policy to create - * or update. - * - * @param {object} parameters Parameters supplied to create or update the - * compute policy. The max degree of parallelism per job property, min priority - * per job property, or both must be present. - * - * @param {uuid} parameters.objectId The AAD object identifier for the entity - * to create a policy for. - * - * @param {string} parameters.objectType The type of AAD object the object - * identifier refers to. Possible values include: 'User', 'Group', - * 'ServicePrincipal' + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree - * of parallelism per job this user can use to submit jobs. This property, the - * min priority per job property, or both must be passed. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [parameters.minPriorityPerJob] The minimum priority per job - * this user can use to submit jobs. This property, the max degree of - * parallelism per job property, or both must be passed. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -1007,15 +981,15 @@ class ComputePolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, parameters, options) { + listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1026,37 +1000,12 @@ class ComputePolicies { } /** - * Creates or updates the specified compute policy. During update, the compute - * policy with the specified name will be replaced with this new compute - * policy. An account supports, at most, 50 policies - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the compute policy. - * - * @param {string} computePolicyName The name of the compute policy to create - * or update. - * - * @param {object} parameters Parameters supplied to create or update the - * compute policy. The max degree of parallelism per job property, min priority - * per job property, or both must be present. - * - * @param {uuid} parameters.objectId The AAD object identifier for the entity - * to create a policy for. - * - * @param {string} parameters.objectType The type of AAD object the object - * identifier refers to. Possible values include: 'User', 'Group', - * 'ServicePrincipal' + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree - * of parallelism per job this user can use to submit jobs. This property, the - * min priority per job property, or both must be passed. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [parameters.minPriorityPerJob] The minimum priority per job - * this user can use to submit jobs. This property, the max degree of - * parallelism per job property, or both must be passed. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -1070,7 +1019,7 @@ class ComputePolicies { * * {Promise} A promise is returned * - * @resolve {ComputePolicy} - The deserialized result object. + * @resolve {ComputePolicyListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1079,13 +1028,14 @@ class ComputePolicies { * {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 ComputePolicy} for more information. + * See {@link ComputePolicyListResult} 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, accountName, computePolicyName, parameters, options, optionalCallback) { + listByAccount(resourceGroupName, accountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1094,38 +1044,49 @@ class ComputePolicies { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, optionalCallback); + return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); } } /** - * Updates the specified compute policy. + * Creates or updates the specified compute policy. During update, the compute + * policy with the specified name will be replaced with this new compute + * policy. An account supports, at most, 50 policies * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to update. + * @param {string} computePolicyName The name of the compute policy to create + * or update. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to create or update the + * compute policy. The max degree of parallelism per job property, min priority + * per job property, or both must be present. * - * @param {object} [options.parameters] Parameters supplied to update the - * compute policy. + * @param {uuid} parameters.objectId The AAD object identifier for the entity + * to create a policy for. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The - * maximum degree of parallelism per job this user can use to submit jobs. + * @param {string} parameters.objectType The type of AAD object the object + * identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {number} [options.parameters.minPriorityPerJob] The minimum priority - * per job this user can use to submit jobs. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree + * of parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * + * @param {number} [parameters.minPriorityPerJob] The minimum priority per job + * this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1136,11 +1097,11 @@ class ComputePolicies { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1151,26 +1112,37 @@ class ComputePolicies { } /** - * Updates the specified compute policy. + * Creates or updates the specified compute policy. During update, the compute + * policy with the specified name will be replaced with this new compute + * policy. An account supports, at most, 50 policies * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to update. + * @param {string} computePolicyName The name of the compute policy to create + * or update. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to create or update the + * compute policy. The max degree of parallelism per job property, min priority + * per job property, or both must be present. * - * @param {object} [options.parameters] Parameters supplied to update the - * compute policy. + * @param {uuid} parameters.objectId The AAD object identifier for the entity + * to create a policy for. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The - * maximum degree of parallelism per job this user can use to submit jobs. + * @param {string} parameters.objectType The type of AAD object the object + * identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {number} [options.parameters.minPriorityPerJob] The minimum priority - * per job this user can use to submit jobs. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree + * of parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * + * @param {number} [parameters.minPriorityPerJob] The minimum priority per job + * this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1197,7 +1169,7 @@ class ComputePolicies { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { + createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1206,28 +1178,26 @@ class ComputePolicies { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, accountName, computePolicyName, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, accountName, computePolicyName, parameters, options, optionalCallback); } } /** - * Deletes the specified compute policy from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to delete. + * @param {string} computePolicyName The name of the compute policy to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -1236,15 +1206,15 @@ class ComputePolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { + getWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1255,16 +1225,14 @@ class ComputePolicies { } /** - * Deletes the specified compute policy from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to delete. + * @param {string} computePolicyName The name of the compute policy to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -1278,7 +1246,7 @@ class ComputePolicies { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ComputePolicy} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1286,13 +1254,14 @@ class ComputePolicies { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicy} 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. */ - deleteMethod(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { + get(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1301,31 +1270,46 @@ class ComputePolicies { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, optionalCallback); + return self._get(resourceGroupName, accountName, computePolicyName, options, optionalCallback); } } /** - * Gets the specified Data Lake Analytics compute policy. + * Updates the specified compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to - * retrieve. + * @param {string} computePolicyName The name of the compute policy to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * compute policy. + * + * @param {uuid} [options.parameters.objectId] The AAD object identifier for + * the entity to create a policy for. + * + * @param {string} [options.parameters.objectType] The type of AAD object the + * object identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum degree of parallelism per job this user can use to submit jobs. This + * property, the min priority per job property, or both must be passed. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum priority + * per job this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1335,11 +1319,11 @@ class ComputePolicies { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { + updateWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1350,19 +1334,34 @@ class ComputePolicies { } /** - * Gets the specified Data Lake Analytics compute policy. + * Updates the specified compute policy. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to - * retrieve. + * @param {string} computePolicyName The name of the compute policy to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * compute policy. + * + * @param {uuid} [options.parameters.objectId] The AAD object identifier for + * the entity to create a policy for. + * + * @param {string} [options.parameters.objectType] The type of AAD object the + * object identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum degree of parallelism per job this user can use to submit jobs. This + * property, the min priority per job property, or both must be passed. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum priority + * per job this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1388,7 +1387,7 @@ class ComputePolicies { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { + update(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1397,26 +1396,26 @@ class ComputePolicies { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, accountName, computePolicyName, options, optionalCallback); + return self._update(resourceGroupName, accountName, computePolicyName, options, optionalCallback); } } /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Deletes the specified compute policy from the specified Data Lake Analytics + * account * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policies. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} computePolicyName The name of the compute policy to delete. * * @param {object} [options] Optional Parameters. * @@ -1425,15 +1424,15 @@ class ComputePolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, computePolicyName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1444,14 +1443,14 @@ class ComputePolicies { } /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Deletes the specified compute policy from the specified Data Lake Analytics + * account + * + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policies. + * @param {string} computePolicyName The name of the compute policy to delete. * * @param {object} [options] Optional Parameters. * @@ -1465,7 +1464,7 @@ class ComputePolicies { * * {Promise} A promise is returned * - * @resolve {ComputePolicyListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1473,15 +1472,13 @@ class ComputePolicies { * * {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 ComputePolicyListResult} for more - * information. + * {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. */ - listByAccount(resourceGroupName, accountName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, computePolicyName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1490,14 +1487,14 @@ class ComputePolicies { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, computePolicyName, options, optionalCallback); } } diff --git a/lib/services/dataLake.Analytics/lib/account/operations/dataLakeStoreAccounts.js b/lib/services/dataLake.Analytics/lib/account/operations/dataLakeStoreAccounts.js index 84ab809644..129ca29839 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/dataLakeStoreAccounts.js +++ b/lib/services/dataLake.Analytics/lib/account/operations/dataLakeStoreAccounts.js @@ -15,25 +15,35 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Updates the specified Data Lake Analytics account to include the additional - * Data Lake Store account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Data Lake Store account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to add. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The details of the Data Lake Store - * account. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} [options.parameters.suffix] the optional suffix for the Data - * Lake Store account. + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44,13 +54,15 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeStoreAccountInformationListResult} + * 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 _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, callback) { +function _listByAccount(resourceGroupName, accountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -60,24 +72,56 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let select = (options && options.select !== undefined) ? options.select : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + let count = (options && options.count !== undefined) ? options.count : undefined; // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } - if (dataLakeStoreAccountName === null || dataLakeStoreAccountName === undefined || typeof dataLakeStoreAccountName.valueOf() !== 'string') { - throw new Error('dataLakeStoreAccountName 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 (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (top !== null && top !== undefined) { + if (top < 1) + { + throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (skip !== null && skip !== undefined) { + if (skip < 1) + { + throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { + throw new Error('select must be of type string.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); + } + if (count !== null && count !== undefined && typeof count !== 'boolean') { + throw new Error('count must be of type boolean.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -87,12 +131,29 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{dataLakeStoreAccountName}', encodeURIComponent(dataLakeStoreAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + } + if (select !== null && select !== undefined) { + queryParameters.push('$select=' + encodeURIComponent(select)); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + if (count !== null && count !== undefined) { + queryParameters.push('$count=' + encodeURIComponent(count.toString())); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -100,7 +161,7 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -118,21 +179,7 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['AddDataLakeStoreParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -167,26 +214,47 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, // 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['DataLakeStoreAccountInformationListResult']().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); }); } /** - * Updates the Data Lake Analytics account specified to remove the specified + * Updates the specified Data Lake Analytics account to include the additional * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Data Lake Store account. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to remove + * account to add. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The details of the Data Lake Store + * account. + * + * @param {string} [options.parameters.suffix] The optional suffix for the Data + * Lake Store account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -202,7 +270,7 @@ function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, callback) { +function _add(resourceGroupName, accountName, dataLakeStoreAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,8 +280,12 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, if (!callback) { throw new Error('callback cannot be null.'); } + let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -226,9 +298,6 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -238,11 +307,11 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{dataLakeStoreAccountName}', encodeURIComponent(dataLakeStoreAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -251,7 +320,7 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -269,7 +338,21 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AddDataLakeStoreParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -313,11 +396,9 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, * Gets the specified Data Lake Store account details in the specified Data * Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve the Data Lake Store account details. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store * account to retrieve @@ -334,7 +415,7 @@ function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, * {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 DataLakeStoreAccountInfo} for more + * See {@link DataLakeStoreAccountInformation} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -353,6 +434,9 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -365,9 +449,6 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -377,11 +458,11 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{dataLakeStoreAccountName}', encodeURIComponent(dataLakeStoreAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -450,7 +531,7 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DataLakeStoreAccountInfo']().mapper(); + let resultMapper = new client.models['DataLakeStoreAccountInformation']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -466,37 +547,17 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, } /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Data Lake Store accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. + * Updates the Data Lake Analytics account specified to remove the specified + * Data Lake Store account. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to remove * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -507,16 +568,13 @@ function _get(resourceGroupName, accountName, dataLakeStoreAccountName, options, * * {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 - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * {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 _listByAccount(resourceGroupName, accountName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -526,56 +584,23 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let top = (options && options.top !== undefined) ? options.top : undefined; - let skip = (options && options.skip !== undefined) ? options.skip : undefined; - let select = (options && options.select !== undefined) ? options.select : undefined; - let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let count = (options && options.count !== undefined) ? options.count : undefined; // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName 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 (top !== null && top !== undefined && typeof top !== 'number') { - throw new Error('top must be of type number.'); - } - if (top !== null && top !== undefined) { - if (top < 1) - { - throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } - if (skip !== null && skip !== undefined) { - if (skip < 1) - { - throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { - throw new Error('select must be of type string.'); - } - if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { - throw new Error('orderby must be of type string.'); - } - if (count !== null && count !== undefined && typeof count !== 'boolean') { - throw new Error('count must be of type boolean.'); + if (dataLakeStoreAccountName === null || dataLakeStoreAccountName === undefined || typeof dataLakeStoreAccountName.valueOf() !== 'string') { + throw new Error('dataLakeStoreAccountName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -585,29 +610,12 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{dataLakeStoreAccountName}', encodeURIComponent(dataLakeStoreAccountName)); let queryParameters = []; - if (filter !== null && filter !== undefined) { - queryParameters.push('$filter=' + encodeURIComponent(filter)); - } - if (top !== null && top !== undefined) { - queryParameters.push('$top=' + encodeURIComponent(top.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); - } - if (select !== null && select !== undefined) { - queryParameters.push('$select=' + encodeURIComponent(select)); - } - if (orderby !== null && orderby !== undefined) { - queryParameters.push('$orderby=' + encodeURIComponent(orderby)); - } - if (count !== null && count !== undefined) { - queryParameters.push('$count=' + encodeURIComponent(count.toString())); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -615,7 +623,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -668,23 +676,6 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // 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['DataLakeAnalyticsAccountListDataLakeStoreResult']().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); }); @@ -710,9 +701,8 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * See {@link DataLakeStoreAccountInformationListResult} + * for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -806,7 +796,7 @@ function _listByAccountNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DataLakeAnalyticsAccountListDataLakeStoreResult']().mapper(); + let resultMapper = new client.models['DataLakeStoreAccountInformationListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -829,48 +819,58 @@ class DataLakeStoreAccounts { */ constructor(client) { this.client = client; + this._listByAccount = _listByAccount; this._add = _add; - this._deleteMethod = _deleteMethod; this._get = _get; - this._listByAccount = _listByAccount; + this._deleteMethod = _deleteMethod; this._listByAccountNext = _listByAccountNext; } /** - * Updates the specified Data Lake Analytics account to include the additional - * Data Lake Store account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Data Lake Store account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to add. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The details of the Data Lake Store - * account. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} [options.parameters.suffix] the optional suffix for the Data - * Lake Store account. + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - addWithHttpOperationResponse(resourceGroupName, accountName, dataLakeStoreAccountName, options) { + listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -881,25 +881,35 @@ class DataLakeStoreAccounts { } /** - * Updates the specified Data Lake Analytics account to include the additional - * Data Lake Store account. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Data Lake Store account. - * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to add. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The details of the Data Lake Store - * account. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} [options.parameters.suffix] the optional suffix for the Data - * Lake Store account. + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -911,7 +921,7 @@ class DataLakeStoreAccounts { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformationListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -919,13 +929,15 @@ class DataLakeStoreAccounts { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeStoreAccountInformationListResult} + * 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. */ - add(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback) { + listByAccount(resourceGroupName, accountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -934,32 +946,36 @@ class DataLakeStoreAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback); + return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); } } /** - * Updates the Data Lake Analytics account specified to remove the specified + * Updates the specified Data Lake Analytics account to include the additional * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Data Lake Store account. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to remove + * account to add. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The details of the Data Lake Store + * account. + * + * @param {string} [options.parameters.suffix] The optional suffix for the Data + * Lake Store account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -969,11 +985,11 @@ class DataLakeStoreAccounts { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, dataLakeStoreAccountName, options) { + addWithHttpOperationResponse(resourceGroupName, accountName, dataLakeStoreAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { + self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -984,20 +1000,24 @@ class DataLakeStoreAccounts { } /** - * Updates the Data Lake Analytics account specified to remove the specified + * Updates the specified Data Lake Analytics account to include the additional * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Data Lake Store account. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to remove + * account to add. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The details of the Data Lake Store + * account. + * + * @param {string} [options.parameters.suffix] The optional suffix for the Data + * Lake Store account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1022,7 +1042,7 @@ class DataLakeStoreAccounts { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback) { + add(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1031,14 +1051,14 @@ class DataLakeStoreAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { + self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback); + return self._add(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback); } } @@ -1046,11 +1066,9 @@ class DataLakeStoreAccounts { * Gets the specified Data Lake Store account details in the specified Data * Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve the Data Lake Store account details. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store * account to retrieve @@ -1062,7 +1080,7 @@ class DataLakeStoreAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1084,11 +1102,9 @@ class DataLakeStoreAccounts { * Gets the specified Data Lake Store account details in the specified Data * Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve the Data Lake Store account details. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} dataLakeStoreAccountName The name of the Data Lake Store * account to retrieve @@ -1105,7 +1121,7 @@ class DataLakeStoreAccounts { * * {Promise} A promise is returned * - * @resolve {DataLakeStoreAccountInfo} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1114,7 +1130,7 @@ class DataLakeStoreAccounts { * {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 DataLakeStoreAccountInfo} for more + * See {@link DataLakeStoreAccountInformation} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -1142,52 +1158,32 @@ class DataLakeStoreAccounts { } /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Data Lake Store accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. + * Updates the Data Lake Analytics account specified to remove the specified + * Data Lake Store account. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to remove * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, dataLakeStoreAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1198,37 +1194,17 @@ class DataLakeStoreAccounts { } /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Data Lake Store accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. + * Updates the Data Lake Analytics account specified to remove the specified + * Data Lake Store account. * - * @param {number} [options.top] The number of items to return. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. - * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to remove * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1240,7 +1216,7 @@ class DataLakeStoreAccounts { * * {Promise} A promise is returned * - * @resolve {DataLakeAnalyticsAccountListDataLakeStoreResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1248,16 +1224,13 @@ class DataLakeStoreAccounts { * * {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 - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * {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. */ - listByAccount(resourceGroupName, accountName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1266,14 +1239,14 @@ class DataLakeStoreAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, dataLakeStoreAccountName, options, optionalCallback); } } @@ -1292,7 +1265,7 @@ class DataLakeStoreAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1330,7 +1303,7 @@ class DataLakeStoreAccounts { * * {Promise} A promise is returned * - * @resolve {DataLakeAnalyticsAccountListDataLakeStoreResult} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformationListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1339,9 +1312,8 @@ class DataLakeStoreAccounts { * {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 - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * See {@link DataLakeStoreAccountInformationListResult} + * for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/dataLake.Analytics/lib/account/operations/firewallRules.js b/lib/services/dataLake.Analytics/lib/account/operations/firewallRules.js index e679156f85..fa709455d8 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/firewallRules.js +++ b/lib/services/dataLake.Analytics/lib/account/operations/firewallRules.js @@ -15,30 +15,12 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Creates or updates the specified firewall rule. During update, the firewall - * rule with the specified name will be replaced with this new firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the firewall rule. - * - * @param {string} firewallRuleName The name of the firewall rule to create or - * update. - * - * @param {object} parameters Parameters supplied to create or update the - * firewall rule. - * - * @param {string} parameters.startIpAddress the start IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * - * @param {string} parameters.endIpAddress the end IP address for the firewall - * rule. This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [parameters.name] Resource name + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -52,13 +34,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link FirewallRule} for more information. + * See {@link FirewallRuleListResult} 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, accountName, firewallRuleName, parameters, options, callback) { +function _listByAccount(resourceGroupName, accountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -70,24 +53,18 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param } // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } - if (firewallRuleName === null || firewallRuleName === undefined || typeof firewallRuleName.valueOf() !== 'string') { - throw new Error('firewallRuleName cannot be null or undefined and it must be of type string.'); - } - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -97,11 +74,10 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{firewallRuleName}', encodeURIComponent(firewallRuleName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -110,7 +86,7 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -128,21 +104,7 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['FirewallRule']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -184,7 +146,7 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['FirewallRule']().mapper(); + let resultMapper = new client.models['FirewallRuleListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -200,29 +162,29 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param } /** - * Updates the specified firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Creates or updates the specified firewall rule. During update, the firewall + * rule with the specified name will be replaced with this new firewall rule. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to update. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} firewallRuleName The name of the firewall rule to create or + * update. * - * @param {object} [options.parameters] Parameters supplied to update the + * @param {object} parameters Parameters supplied to create or update the * firewall rule. * - * @param {string} [options.parameters.startIpAddress] the start IP address for - * the firewall rule. This can be either ipv4 or ipv6. Start and End should be - * in the same protocol. - * - * @param {string} [options.parameters.endIpAddress] the end IP address for the + * @param {string} parameters.startIpAddress The start IP address for the * firewall rule. This can be either ipv4 or ipv6. Start and End should be in * the same protocol. * + * @param {string} parameters.endIpAddress The end IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -239,7 +201,7 @@ function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, param * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, accountName, firewallRuleName, options, callback) { +function _createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -249,9 +211,11 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -261,12 +225,12 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call if (firewallRuleName === null || firewallRuleName === undefined || typeof firewallRuleName.valueOf() !== 'string') { throw new Error('firewallRuleName cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -277,10 +241,10 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{firewallRuleName}', encodeURIComponent(firewallRuleName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -289,7 +253,7 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -312,7 +276,7 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['UpdateFirewallRuleParameters']().mapper(); + let requestModelMapper = new client.models['CreateOrUpdateFirewallRuleParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -379,16 +343,13 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call } /** - * Deletes the specified firewall rule from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to delete. + * @param {string} firewallRuleName The name of the firewall rule to retrieve. * * @param {object} [options] Optional Parameters. * @@ -401,13 +362,14 @@ function _update(resourceGroupName, accountName, firewallRuleName, options, call * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRule} 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 _deleteMethod(resourceGroupName, accountName, firewallRuleName, options, callback) { +function _get(resourceGroupName, accountName, firewallRuleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -419,6 +381,9 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -431,9 +396,6 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -444,10 +406,10 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{firewallRuleName}', encodeURIComponent(firewallRuleName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -456,7 +418,7 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -481,7 +443,7 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -509,24 +471,50 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options // 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['FirewallRule']().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); }); } /** - * Gets the specified Data Lake Analytics firewall rule. + * Updates the specified firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to retrieve. + * @param {string} firewallRuleName The name of the firewall rule to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * firewall rule. + * + * @param {string} [options.parameters.startIpAddress] The start IP address for + * the firewall rule. This can be either ipv4 or ipv6. Start and End should be + * in the same protocol. + * + * @param {string} [options.parameters.endIpAddress] The end IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -543,7 +531,7 @@ function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, accountName, firewallRuleName, options, callback) { +function _update(resourceGroupName, accountName, firewallRuleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -553,8 +541,12 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } + let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -567,9 +559,6 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -580,10 +569,10 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{firewallRuleName}', encodeURIComponent(firewallRuleName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -592,7 +581,7 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -610,7 +599,21 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['UpdateFirewallRuleParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -668,14 +671,14 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac } /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. + * Deletes the specified firewall rule from the specified Data Lake Analytics + * account + * + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rules. + * @param {string} firewallRuleName The name of the firewall rule to delete. * * @param {object} [options] Optional Parameters. * @@ -688,15 +691,13 @@ function _get(resourceGroupName, accountName, firewallRuleName, options, callbac * * {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 DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * {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 _listByAccount(resourceGroupName, accountName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, firewallRuleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -708,18 +709,21 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { } // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } + if (firewallRuleName === null || firewallRuleName === undefined || typeof firewallRuleName.valueOf() !== 'string') { + throw new Error('firewallRuleName cannot be null or undefined and it must be of type string.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -729,10 +733,11 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{firewallRuleName}', encodeURIComponent(firewallRuleName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -741,7 +746,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -766,7 +771,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -794,23 +799,6 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // 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['DataLakeAnalyticsFirewallRuleListResult']().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); }); @@ -835,8 +823,8 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * See {@link FirewallRuleListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -930,7 +918,7 @@ function _listByAccountNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DataLakeAnalyticsFirewallRuleListResult']().mapper(); + let resultMapper = new client.models['FirewallRuleListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -953,39 +941,21 @@ class FirewallRules { */ constructor(client) { this.client = client; + this._listByAccount = _listByAccount; this._createOrUpdate = _createOrUpdate; + this._get = _get; this._update = _update; this._deleteMethod = _deleteMethod; - this._get = _get; - this._listByAccount = _listByAccount; this._listByAccountNext = _listByAccountNext; } /** - * Creates or updates the specified firewall rule. During update, the firewall - * rule with the specified name will be replaced with this new firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the firewall rule. - * - * @param {string} firewallRuleName The name of the firewall rule to create or - * update. - * - * @param {object} parameters Parameters supplied to create or update the - * firewall rule. - * - * @param {string} parameters.startIpAddress the start IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * - * @param {string} parameters.endIpAddress the end IP address for the firewall - * rule. This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [parameters.name] Resource name + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -994,15 +964,15 @@ class FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, parameters, options) { + listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1013,30 +983,12 @@ class FirewallRules { } /** - * Creates or updates the specified firewall rule. During update, the firewall - * rule with the specified name will be replaced with this new firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the firewall rule. - * - * @param {string} firewallRuleName The name of the firewall rule to create or - * update. - * - * @param {object} parameters Parameters supplied to create or update the - * firewall rule. - * - * @param {string} parameters.startIpAddress the start IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * - * @param {string} parameters.endIpAddress the end IP address for the firewall - * rule. This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [parameters.name] Resource name + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -1050,7 +1002,7 @@ class FirewallRules { * * {Promise} A promise is returned * - * @resolve {FirewallRule} - The deserialized result object. + * @resolve {FirewallRuleListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1059,13 +1011,14 @@ class FirewallRules { * {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 FirewallRule} for more information. + * See {@link FirewallRuleListResult} 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, accountName, firewallRuleName, parameters, options, optionalCallback) { + listByAccount(resourceGroupName, accountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1074,41 +1027,41 @@ class FirewallRules { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, (err, result, request, response) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, optionalCallback); + return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); } } /** - * Updates the specified firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Creates or updates the specified firewall rule. During update, the firewall + * rule with the specified name will be replaced with this new firewall rule. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to update. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} firewallRuleName The name of the firewall rule to create or + * update. * - * @param {object} [options.parameters] Parameters supplied to update the + * @param {object} parameters Parameters supplied to create or update the * firewall rule. * - * @param {string} [options.parameters.startIpAddress] the start IP address for - * the firewall rule. This can be either ipv4 or ipv6. Start and End should be - * in the same protocol. - * - * @param {string} [options.parameters.endIpAddress] the end IP address for the + * @param {string} parameters.startIpAddress The start IP address for the * firewall rule. This can be either ipv4 or ipv6. Start and End should be in * the same protocol. * + * @param {string} parameters.endIpAddress The end IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1118,11 +1071,11 @@ class FirewallRules { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1133,29 +1086,29 @@ class FirewallRules { } /** - * Updates the specified firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Creates or updates the specified firewall rule. During update, the firewall + * rule with the specified name will be replaced with this new firewall rule. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to update. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} firewallRuleName The name of the firewall rule to create or + * update. * - * @param {object} [options.parameters] Parameters supplied to update the + * @param {object} parameters Parameters supplied to create or update the * firewall rule. * - * @param {string} [options.parameters.startIpAddress] the start IP address for - * the firewall rule. This can be either ipv4 or ipv6. Start and End should be - * in the same protocol. - * - * @param {string} [options.parameters.endIpAddress] the end IP address for the + * @param {string} parameters.startIpAddress The start IP address for the * firewall rule. This can be either ipv4 or ipv6. Start and End should be in * the same protocol. * + * @param {string} parameters.endIpAddress The end IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1181,7 +1134,7 @@ class FirewallRules { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { + createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1190,28 +1143,25 @@ class FirewallRules { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, accountName, firewallRuleName, parameters, options, optionalCallback); } } /** - * Deletes the specified firewall rule from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to delete. + * @param {string} firewallRuleName The name of the firewall rule to retrieve. * * @param {object} [options] Optional Parameters. * @@ -1220,15 +1170,15 @@ class FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { + getWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1239,16 +1189,13 @@ class FirewallRules { } /** - * Deletes the specified firewall rule from the specified Data Lake Analytics - * account + * Gets the specified Data Lake Analytics firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to delete. + * @param {string} firewallRuleName The name of the firewall rule to retrieve. * * @param {object} [options] Optional Parameters. * @@ -1262,7 +1209,7 @@ class FirewallRules { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {FirewallRule} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1270,13 +1217,14 @@ class FirewallRules { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRule} 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. */ - deleteMethod(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { + get(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1285,30 +1233,39 @@ class FirewallRules { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); + return self._get(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); } } /** - * Gets the specified Data Lake Analytics firewall rule. + * Updates the specified firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to retrieve. + * @param {string} firewallRuleName The name of the firewall rule to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * firewall rule. + * + * @param {string} [options.parameters.startIpAddress] The start IP address for + * the firewall rule. This can be either ipv4 or ipv6. Start and End should be + * in the same protocol. + * + * @param {string} [options.parameters.endIpAddress] The end IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1318,11 +1275,11 @@ class FirewallRules { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { + updateWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1333,18 +1290,27 @@ class FirewallRules { } /** - * Gets the specified Data Lake Analytics firewall rule. + * Updates the specified firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rule. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} firewallRuleName The name of the firewall rule to retrieve. + * @param {string} firewallRuleName The name of the firewall rule to update. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to update the + * firewall rule. + * + * @param {string} [options.parameters.startIpAddress] The start IP address for + * the firewall rule. This can be either ipv4 or ipv6. Start and End should be + * in the same protocol. + * + * @param {string} [options.parameters.endIpAddress] The end IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1370,7 +1336,7 @@ class FirewallRules { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { + update(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1379,26 +1345,26 @@ class FirewallRules { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); + return self._update(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); } } /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. + * Deletes the specified firewall rule from the specified Data Lake Analytics + * account * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rules. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to delete. * * @param {object} [options] Optional Parameters. * @@ -1407,15 +1373,15 @@ class FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, firewallRuleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1426,14 +1392,14 @@ class FirewallRules { } /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. + * Deletes the specified firewall rule from the specified Data Lake Analytics + * account + * + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rules. + * @param {string} firewallRuleName The name of the firewall rule to delete. * * @param {object} [options] Optional Parameters. * @@ -1447,7 +1413,7 @@ class FirewallRules { * * {Promise} A promise is returned * - * @resolve {DataLakeAnalyticsFirewallRuleListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1455,15 +1421,13 @@ class FirewallRules { * * {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 DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * {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. */ - listByAccount(resourceGroupName, accountName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, firewallRuleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1472,14 +1436,14 @@ class FirewallRules { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, firewallRuleName, options, optionalCallback); } } @@ -1497,7 +1461,7 @@ class FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1534,7 +1498,7 @@ class FirewallRules { * * {Promise} A promise is returned * - * @resolve {DataLakeAnalyticsFirewallRuleListResult} - The deserialized result object. + * @resolve {FirewallRuleListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1543,8 +1507,8 @@ class FirewallRules { * {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 DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * See {@link FirewallRuleListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/dataLake.Analytics/lib/account/operations/index.d.ts b/lib/services/dataLake.Analytics/lib/account/operations/index.d.ts index 4b59e27155..8c5fe5ad37 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/index.d.ts +++ b/lib/services/dataLake.Analytics/lib/account/operations/index.d.ts @@ -14,94 +14,174 @@ import * as models from '../models'; /** * @class - * ComputePolicies + * Accounts * __NOTE__: An instance of this class is automatically created for an * instance of the DataLakeAnalyticsAccountManagementClient. */ -export interface ComputePolicies { +export interface Accounts { /** - * Creates or updates the specified compute policy. During update, the compute - * policy with the specified name will be replaced with this new compute - * policy. An account supports, at most, 50 policies + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {object} [options] Optional Parameters. * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the compute policy. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} computePolicyName The name of the compute policy to create - * or update. + * @param {number} [options.top] The number of items to return. Optional. * - * @param {object} parameters Parameters supplied to create or update the - * compute policy. The max degree of parallelism per job property, min priority - * per job property, or both must be present. + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. * - * @param {uuid} parameters.objectId The AAD object identifier for the entity - * to create a policy for. + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. * - * @param {string} parameters.objectType The type of AAD object the object - * identifier refers to. Possible values include: 'User', 'Group', - * 'ServicePrincipal' + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree - * of parallelism per job this user can use to submit jobs. This property, the - * min priority per job property, or both must be passed. + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * - * @param {number} [parameters.minPriorityPerJob] The minimum priority per job - * this user can use to submit jobs. This property, the max degree of - * parallelism per job property, or both must be passed. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {Promise} A promise is returned. + * + * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccountListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.ComputePolicyCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + list(options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * Creates or updates the specified compute policy. During update, the compute - * policy with the specified name will be replaced with this new compute - * policy. An account supports, at most, 50 policies + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the compute policy. + * @param {object} [options] Optional Parameters. * - * @param {string} computePolicyName The name of the compute policy to create - * or update. + * @param {string} [options.filter] OData filter. Optional. * - * @param {object} parameters Parameters supplied to create or update the - * compute policy. The max degree of parallelism per job property, min priority - * per job property, or both must be present. + * @param {number} [options.top] The number of items to return. Optional. * - * @param {uuid} parameters.objectId The AAD object identifier for the entity - * to create a policy for. + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. * - * @param {string} parameters.objectType The type of AAD object the object - * identifier refers to. Possible values include: 'User', 'Group', - * 'ServicePrincipal' + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree - * of parallelism per job this user can use to submit jobs. This property, the - * min priority per job property, or both must be passed. + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. * - * @param {number} [parameters.minPriorityPerJob] The minimum priority per job - * this user can use to submit jobs. This property, the max degree of - * parallelism per job property, or both must be passed. + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -112,7 +192,7 @@ export interface ComputePolicies { * * {Promise} A promise is returned. * - * @resolve {ComputePolicy} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -120,72 +200,153 @@ export interface ComputePolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ComputePolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicy} for more information. + * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccountListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.ComputePolicyCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.ComputePolicyCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.ComputePolicyCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the specified compute policy. + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to update. + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.location The resource location. * - * @param {object} [options.parameters] Parameters supplied to update the - * compute policy. + * @param {object} [parameters.tags] The resource tags. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The - * maximum degree of parallelism per job this user can use to submit jobs. + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. * - * @param {number} [options.parameters.minPriorityPerJob] The minimum priority - * per job this user can use to submit jobs. + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { parameters? : models.ComputePolicy, customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the specified compute policy. + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to update. + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.location The resource location. * - * @param {object} [options.parameters] Parameters supplied to update the - * compute policy. + * @param {object} [parameters.tags] The resource tags. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The - * maximum degree of parallelism per job this user can use to submit jobs. + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. * - * @param {number} [options.parameters.minPriorityPerJob] The minimum priority - * per job this user can use to submit jobs. + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. + * + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. + * + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. + * + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' + * + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' + * + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. + * + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. + * + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. + * + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -197,7 +358,7 @@ export interface ComputePolicies { * * {Promise} A promise is returned. * - * @resolve {ComputePolicy} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -205,56 +366,205 @@ export interface ComputePolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ComputePolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicy} for more information. + * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccount} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { parameters? : models.ComputePolicy, customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, computePolicyName: string, options: { parameters? : models.ComputePolicy, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified compute policy from the specified Data Lake Analytics - * account + * Gets details of the specified Data Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the compute policy. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} computePolicyName The name of the compute policy to delete. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets details of the specified Data Lake Analytics account. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccount} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. + * + * @param {object} [options.parameters.tags] The resource tags. + * + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. + * + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. + * + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. + * + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. + * + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes the specified compute policy from the specified Data Lake Analytics - * account + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the compute policy. + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. * - * @param {string} computePolicyName The name of the compute policy to delete. + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. * - * @param {object} [options] Optional Parameters. + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -266,7 +576,7 @@ export interface ComputePolicies { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -274,28 +584,26 @@ export interface ComputePolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccount} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, options?: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, options: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified Data Lake Analytics compute policy. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policy. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} computePolicyName The name of the compute policy to - * retrieve. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -304,23 +612,19 @@ export interface ComputePolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified Data Lake Analytics compute policy. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policy. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} computePolicyName The name of the compute policy to - * retrieve. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -334,7 +638,7 @@ export interface ComputePolicies { * * {Promise} A promise is returned. * - * @resolve {ComputePolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -342,27 +646,27 @@ export interface ComputePolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ComputePolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicy} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, computePolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Checks whether the specified account name is available or taken. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} location The resource location without whitespace. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policies. + * @param {object} parameters Parameters supplied to check the Data Lake + * Analytics account name availability. + * + * @param {string} parameters.name The Data Lake Analytics name to check + * availability for. * * @param {object} [options] Optional Parameters. * @@ -371,21 +675,22 @@ export interface ComputePolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + checkNameAvailabilityWithHttpOperationResponse(location: string, parameters: models.CheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Checks whether the specified account name is available or taken. + * + * @param {string} location The resource location without whitespace. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {object} parameters Parameters supplied to check the Data Lake + * Analytics account name availability. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the compute policies. + * @param {string} parameters.name The Data Lake Analytics name to check + * availability for. * * @param {object} [options] Optional Parameters. * @@ -399,7 +704,7 @@ export interface ComputePolicies { * * {Promise} A promise is returned. * - * @resolve {ComputePolicyListResult} - The deserialized result object. + * @resolve {NameAvailabilityInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -407,152 +712,151 @@ export interface ComputePolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ComputePolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicyListResult} for more + * {NameAvailabilityInformation} [result] - The deserialized result object if an error did not occur. + * See {@link NameAvailabilityInformation} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccount(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + checkNameAvailability(location: string, parameters: models.CheckNameAvailabilityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + checkNameAvailability(location: string, parameters: models.CheckNameAvailabilityParameters, callback: ServiceCallback): void; + checkNameAvailability(location: string, parameters: models.CheckNameAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {object} [options] Optional Parameters. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. * - * @returns {Promise} A promise is returned + * @param {string} parameters.location The resource location. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.tags] The resource tags. * - * @reject {Error|ServiceError} - The error object. - */ - listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Lists the Data Lake Analytics compute policies within the specified Data - * Lake Analytics account. An account supports, at most, 50 policies + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' * - * {Promise} A promise is returned. + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' * - * @resolve {ComputePolicyListResult} - The deserialized result object. + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' * - * @reject {Error|ServiceError} - The error object. + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. * - * {ComputePolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ComputePolicyListResult} for more - * information. + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. */ - listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * FirewallRules - * __NOTE__: An instance of this class is automatically created for an - * instance of the DataLakeAnalyticsAccountManagementClient. - */ -export interface FirewallRules { - + beginCreateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the specified firewall rule. During update, the firewall - * rule with the specified name will be replaced with this new firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Creates the specified Data Lake Analytics account. This supplies the user + * with computation services for Data Lake Analytics workloads. * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to create or - * update. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} parameters Parameters supplied to create or update the - * firewall rule. + * @param {object} parameters Parameters supplied to create a new Data Lake + * Analytics account. * - * @param {string} parameters.startIpAddress the start IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * @param {string} parameters.location The resource location. * - * @param {string} parameters.endIpAddress the end IP address for the firewall - * rule. This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. + * @param {object} [parameters.tags] The resource tags. * - * @param {string} [parameters.name] Resource name + * @param {string} parameters.defaultDataLakeStoreAccount The default Data Lake + * Store account associated with this account. * - * @param {object} [options] Optional Parameters. + * @param {array} parameters.dataLakeStoreAccounts The list of Data Lake Store + * accounts associated with this account. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} [parameters.storageAccounts] The list of Azure Blob Storage + * accounts associated with this account. * - * @returns {Promise} A promise is returned + * @param {array} [parameters.computePolicies] The list of compute policies + * associated with this account. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} [parameters.firewallRules] The list of firewall rules + * associated with this account. * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.FirewallRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Creates or updates the specified firewall rule. During update, the firewall - * rule with the specified name will be replaced with this new firewall rule. + * @param {string} [parameters.firewallState] The current state of the IP + * address firewall for this account. Possible values include: 'Enabled', + * 'Disabled' * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} [parameters.firewallAllowAzureIps] The current state of + * allowing or disallowing IPs originating within Azure through the firewall. + * If the firewall is disabled, this is not enforced. Possible values include: + * 'Enabled', 'Disabled' * - * @param {string} accountName The name of the Data Lake Analytics account to - * add or replace the firewall rule. + * @param {string} [parameters.newTier] The commitment tier for the next month. + * Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' * - * @param {string} firewallRuleName The name of the firewall rule to create or - * update. + * @param {number} [parameters.maxJobCount] The maximum supported jobs running + * under the account at the same time. * - * @param {object} parameters Parameters supplied to create or update the - * firewall rule. + * @param {number} [parameters.maxDegreeOfParallelism] The maximum supported + * degree of parallelism for this account. * - * @param {string} parameters.startIpAddress the start IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum + * supported degree of parallelism per job for this account. * - * @param {string} parameters.endIpAddress the end IP address for the firewall - * rule. This can be either ipv4 or ipv6. Start and End should be in the same - * protocol. + * @param {number} [parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. * - * @param {string} [parameters.name] Resource name + * @param {number} [parameters.queryStoreRetention] The number of days that job + * metadata is retained. * * @param {object} [options] Optional Parameters. * @@ -566,7 +870,7 @@ export interface FirewallRules { * * {Promise} A promise is returned. * - * @resolve {FirewallRule} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -574,145 +878,145 @@ export interface FirewallRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {FirewallRule} [result] - The deserialized result object if an error did not occur. - * See {@link FirewallRule} for more information. + * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccount} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.FirewallRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.FirewallRule, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.FirewallRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, accountName: string, parameters: models.CreateDataLakeAnalyticsAccountParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the specified firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to update. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters supplied to update the - * firewall rule. - * - * @param {string} [options.parameters.startIpAddress] the start IP address for - * the firewall rule. This can be either ipv4 or ipv6. Start and End should be - * in the same protocol. - * - * @param {string} [options.parameters.endIpAddress] the end IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Updates the specified firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to update the firewall rule. + * @param {object} [options.parameters.tags] The resource tags. * - * @param {string} firewallRuleName The name of the firewall rule to update. + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. * - * @param {object} [options] Optional Parameters. + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. * - * @param {object} [options.parameters] Parameters supplied to update the - * firewall rule. + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. * - * @param {string} [options.parameters.startIpAddress] the start IP address for - * the firewall rule. This can be either ipv4 or ipv6. Start and End should be - * in the same protocol. + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. * - * @param {string} [options.parameters.endIpAddress] the end IP address for the - * firewall rule. This can be either ipv4 or ipv6. Start and End should be in - * the same protocol. + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. * - * {Promise} A promise is returned. + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. * - * @resolve {FirewallRule} - The deserialized result object. + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. * - * @reject {Error|ServiceError} - The error object. + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {FirewallRule} [result] - The deserialized result object if an error did not occur. - * See {@link FirewallRule} for more information. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - update(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + beginUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified firewall rule from the specified Data Lake Analytics - * account - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Updates the Data Lake Analytics account object specified by the accountName + * with the contents of the account object. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to delete. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [options.parameters] Parameters supplied to the update Data + * Lake Analytics account operation. * - * @returns {Promise} A promise is returned + * @param {object} [options.parameters.tags] The resource tags. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} [options.parameters.dataLakeStoreAccounts] The list of Data + * Lake Store accounts associated with this account. * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes the specified firewall rule from the specified Data Lake Analytics - * account + * @param {array} [options.parameters.storageAccounts] The list of Azure Blob + * storage accounts associated with this account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {array} [options.parameters.computePolicies] The list of compute + * policies associated with this account. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to delete the firewall rule. + * @param {array} [options.parameters.firewallRules] The list of firewall rules + * associated with this account. * - * @param {string} firewallRuleName The name of the firewall rule to delete. + * @param {string} [options.parameters.firewallState] The current state of the + * IP address firewall for this account. Disabling the firewall does not remove + * existing rules, they will just be ignored until the firewall is re-enabled. + * Possible values include: 'Enabled', 'Disabled' * - * @param {object} [options] Optional Parameters. + * @param {string} [options.parameters.firewallAllowAzureIps] The current state + * of allowing or disallowing IPs originating within Azure through the + * firewall. If the firewall is disabled, this is not enforced. Possible values + * include: 'Enabled', 'Disabled' + * + * @param {string} [options.parameters.newTier] The commitment tier to use for + * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', + * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', + * 'Commitment_10000AUHours', 'Commitment_50000AUHours', + * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * + * @param {number} [options.parameters.maxJobCount] The maximum supported jobs + * running under the account at the same time. + * + * @param {number} [options.parameters.maxDegreeOfParallelism] The maximum + * supported degree of parallelism for this account. + * + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum supported degree of parallelism per job for this account. + * + * @param {number} [options.parameters.minPriorityPerJob] The minimum supported + * priority per job for this account. + * + * @param {number} [options.parameters.queryStoreRetention] The number of days + * that job metadata is retained. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -724,7 +1028,7 @@ export interface FirewallRules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -732,27 +1036,26 @@ export interface FirewallRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccount} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, accountName: string, options?: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, accountName: string, options: { parameters? : models.UpdateDataLakeAnalyticsAccountParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified Data Lake Analytics firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to retrieve. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -761,22 +1064,19 @@ export interface FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified Data Lake Analytics firewall rule. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Begins the delete process for the Data Lake Analytics account object + * specified by the account name. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rule. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} firewallRuleName The name of the firewall rule to retrieve. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * @@ -790,7 +1090,7 @@ export interface FirewallRules { * * {Promise} A promise is returned. * - * @resolve {FirewallRule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -798,27 +1098,23 @@ export interface FirewallRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {FirewallRule} [result] - The deserialized result object if an error did not occur. - * See {@link FirewallRule} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rules. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -827,21 +1123,18 @@ export interface FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Data Lake Analytics accounts, if any, within the + * current subscription. This includes a link to the next page, if any. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to get the firewall rules. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -855,7 +1148,7 @@ export interface FirewallRules { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsFirewallRuleListResult} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -863,22 +1156,22 @@ export interface FirewallRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsFirewallRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccountListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccount(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -890,15 +1183,15 @@ export interface FirewallRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the Data Lake Analytics firewall rules within the specified Data Lake - * Analytics account. + * Gets the first page of Data Lake Analytics accounts, if any, within a + * specific resource group. This includes a link to the next page, if any. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -915,7 +1208,7 @@ export interface FirewallRules { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsFirewallRuleListResult} - The deserialized result object. + * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -923,86 +1216,100 @@ export interface FirewallRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsFirewallRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsFirewallRuleListResult} for - * more information. + * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeAnalyticsAccountListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * StorageAccounts + * DataLakeStoreAccounts * __NOTE__: An instance of this class is automatically created for an * instance of the DataLakeAnalyticsAccountManagementClient. */ -export interface StorageAccounts { +export interface DataLakeStoreAccounts { /** - * Updates the specified Data Lake Analytics account to add an Azure Storage - * account. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * add + * @param {object} [options] Optional Parameters. * - * @param {object} parameters The parameters containing the access key and - * optional suffix for the Azure Storage Account. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} parameters.accessKey the access key associated with this - * Azure Storage account that will be used to connect to it. + * @param {number} [options.top] The number of items to return. Optional. * - * @param {string} [parameters.suffix] the optional suffix for the storage - * account. + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - addWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the specified Data Lake Analytics account to add an Azure Storage - * account. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * add + * @param {object} [options] Optional Parameters. * - * @param {object} parameters The parameters containing the access key and - * optional suffix for the Azure Storage Account. + * @param {string} [options.filter] OData filter. Optional. * - * @param {string} parameters.accessKey the access key associated with this - * Azure Storage account that will be used to connect to it. + * @param {number} [options.top] The number of items to return. Optional. * - * @param {string} [parameters.suffix] the optional suffix for the storage - * account. + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1014,7 +1321,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1022,41 +1329,37 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DataLakeStoreAccountInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeStoreAccountInformationListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, callback: ServiceCallback): void; - add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the Data Lake Analytics account to replace Azure Storage blob - * account details, such as the access key and/or suffix. + * Updates the specified Data Lake Analytics account to include the additional + * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * modify storage accounts in + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The Azure Storage account to modify + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to add. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The parameters containing the access - * key and suffix to update the storage account with, if any. Passing nothing - * results in no change. - * - * @param {string} [options.parameters.accessKey] the updated access key - * associated with this Azure Storage account that will be used to connect to - * it. + * @param {object} [options.parameters] The details of the Data Lake Store + * account. * - * @param {string} [options.parameters.suffix] the optional suffix for the - * storage account. + * @param {string} [options.parameters.suffix] The optional suffix for the Data + * Lake Store account. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1067,32 +1370,26 @@ export interface StorageAccounts { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + addWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the Data Lake Analytics account to replace Azure Storage blob - * account details, such as the access key and/or suffix. + * Updates the specified Data Lake Analytics account to include the additional + * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * modify storage accounts in + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The Azure Storage account to modify + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to add. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The parameters containing the access - * key and suffix to update the storage account with, if any. Passing nothing - * results in no change. - * - * @param {string} [options.parameters.accessKey] the updated access key - * associated with this Azure Storage account that will be used to connect to - * it. + * @param {object} [options.parameters] The details of the Data Lake Store + * account. * - * @param {string} [options.parameters.suffix] the optional suffix for the - * storage account. + * @param {string} [options.parameters.suffix] The optional suffix for the Data + * Lake Store account. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1118,23 +1415,21 @@ export interface StorageAccounts { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, storageAccountName: string, options: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; + add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the specified Data Lake Analytics account to remove an Azure Storage - * account. + * Gets the specified Data Lake Store account details in the specified Data + * Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * remove + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to retrieve * * @param {object} [options] Optional Parameters. * @@ -1143,24 +1438,22 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the specified Data Lake Analytics account to remove an Azure Storage - * account. + * Gets the specified Data Lake Store account details in the specified Data + * Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * remove + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to retrieve * * @param {object} [options] Optional Parameters. * @@ -1174,7 +1467,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1182,29 +1475,29 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DataLakeStoreAccountInformation} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeStoreAccountInformation} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified Azure Storage account linked to the given Data Lake - * Analytics account. + * Updates the Data Lake Analytics account specified to remove the specified + * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve Azure storage account details. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account for - * which to retrieve the details. + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to remove * * @param {object} [options] Optional Parameters. * @@ -1213,24 +1506,22 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified Azure Storage account linked to the given Data Lake - * Analytics account. + * Updates the Data Lake Analytics account specified to remove the specified + * Data Lake Store account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve Azure storage account details. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account for - * which to retrieve the details. + * @param {string} dataLakeStoreAccountName The name of the Data Lake Store + * account to remove * * @param {object} [options] Optional Parameters. * @@ -1244,7 +1535,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {StorageAccountInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1252,33 +1543,24 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageAccountInfo} [result] - The deserialized result object if an error did not occur. - * See {@link StorageAccountInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified Azure Storage container associated with the given Data - * Lake Analytics and Azure Storage accounts. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to retrieve blob container. - * - * @param {string} storageAccountName The name of the Azure storage account - * from which to retrieve the blob container. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} containerName The name of the Azure storage container to - * retrieve + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1287,27 +1569,19 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getStorageContainerWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified Azure Storage container associated with the given Data - * Lake Analytics and Azure Storage accounts. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to retrieve blob container. - * - * @param {string} storageAccountName The name of the Azure storage account - * from which to retrieve the blob container. + * Gets the first page of Data Lake Store accounts linked to the specified Data + * Lake Analytics account. The response includes a link to the next page, if + * any. * - * @param {string} containerName The name of the Azure storage container to - * retrieve + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1321,7 +1595,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {StorageContainer} - The deserialized result object. + * @resolve {DataLakeStoreAccountInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1329,61 +1603,101 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {StorageContainer} [result] - The deserialized result object if an error did not occur. - * See {@link StorageContainer} for more information. + * {DataLakeStoreAccountInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DataLakeStoreAccountInformationListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, callback: ServiceCallback): void; - getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * StorageAccounts + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataLakeAnalyticsAccountManagementClient. + */ +export interface StorageAccounts { /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage blob containers. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} storageAccountName The name of the Azure storage account - * from which to list blob containers. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listStorageContainersWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage blob containers. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} storageAccountName The name of the Azure storage account - * from which to list blob containers. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1394,7 +1708,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {ListStorageContainersResult} - The deserialized result object. + * @resolve {StorageAccountInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1402,34 +1716,38 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ListStorageContainersResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListStorageContainersResult} for more - * information. + * {StorageAccountInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformationListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; - listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Updates the specified Data Lake Analytics account to add an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which an Azure Storage account's SAS token is being requested. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure storage account for - * which the SAS token is being requested. + * @param {string} storageAccountName The name of the Azure Storage account to + * add * - * @param {string} containerName The name of the Azure storage container for - * which the SAS token is being requested. + * @param {object} parameters The parameters containing the access key and + * optional suffix for the Azure Storage Account. + * + * @param {string} parameters.accessKey The access key associated with this + * Azure Storage account that will be used to connect to it. + * + * @param {string} [parameters.suffix] The optional suffix for the storage + * account. * * @param {object} [options] Optional Parameters. * @@ -1438,27 +1756,31 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listSasTokensWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + addWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Updates the specified Data Lake Analytics account to add an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which an Azure Storage account's SAS token is being requested. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure storage account for - * which the SAS token is being requested. + * @param {string} storageAccountName The name of the Azure Storage account to + * add * - * @param {string} containerName The name of the Azure storage container for - * which the SAS token is being requested. + * @param {object} parameters The parameters containing the access key and + * optional suffix for the Azure Storage Account. + * + * @param {string} parameters.accessKey The access key associated with this + * Azure Storage account that will be used to connect to it. + * + * @param {string} [parameters.suffix] The optional suffix for the storage + * account. * * @param {object} [options] Optional Parameters. * @@ -1472,7 +1794,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {ListSasTokensResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1480,94 +1802,53 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ListSasTokensResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListSasTokensResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, callback: ServiceCallback): void; - listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, callback: ServiceCallback): void; + add(resourceGroupName: string, accountName: string, storageAccountName: string, parameters: models.AddStorageAccountParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] The OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. + * Gets the specified Azure Storage account linked to the given Data Lake + * Analytics account. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} storageAccountName The name of the Azure Storage account for + * which to retrieve the details. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] The OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. + * Gets the specified Azure Storage account linked to the given Data Lake + * Analytics account. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} storageAccountName The name of the Azure Storage account for + * which to retrieve the details. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1579,7 +1860,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListStorageAccountsResult} - The deserialized result object. + * @resolve {StorageAccountInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1587,51 +1868,76 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListStorageAccountsResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListStorageAccountsResult} for - * more information. + * {StorageAccountInformation} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformation} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccount(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. + * Updates the Data Lake Analytics account to replace Azure Storage blob + * account details, such as the access key and/or suffix. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} storageAccountName The Azure Storage account to modify * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The parameters containing the access + * key and suffix to update the storage account with, if any. Passing nothing + * results in no change. + * + * @param {string} [options.parameters.accessKey] The updated access key + * associated with this Azure Storage account that will be used to connect to + * it. + * + * @param {string} [options.parameters.suffix] The optional suffix for the + * storage account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listStorageContainersNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. + * Updates the Data Lake Analytics account to replace Azure Storage blob + * account details, such as the access key and/or suffix. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} storageAccountName The Azure Storage account to modify * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The parameters containing the access + * key and suffix to update the storage account with, if any. Passing nothing + * results in no change. + * + * @param {string} [options.parameters.accessKey] The updated access key + * associated with this Azure Storage account that will be used to connect to + * it. + * + * @param {string} [options.parameters.suffix] The optional suffix for the + * storage account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1642,7 +1948,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {ListStorageContainersResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1650,25 +1956,27 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ListStorageContainersResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListStorageContainersResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listStorageContainersNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listStorageContainersNext(nextPageLink: string, callback: ServiceCallback): void; - listStorageContainersNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, storageAccountName: string, options: { parameters? : models.UpdateStorageAccountParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Updates the specified Data Lake Analytics account to remove an Azure Storage + * account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} storageAccountName The name of the Azure Storage account to + * remove * * @param {object} [options] Optional Parameters. * @@ -1677,18 +1985,22 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listSasTokensNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Updates the specified Data Lake Analytics account to remove an Azure Storage + * account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} storageAccountName The name of the Azure Storage account to + * remove * * @param {object} [options] Optional Parameters. * @@ -1702,7 +2014,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {ListSasTokensResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1710,25 +2022,28 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ListSasTokensResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListSasTokensResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listSasTokensNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSasTokensNext(nextPageLink: string, callback: ServiceCallback): void; - listSasTokensNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} storageAccountName The name of the Azure storage account + * from which to list blob containers. * * @param {object} [options] Optional Parameters. * @@ -1737,19 +2052,23 @@ export interface StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listStorageContainersWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} storageAccountName The name of the Azure storage account + * from which to list blob containers. * * @param {object} [options] Optional Parameters. * @@ -1763,7 +2082,7 @@ export interface StorageAccounts { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListStorageAccountsResult} - The deserialized result object. + * @resolve {StorageContainerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1771,81 +2090,61 @@ export interface StorageAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListStorageAccountsResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListStorageAccountsResult} for - * more information. + * {StorageContainerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link StorageContainerListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DataLakeStoreAccounts - * __NOTE__: An instance of this class is automatically created for an - * instance of the DataLakeAnalyticsAccountManagementClient. - */ -export interface DataLakeStoreAccounts { + listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, callback: ServiceCallback): void; + listStorageContainers(resourceGroupName: string, accountName: string, storageAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the specified Data Lake Analytics account to include the additional - * Data Lake Store account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the specified Azure Storage container associated with the given Data + * Lake Analytics and Azure Storage accounts. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Data Lake Store account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to add. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} storageAccountName The name of the Azure storage account + * from which to retrieve the blob container. * - * @param {object} [options.parameters] The details of the Data Lake Store - * account. + * @param {string} containerName The name of the Azure storage container to + * retrieve * - * @param {string} [options.parameters.suffix] the optional suffix for the Data - * Lake Store account. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - addWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + getStorageContainerWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the specified Data Lake Analytics account to include the additional - * Data Lake Store account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Gets the specified Azure Storage container associated with the given Data + * Lake Analytics and Azure Storage accounts. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Data Lake Store account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to add. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [options] Optional Parameters. + * @param {string} storageAccountName The name of the Azure storage account + * from which to retrieve the blob container. * - * @param {object} [options.parameters] The details of the Data Lake Store - * account. + * @param {string} containerName The name of the Azure storage container to + * retrieve * - * @param {string} [options.parameters.suffix] the optional suffix for the Data - * Lake Store account. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1857,7 +2156,7 @@ export interface DataLakeStoreAccounts { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {StorageContainer} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1865,29 +2164,31 @@ export interface DataLakeStoreAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {StorageContainer} [result] - The deserialized result object if an error did not occur. + * See {@link StorageContainer} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; - add(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { parameters? : models.AddDataLakeStoreParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, callback: ServiceCallback): void; + getStorageContainer(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the Data Lake Analytics account specified to remove the specified - * Data Lake Store account. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Data Lake Store account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to remove + * @param {string} storageAccountName The name of the Azure storage account for + * which the SAS token is being requested. + * + * @param {string} containerName The name of the Azure storage container for + * which the SAS token is being requested. * * @param {object} [options] Optional Parameters. * @@ -1896,24 +2197,25 @@ export interface DataLakeStoreAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listSasTokensWithHttpOperationResponse(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the Data Lake Analytics account specified to remove the specified - * Data Lake Store account. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Data Lake Store account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to remove + * @param {string} storageAccountName The name of the Azure storage account for + * which the SAS token is being requested. + * + * @param {string} containerName The name of the Azure storage container for + * which the SAS token is being requested. * * @param {object} [options] Optional Parameters. * @@ -1927,7 +2229,7 @@ export interface DataLakeStoreAccounts { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SasTokenInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1935,29 +2237,26 @@ export interface DataLakeStoreAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SasTokenInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SasTokenInformationListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, callback: ServiceCallback): void; + listSasTokens(resourceGroupName: string, accountName: string, storageAccountName: string, containerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified Data Lake Store account details in the specified Data - * Lake Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve the Data Lake Store account details. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to retrieve + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1966,24 +2265,19 @@ export interface DataLakeStoreAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified Data Lake Store account details in the specified Data - * Lake Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve the Data Lake Store account details. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * - * @param {string} dataLakeStoreAccountName The name of the Data Lake Store - * account to retrieve + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1997,7 +2291,7 @@ export interface DataLakeStoreAccounts { * * {Promise} A promise is returned. * - * @resolve {DataLakeStoreAccountInfo} - The deserialized result object. + * @resolve {StorageAccountInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2005,95 +2299,49 @@ export interface DataLakeStoreAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeStoreAccountInfo} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeStoreAccountInfo} for more - * information. + * {StorageAccountInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformationListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, dataLakeStoreAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Data Lake Store accounts. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. - * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. - * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. - * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + listStorageContainersNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Data Lake Store accounts. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. - * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2105,7 +2353,7 @@ export interface DataLakeStoreAccounts { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListDataLakeStoreResult} - The deserialized result object. + * @resolve {StorageContainerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2113,24 +2361,22 @@ export interface DataLakeStoreAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListDataLakeStoreResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * {StorageContainerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link StorageContainerListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccount(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listStorageContainersNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listStorageContainersNext(nextPageLink: string, callback: ServiceCallback): void; + listStorageContainersNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2142,16 +2388,15 @@ export interface DataLakeStoreAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listSasTokensNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Store accounts linked to the specified Data - * Lake Analytics account. The response includes a link to the next page, if - * any. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2168,7 +2413,7 @@ export interface DataLakeStoreAccounts { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListDataLakeStoreResult} - The deserialized result object. + * @resolve {SasTokenInformationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2176,97 +2421,58 @@ export interface DataLakeStoreAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListDataLakeStoreResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListDataLakeStoreResult} for - * more information. + * {SasTokenInformationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SasTokenInformationListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listSasTokensNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSasTokensNext(nextPageLink: string, callback: ServiceCallback): void; + listSasTokensNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * Account + * ComputePolicies * __NOTE__: An instance of this class is automatically created for an * instance of the DataLakeAnalyticsAccountManagementClient. */ -export interface Account { +export interface ComputePolicies { /** - * Gets the first page of Data Lake Analytics accounts, if any, within a - * specific resource group. This includes a link to the next page, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Analytics accounts, if any, within a - * specific resource group. This includes a link to the next page, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2278,7 +2484,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. + * @resolve {ComputePolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2286,81 +2492,95 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccountListResult} for more + * {ComputePolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicyListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Data Lake Analytics accounts, if any, within the - * current subscription. This includes a link to the next page, if any. + * Creates or updates the specified compute policy. During update, the compute + * policy with the specified name will be replaced with this new compute + * policy. An account supports, at most, 50 policies * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.filter] OData filter. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {number} [options.top] The number of items to return. Optional. + * @param {string} computePolicyName The name of the compute policy to create + * or update. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {object} parameters Parameters supplied to create or update the + * compute policy. The max degree of parallelism per job property, min priority + * per job property, or both must be present. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {uuid} parameters.objectId The AAD object identifier for the entity + * to create a policy for. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} parameters.objectType The type of AAD object the object + * identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree + * of parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * + * @param {number} [parameters.minPriorityPerJob] The minimum priority per job + * this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.CreateOrUpdateComputePolicyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Analytics accounts, if any, within the - * current subscription. This includes a link to the next page, if any. + * Creates or updates the specified compute policy. During update, the compute + * policy with the specified name will be replaced with this new compute + * policy. An account supports, at most, 50 policies * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.filter] OData filter. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {number} [options.top] The number of items to return. Optional. + * @param {string} computePolicyName The name of the compute policy to create + * or update. * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {object} parameters Parameters supplied to create or update the + * compute policy. The max degree of parallelism per job property, min priority + * per job property, or both must be present. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {uuid} parameters.objectId The AAD object identifier for the entity + * to create a policy for. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} parameters.objectType The type of AAD object the object + * identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {number} [parameters.maxDegreeOfParallelismPerJob] The maximum degree + * of parallelism per job this user can use to submit jobs. This property, the + * min priority per job property, or both must be passed. + * + * @param {number} [parameters.minPriorityPerJob] The minimum priority per job + * this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2372,7 +2592,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. + * @resolve {ComputePolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2380,157 +2600,50 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccountListResult} for more - * information. + * {ComputePolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicy} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, top? : number, skip? : number, select? : string, orderby? : string, count? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.CreateOrUpdateComputePolicyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.CreateOrUpdateComputePolicyParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, computePolicyName: string, parameters: models.CreateOrUpdateComputePolicyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates the specified Data Lake Analytics account. This supplies the user - * with computation services for Data Lake Analytics workloads - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account.the account will be associated - * with. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * create. - * - * @param {object} parameters Parameters supplied to the create Data Lake - * Analytics account operation. - * - * @param {string} parameters.defaultDataLakeStoreAccount the default data lake - * storage account associated with this Data Lake Analytics account. - * - * @param {number} [parameters.maxDegreeOfParallelism] the maximum supported - * degree of parallelism for this account. - * - * @param {number} [parameters.queryStoreRetention] the number of days that job - * metadata is retained. - * - * @param {number} [parameters.maxJobCount] the maximum supported jobs running - * under the account at the same time. - * - * @param {array} parameters.dataLakeStoreAccounts the list of Data Lake - * storage accounts associated with this account. - * - * @param {array} [parameters.storageAccounts] the list of Azure Blob storage - * accounts associated with this account. - * - * @param {string} [parameters.newTier] the commitment tier for the next month. - * Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' - * - * @param {string} [parameters.firewallState] The current state of the IP - * address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} [parameters.firewallAllowAzureIps] The current state of - * allowing or disallowing IPs originating within Azure through the firewall. - * If the firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' - * - * @param {array} [parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. - * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] the maximum - * supported degree of parallelism per job for this account. - * - * @param {number} [parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * Gets the specified Data Lake Analytics compute policy. * - * @param {array} [parameters.computePolicies] the list of compute policies to - * create in this account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} parameters.location Resource location + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [parameters.tags] Resource tags + * @param {string} computePolicyName The name of the compute policy to + * retrieve. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Creates the specified Data Lake Analytics account. This supplies the user - * with computation services for Data Lake Analytics workloads - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account.the account will be associated - * with. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * create. - * - * @param {object} parameters Parameters supplied to the create Data Lake - * Analytics account operation. - * - * @param {string} parameters.defaultDataLakeStoreAccount the default data lake - * storage account associated with this Data Lake Analytics account. - * - * @param {number} [parameters.maxDegreeOfParallelism] the maximum supported - * degree of parallelism for this account. - * - * @param {number} [parameters.queryStoreRetention] the number of days that job - * metadata is retained. - * - * @param {number} [parameters.maxJobCount] the maximum supported jobs running - * under the account at the same time. - * - * @param {array} parameters.dataLakeStoreAccounts the list of Data Lake - * storage accounts associated with this account. - * - * @param {array} [parameters.storageAccounts] the list of Azure Blob storage - * accounts associated with this account. - * - * @param {string} [parameters.newTier] the commitment tier for the next month. - * Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' - * - * @param {string} [parameters.firewallState] The current state of the IP - * address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' - * - * @param {string} [parameters.firewallAllowAzureIps] The current state of - * allowing or disallowing IPs originating within Azure through the firewall. - * If the firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' - * - * @param {array} [parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] the maximum - * supported degree of parallelism per job for this account. + * @returns {Promise} A promise is returned * - * @param {number} [parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the specified Data Lake Analytics compute policy. * - * @param {array} [parameters.computePolicies] the list of compute policies to - * create in this account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} parameters.location Resource location + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {object} [parameters.tags] Resource tags + * @param {string} computePolicyName The name of the compute policy to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -2544,7 +2657,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * @resolve {ComputePolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2552,135 +2665,86 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccount} for more - * information. + * {ComputePolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicy} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, callback: ServiceCallback): void; - create(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, computePolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the Data Lake Analytics account object specified by the accountName - * with the contents of the account object. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * update. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] Parameters supplied to the update Data - * Lake Analytics account operation. - * - * @param {object} [options.parameters.tags] Resource tags - * - * @param {number} [options.parameters.maxDegreeOfParallelism] the maximum - * supported degree of parallelism for this account. + * Updates the specified compute policy. * - * @param {number} [options.parameters.queryStoreRetention] the number of days - * that job metadata is retained. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [options.parameters.maxJobCount] the maximum supported jobs - * running under the account at the same time. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.parameters.newTier] the commitment tier to use for - * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @param {string} computePolicyName The name of the compute policy to update. * - * @param {string} [options.parameters.firewallState] The current state of the - * IP address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options] Optional Parameters. * - * @param {string} [options.parameters.firewallAllowAzureIps] The current state - * of allowing or disallowing IPs originating within Azure through the - * firewall. If the firewall is disabled, this is not enforced. Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options.parameters] Parameters supplied to update the + * compute policy. * - * @param {array} [options.parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {uuid} [options.parameters.objectId] The AAD object identifier for + * the entity to create a policy for. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] the - * maximum supported degree of parallelism per job for this account. + * @param {string} [options.parameters.objectType] The type of AAD object the + * object identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {number} [options.parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum degree of parallelism per job this user can use to submit jobs. This + * property, the min priority per job property, or both must be passed. * - * @param {array} [options.parameters.computePolicies] the list of existing - * compute policies to update in this account. + * @param {number} [options.parameters.minPriorityPerJob] The minimum priority + * per job this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { parameters? : models.UpdateComputePolicyParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the Data Lake Analytics account object specified by the accountName - * with the contents of the account object. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * update. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] Parameters supplied to the update Data - * Lake Analytics account operation. - * - * @param {object} [options.parameters.tags] Resource tags - * - * @param {number} [options.parameters.maxDegreeOfParallelism] the maximum - * supported degree of parallelism for this account. + * Updates the specified compute policy. * - * @param {number} [options.parameters.queryStoreRetention] the number of days - * that job metadata is retained. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [options.parameters.maxJobCount] the maximum supported jobs - * running under the account at the same time. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.parameters.newTier] the commitment tier to use for - * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @param {string} computePolicyName The name of the compute policy to update. * - * @param {string} [options.parameters.firewallState] The current state of the - * IP address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options] Optional Parameters. * - * @param {string} [options.parameters.firewallAllowAzureIps] The current state - * of allowing or disallowing IPs originating within Azure through the - * firewall. If the firewall is disabled, this is not enforced. Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options.parameters] Parameters supplied to update the + * compute policy. * - * @param {array} [options.parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {uuid} [options.parameters.objectId] The AAD object identifier for + * the entity to create a policy for. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] the - * maximum supported degree of parallelism per job for this account. + * @param {string} [options.parameters.objectType] The type of AAD object the + * object identifier refers to. Possible values include: 'User', 'Group', + * 'ServicePrincipal' * - * @param {number} [options.parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] The + * maximum degree of parallelism per job this user can use to submit jobs. This + * property, the min priority per job property, or both must be passed. * - * @param {array} [options.parameters.computePolicies] the list of existing - * compute policies to update in this account. + * @param {number} [options.parameters.minPriorityPerJob] The minimum priority + * per job this user can use to submit jobs. This property, the max degree of + * parallelism per job property, or both must be passed. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2692,7 +2756,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * @resolve {ComputePolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2700,28 +2764,27 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccount} for more - * information. + * {ComputePolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicy} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, accountName: string, options?: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, options: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { parameters? : models.UpdateComputePolicyParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, computePolicyName: string, options: { parameters? : models.UpdateComputePolicyParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Begins the delete process for the Data Lake Analytics account object - * specified by the account name. + * Deletes the specified compute policy from the specified Data Lake Analytics + * account + * + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} accountName The name of the Data Lake Analytics account to - * delete + * @param {string} computePolicyName The name of the compute policy to delete. * * @param {object} [options] Optional Parameters. * @@ -2734,17 +2797,17 @@ export interface Account { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Begins the delete process for the Data Lake Analytics account object - * specified by the account name. + * Deletes the specified compute policy from the specified Data Lake Analytics + * account + * + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} accountName The name of the Data Lake Analytics account to - * delete + * @param {string} computePolicyName The name of the compute policy to delete. * * @param {object} [options] Optional Parameters. * @@ -2772,19 +2835,17 @@ export interface Account { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, computePolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets details of the specified Data Lake Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {string} accountName The name of the Data Lake Analytics account to - * retrieve. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -2793,20 +2854,18 @@ export interface Account { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets details of the specified Data Lake Analytics account. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * Lists the Data Lake Analytics compute policies within the specified Data + * Lake Analytics account. An account supports, at most, 50 policies * - * @param {string} accountName The name of the Data Lake Analytics account to - * retrieve. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -2820,7 +2879,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * @resolve {ComputePolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2828,157 +2887,146 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccount} for more + * {ComputePolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ComputePolicyListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * FirewallRules + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataLakeAnalyticsAccountManagementClient. + */ +export interface FirewallRules { /** - * Creates the specified Data Lake Analytics account. This supplies the user - * with computation services for Data Lake Analytics workloads - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account.the account will be associated - * with. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * create. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * - * @param {object} parameters Parameters supplied to the create Data Lake - * Analytics account operation. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} parameters.defaultDataLakeStoreAccount the default data lake - * storage account associated with this Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {number} [parameters.maxDegreeOfParallelism] the maximum supported - * degree of parallelism for this account. + * @param {object} [options] Optional Parameters. * - * @param {number} [parameters.queryStoreRetention] the number of days that job - * metadata is retained. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [parameters.maxJobCount] the maximum supported jobs running - * under the account at the same time. + * @returns {Promise} A promise is returned * - * @param {array} parameters.dataLakeStoreAccounts the list of Data Lake - * storage accounts associated with this account. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.storageAccounts] the list of Azure Blob storage - * accounts associated with this account. + * @reject {Error|ServiceError} - The error object. + */ + listByAccountWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * - * @param {string} [parameters.newTier] the commitment tier for the next month. - * Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [parameters.firewallState] The current state of the IP - * address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [parameters.firewallAllowAzureIps] The current state of - * allowing or disallowing IPs originating within Azure through the firewall. - * If the firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] the maximum - * supported degree of parallelism per job for this account. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {number} [parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {array} [parameters.computePolicies] the list of compute policies to - * create in this account. + * {Promise} A promise is returned. * - * @param {string} parameters.location Resource location + * @resolve {FirewallRuleListResult} - The deserialized result object. * - * @param {object} [parameters.tags] Resource tags + * @reject {Error|ServiceError} - The error object. * - * @param {object} [options] Optional Parameters. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @returns {Promise} A promise is returned + * {FirewallRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRuleListResult} for more + * information. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @reject {Error|ServiceError} - The error object. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccount(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccount(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * Creates the specified Data Lake Analytics account. This supplies the user - * with computation services for Data Lake Analytics workloads - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account.the account will be associated - * with. - * - * @param {string} accountName The name of the Data Lake Analytics account to - * create. + * Creates or updates the specified firewall rule. During update, the firewall + * rule with the specified name will be replaced with this new firewall rule. * - * @param {object} parameters Parameters supplied to the create Data Lake - * Analytics account operation. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} parameters.defaultDataLakeStoreAccount the default data lake - * storage account associated with this Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {number} [parameters.maxDegreeOfParallelism] the maximum supported - * degree of parallelism for this account. + * @param {string} firewallRuleName The name of the firewall rule to create or + * update. * - * @param {number} [parameters.queryStoreRetention] the number of days that job - * metadata is retained. + * @param {object} parameters Parameters supplied to create or update the + * firewall rule. * - * @param {number} [parameters.maxJobCount] the maximum supported jobs running - * under the account at the same time. + * @param {string} parameters.startIpAddress The start IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. * - * @param {array} parameters.dataLakeStoreAccounts the list of Data Lake - * storage accounts associated with this account. + * @param {string} parameters.endIpAddress The end IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. * - * @param {array} [parameters.storageAccounts] the list of Azure Blob storage - * accounts associated with this account. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.newTier] the commitment tier for the next month. - * Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.firewallState] The current state of the IP - * address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @returns {Promise} A promise is returned * - * @param {string} [parameters.firewallAllowAzureIps] The current state of - * allowing or disallowing IPs originating within Azure through the firewall. - * If the firewall is disabled, this is not enforced. Possible values include: - * 'Enabled', 'Disabled' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.CreateOrUpdateFirewallRuleParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates the specified firewall rule. During update, the firewall + * rule with the specified name will be replaced with this new firewall rule. * - * @param {number} [parameters.maxDegreeOfParallelismPerJob] the maximum - * supported degree of parallelism per job for this account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to create or + * update. * - * @param {array} [parameters.computePolicies] the list of compute policies to - * create in this account. + * @param {object} parameters Parameters supplied to create or update the + * firewall rule. * - * @param {string} parameters.location Resource location + * @param {string} parameters.startIpAddress The start IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. * - * @param {object} [parameters.tags] Resource tags + * @param {string} parameters.endIpAddress The end IP address for the firewall + * rule. This can be either ipv4 or ipv6. Start and End should be in the same + * protocol. * * @param {object} [options] Optional Parameters. * @@ -2992,7 +3040,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * @resolve {FirewallRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3000,135 +3048,135 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccount} for more - * information. + * {FirewallRule} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, accountName: string, parameters: models.DataLakeAnalyticsAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.CreateOrUpdateFirewallRuleParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.CreateOrUpdateFirewallRuleParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: models.CreateOrUpdateFirewallRuleParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates the Data Lake Analytics account object specified by the accountName - * with the contents of the account object. + * Gets the specified Data Lake Analytics firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * update. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to retrieve. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters supplied to the update Data - * Lake Analytics account operation. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [options.parameters.tags] Resource tags + * @returns {Promise} A promise is returned * - * @param {number} [options.parameters.maxDegreeOfParallelism] the maximum - * supported degree of parallelism for this account. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.parameters.queryStoreRetention] the number of days - * that job metadata is retained. + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the specified Data Lake Analytics firewall rule. * - * @param {number} [options.parameters.maxJobCount] the maximum supported jobs - * running under the account at the same time. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} [options.parameters.newTier] the commitment tier to use for - * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.parameters.firewallState] The current state of the - * IP address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @param {string} firewallRuleName The name of the firewall rule to retrieve. * - * @param {string} [options.parameters.firewallAllowAzureIps] The current state - * of allowing or disallowing IPs originating within Azure through the - * firewall. If the firewall is disabled, this is not enforced. Possible values - * include: 'Enabled', 'Disabled' + * @param {object} [options] Optional Parameters. * - * @param {array} [options.parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] the - * maximum supported degree of parallelism per job for this account. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {number} [options.parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {array} [options.parameters.computePolicies] the list of existing - * compute policies to update in this account. + * {Promise} A promise is returned. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @resolve {FirewallRule} - The deserialized result object. * - * @returns {Promise} A promise is returned + * @reject {Error|ServiceError} - The error object. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @reject {Error|ServiceError} - The error object. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {FirewallRule} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRule} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + get(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * Updates the Data Lake Analytics account object specified by the accountName - * with the contents of the account object. + * Updates the specified firewall rule. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * update. + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to update. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters supplied to the update Data - * Lake Analytics account operation. + * @param {object} [options.parameters] Parameters supplied to update the + * firewall rule. * - * @param {object} [options.parameters.tags] Resource tags + * @param {string} [options.parameters.startIpAddress] The start IP address for + * the firewall rule. This can be either ipv4 or ipv6. Start and End should be + * in the same protocol. * - * @param {number} [options.parameters.maxDegreeOfParallelism] the maximum - * supported degree of parallelism for this account. + * @param {string} [options.parameters.endIpAddress] The end IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. * - * @param {number} [options.parameters.queryStoreRetention] the number of days - * that job metadata is retained. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.parameters.maxJobCount] the maximum supported jobs - * running under the account at the same time. + * @returns {Promise} A promise is returned * - * @param {string} [options.parameters.newTier] the commitment tier to use for - * next month. Possible values include: 'Consumption', 'Commitment_100AUHours', - * 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', - * 'Commitment_10000AUHours', 'Commitment_50000AUHours', - * 'Commitment_100000AUHours', 'Commitment_500000AUHours' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [options.parameters.firewallState] The current state of the - * IP address firewall for this Data Lake Analytics account. Possible values - * include: 'Enabled', 'Disabled' + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates the specified firewall rule. * - * @param {string} [options.parameters.firewallAllowAzureIps] The current state - * of allowing or disallowing IPs originating within Azure through the - * firewall. If the firewall is disabled, this is not enforced. Possible values - * include: 'Enabled', 'Disabled' + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {array} [options.parameters.firewallRules] The list of firewall rules - * associated with this Data Lake Analytics account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {number} [options.parameters.maxDegreeOfParallelismPerJob] the - * maximum supported degree of parallelism per job for this account. + * @param {string} firewallRuleName The name of the firewall rule to update. * - * @param {number} [options.parameters.minPriorityPerJob] the minimum supported - * priority per job for this account. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.parameters] Parameters supplied to update the + * firewall rule. * - * @param {array} [options.parameters.computePolicies] the list of existing - * compute policies to update in this account. + * @param {string} [options.parameters.startIpAddress] The start IP address for + * the firewall rule. This can be either ipv4 or ipv6. Start and End should be + * in the same protocol. + * + * @param {string} [options.parameters.endIpAddress] The end IP address for the + * firewall rule. This can be either ipv4 or ipv6. Start and End should be in + * the same protocol. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3140,7 +3188,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccount} - The deserialized result object. + * @resolve {FirewallRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3148,28 +3196,27 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccount} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccount} for more - * information. + * {FirewallRule} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(resourceGroupName: string, accountName: string, options?: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, accountName: string, options: { parameters? : models.DataLakeAnalyticsAccountUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { parameters? : models.UpdateFirewallRuleParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Begins the delete process for the Data Lake Analytics account object - * specified by the account name. + * Deletes the specified firewall rule from the specified Data Lake Analytics + * account * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * delete + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to delete. * * @param {object} [options] Optional Parameters. * @@ -3182,17 +3229,17 @@ export interface Account { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Begins the delete process for the Data Lake Analytics account object - * specified by the account name. + * Deletes the specified firewall rule from the specified Data Lake Analytics + * account * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * delete + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {string} firewallRuleName The name of the firewall rule to delete. * * @param {object} [options] Optional Parameters. * @@ -3220,14 +3267,14 @@ export interface Account { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the first page of Data Lake Analytics accounts, if any, within a - * specific resource group. This includes a link to the next page, if any. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -3239,15 +3286,15 @@ export interface Account { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Analytics accounts, if any, within a - * specific resource group. This includes a link to the next page, if any. + * Lists the Data Lake Analytics firewall rules within the specified Data Lake + * Analytics account. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -3264,7 +3311,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. + * @resolve {FirewallRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3272,25 +3319,93 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccountListResult} for more + * {FirewallRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link FirewallRuleListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataLakeAnalyticsAccountManagementClient. + */ +export interface Operations { /** - * Gets the first page of Data Lake Analytics accounts, if any, within the - * current subscription. This includes a link to the next page, if any. + * Lists all of the available Data Lake Analytics REST API operations. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Locations + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataLakeAnalyticsAccountManagementClient. + */ +export interface Locations { + + + /** + * Gets subscription-level properties and limits for Data Lake Analytics + * specified by resource location. + * + * @param {string} location The resource location without whitespace. * * @param {object} [options] Optional Parameters. * @@ -3299,18 +3414,17 @@ export interface Account { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getCapabilityWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the first page of Data Lake Analytics accounts, if any, within the - * current subscription. This includes a link to the next page, if any. + * Gets subscription-level properties and limits for Data Lake Analytics + * specified by resource location. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} location The resource location without whitespace. * * @param {object} [options] Optional Parameters. * @@ -3324,7 +3438,7 @@ export interface Account { * * {Promise} A promise is returned. * - * @resolve {DataLakeAnalyticsAccountListResult} - The deserialized result object. + * @resolve {CapabilityInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3332,15 +3446,14 @@ export interface Account { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DataLakeAnalyticsAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DataLakeAnalyticsAccountListResult} for more - * information. + * {CapabilityInformation} [result] - The deserialized result object if an error did not occur. + * See {@link CapabilityInformation} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getCapability(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getCapability(location: string, callback: ServiceCallback): void; + getCapability(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/dataLake.Analytics/lib/account/operations/index.js b/lib/services/dataLake.Analytics/lib/account/operations/index.js index 0d811f382c..23d637efd5 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/index.js +++ b/lib/services/dataLake.Analytics/lib/account/operations/index.js @@ -14,8 +14,10 @@ 'use strict'; +exports.Accounts = require('./accounts'); +exports.DataLakeStoreAccounts = require('./dataLakeStoreAccounts'); +exports.StorageAccounts = require('./storageAccounts'); exports.ComputePolicies = require('./computePolicies'); exports.FirewallRules = require('./firewallRules'); -exports.StorageAccounts = require('./storageAccounts'); -exports.DataLakeStoreAccounts = require('./dataLakeStoreAccounts'); -exports.Account = require('./account'); +exports.Operations = require('./operations'); +exports.Locations = require('./locations'); diff --git a/lib/services/dataLake.Analytics/lib/account/operations/locations.js b/lib/services/dataLake.Analytics/lib/account/operations/locations.js new file mode 100644 index 0000000000..ac4745b26b --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/operations/locations.js @@ -0,0 +1,254 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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; + +/** + * Gets subscription-level properties and limits for Data Lake Analytics + * specified by resource location. + * + * @param {string} location The resource location without whitespace. + * + * @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 CapabilityInformation} 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 _getCapability(location, 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 (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 (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.DataLakeAnalytics/locations/{location}/capability'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['CapabilityInformation']().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 Locations. */ +class Locations { + /** + * Create a Locations. + * @param {DataLakeAnalyticsAccountManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getCapability = _getCapability; + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics + * specified by resource location. + * + * @param {string} location The resource location without whitespace. + * + * @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. + */ + getCapabilityWithHttpOperationResponse(location, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getCapability(location, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets subscription-level properties and limits for Data Lake Analytics + * specified by resource location. + * + * @param {string} location The resource location without whitespace. + * + * @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 {CapabilityInformation} - 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 CapabilityInformation} 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. + */ + getCapability(location, 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._getCapability(location, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getCapability(location, options, optionalCallback); + } + } + +} + +module.exports = Locations; diff --git a/lib/services/dataLake.Analytics/lib/account/operations/operations.js b/lib/services/dataLake.Analytics/lib/account/operations/operations.js new file mode 100644 index 0000000000..d0c68186e1 --- /dev/null +++ b/lib/services/dataLake.Analytics/lib/account/operations/operations.js @@ -0,0 +1,237 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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; + +/** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @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 OperationListResult} 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.'); + } + // Validate + try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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('/') ? '' : '/') + 'providers/Microsoft.DataLakeAnalytics/operations'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.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['OperationListResult']().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 Operations. */ +class Operations { + /** + * Create a Operations. + * @param {DataLakeAnalyticsAccountManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @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; + }); + }); + } + + /** + * Lists all of the available Data Lake Analytics REST API operations. + * + * @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 {OperationListResult} - 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 OperationListResult} 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); + } + } + +} + +module.exports = Operations; diff --git a/lib/services/dataLake.Analytics/lib/account/operations/storageAccounts.js b/lib/services/dataLake.Analytics/lib/account/operations/storageAccounts.js index 5b11c14056..57a3456a82 100644 --- a/lib/services/dataLake.Analytics/lib/account/operations/storageAccounts.js +++ b/lib/services/dataLake.Analytics/lib/account/operations/storageAccounts.js @@ -15,28 +15,35 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Updates the specified Data Lake Analytics account to add an Azure Storage - * account. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * add + * @param {object} [options] Optional Parameters. * - * @param {object} parameters The parameters containing the access key and - * optional suffix for the Azure Storage Account. + * @param {string} [options.filter] The OData filter. Optional. * - * @param {string} parameters.accessKey the access key associated with this - * Azure Storage account that will be used to connect to it. + * @param {number} [options.top] The number of items to return. Optional. * - * @param {string} [parameters.suffix] the optional suffix for the storage - * account. + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -47,13 +54,15 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformationListResult} 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 _add(resourceGroupName, accountName, storageAccountName, parameters, options, callback) { +function _listByAccount(resourceGroupName, accountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -63,26 +72,56 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let skip = (options && options.skip !== undefined) ? options.skip : undefined; + let select = (options && options.select !== undefined) ? options.select : undefined; + let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; + let count = (options && options.count !== undefined) ? options.count : undefined; // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName cannot be null or undefined and it must be of type string.'); } - if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { - throw new Error('storageAccountName 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 (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (top !== null && top !== undefined) { + if (top < 1) + { + throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (skip !== null && skip !== undefined) { + if (skip < 1) + { + throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { + throw new Error('select must be of type string.'); + } + if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { + throw new Error('orderby must be of type string.'); + } + if (count !== null && count !== undefined && typeof count !== 'boolean') { + throw new Error('count must be of type boolean.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -92,12 +131,29 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); + } + if (select !== null && select !== undefined) { + queryParameters.push('$select=' + encodeURIComponent(select)); + } + if (orderby !== null && orderby !== undefined) { + queryParameters.push('$orderby=' + encodeURIComponent(orderby)); + } + if (count !== null && count !== undefined) { + queryParameters.push('$count=' + encodeURIComponent(count.toString())); + } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -105,7 +161,7 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -123,21 +179,7 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['AddStorageAccountParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -172,35 +214,49 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op // 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['StorageAccountInformationListResult']().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); }); } /** - * Updates the Data Lake Analytics account to replace Azure Storage blob - * account details, such as the access key and/or suffix. + * Updates the specified Data Lake Analytics account to add an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * modify storage accounts in + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The Azure Storage account to modify + * @param {string} storageAccountName The name of the Azure Storage account to + * add * - * @param {object} [options] Optional Parameters. + * @param {object} parameters The parameters containing the access key and + * optional suffix for the Azure Storage Account. * - * @param {object} [options.parameters] The parameters containing the access - * key and suffix to update the storage account with, if any. Passing nothing - * results in no change. + * @param {string} parameters.accessKey The access key associated with this + * Azure Storage account that will be used to connect to it. * - * @param {string} [options.parameters.accessKey] the updated access key - * associated with this Azure Storage account that will be used to connect to - * it. + * @param {string} [parameters.suffix] The optional suffix for the storage + * account. * - * @param {string} [options.parameters.suffix] the optional suffix for the - * storage account. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -217,7 +273,7 @@ function _add(resourceGroupName, accountName, storageAccountName, parameters, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, accountName, storageAccountName, options, callback) { +function _add(resourceGroupName, accountName, storageAccountName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -227,9 +283,11 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -239,12 +297,12 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -254,11 +312,11 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -267,7 +325,7 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -290,7 +348,7 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['UpdateStorageAccountParameters']().mapper(); + let requestModelMapper = new client.models['AddStorageAccountParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -340,17 +398,15 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca } /** - * Updates the specified Data Lake Analytics account to remove an Azure Storage - * account. + * Gets the specified Azure Storage account linked to the given Data Lake + * Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * remove + * @param {string} storageAccountName The name of the Azure Storage account for + * which to retrieve the details. * * @param {object} [options] Optional Parameters. * @@ -363,13 +419,15 @@ function _update(resourceGroupName, accountName, storageAccountName, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformation} 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 _deleteMethod(resourceGroupName, accountName, storageAccountName, options, callback) { +function _get(resourceGroupName, accountName, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -381,6 +439,9 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -393,9 +454,6 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -405,11 +463,11 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -418,7 +476,7 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -471,26 +529,51 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio // 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['StorageAccountInformation']().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); }); } /** - * Gets the specified Azure Storage account linked to the given Data Lake - * Analytics account. + * Updates the Data Lake Analytics account to replace Azure Storage blob + * account details, such as the access key and/or suffix. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve Azure storage account details. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account for - * which to retrieve the details. + * @param {string} storageAccountName The Azure Storage account to modify * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The parameters containing the access + * key and suffix to update the storage account with, if any. Passing nothing + * results in no change. + * + * @param {string} [options.parameters.accessKey] The updated access key + * associated with this Azure Storage account that will be used to connect to + * it. + * + * @param {string} [options.parameters.suffix] The optional suffix for the + * storage account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -500,14 +583,13 @@ function _deleteMethod(resourceGroupName, accountName, storageAccountName, optio * * {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 StorageAccountInfo} for more information. + * {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 _get(resourceGroupName, accountName, storageAccountName, options, callback) { +function _update(resourceGroupName, accountName, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -517,8 +599,12 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb if (!callback) { throw new Error('callback cannot be null.'); } + let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -531,9 +617,6 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -543,11 +626,11 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -556,7 +639,7 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -574,7 +657,21 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['UpdateStorageAccountParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -609,43 +706,21 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb // 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['StorageAccountInfo']().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); }); } /** - * Gets the specified Azure Storage container associated with the given Data - * Lake Analytics and Azure Storage accounts. + * Updates the specified Data Lake Analytics account to remove an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to retrieve blob container. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure storage account - * from which to retrieve the blob container. - * - * @param {string} containerName The name of the Azure storage container to - * retrieve + * @param {string} storageAccountName The name of the Azure Storage account to + * remove * * @param {object} [options] Optional Parameters. * @@ -658,14 +733,13 @@ function _get(resourceGroupName, accountName, storageAccountName, options, callb * * {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 StorageContainer} for more information. + * {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 _getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, storageAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -677,6 +751,9 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -686,15 +763,9 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); } - if (containerName === null || containerName === undefined || typeof containerName.valueOf() !== 'string') { - throw new Error('containerName cannot be null or undefined and it must be of type string.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -704,12 +775,11 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{containerName}', encodeURIComponent(containerName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -718,7 +788,7 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -771,23 +841,6 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName // 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['StorageContainer']().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); }); @@ -798,11 +851,9 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName * Data Lake Analytics and Azure Storage account combination. The response * includes a link to the next page of results, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage blob containers. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account * from which to list blob containers. @@ -819,7 +870,7 @@ function _getStorageContainer(resourceGroupName, accountName, storageAccountName * {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 ListStorageContainersResult} for more + * See {@link StorageContainerListResult} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -838,6 +889,9 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -850,9 +904,6 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -862,11 +913,11 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -935,7 +986,7 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListStorageContainersResult']().mapper(); + let resultMapper = new client.models['StorageContainerListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -951,20 +1002,18 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa } /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Gets the specified Azure Storage container associated with the given Data + * Lake Analytics and Azure Storage accounts. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which an Azure Storage account's SAS token is being requested. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure storage account for - * which the SAS token is being requested. + * @param {string} storageAccountName The name of the Azure storage account + * from which to retrieve the blob container. * - * @param {string} containerName The name of the Azure storage container for - * which the SAS token is being requested. + * @param {string} containerName The name of the Azure storage container to + * retrieve * * @param {object} [options] Optional Parameters. * @@ -978,13 +1027,13 @@ function _listStorageContainers(resourceGroupName, accountName, storageAccountNa * {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 ListSasTokensResult} for more information. + * See {@link StorageContainer} 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 _listSasTokens(resourceGroupName, accountName, storageAccountName, containerName, options, callback) { +function _getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -996,6 +1045,9 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } @@ -1011,9 +1063,6 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.'); } @@ -1023,12 +1072,12 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); requestUrl = requestUrl.replace('{containerName}', encodeURIComponent(containerName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -1037,7 +1086,7 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1097,7 +1146,7 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListSasTokensResult']().mapper(); + let resultMapper = new client.models['StorageContainer']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1113,37 +1162,20 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont } /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. - * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage accounts. - * - * @param {object} [options] Optional Parameters. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * - * @param {string} [options.filter] The OData filter. Optional. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. + * @param {string} storageAccountName The name of the Azure storage account for + * which the SAS token is being requested. * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. + * @param {string} containerName The name of the Azure storage container for + * which the SAS token is being requested. * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1155,15 +1187,14 @@ function _listSasTokens(resourceGroupName, accountName, storageAccountName, cont * {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 - * DataLakeAnalyticsAccountListStorageAccountsResult} for - * more information. + * See {@link SasTokenInformationListResult} 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 _listByAccount(resourceGroupName, accountName, options, callback) { +function _listSasTokens(resourceGroupName, accountName, storageAccountName, containerName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1173,88 +1204,42 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let top = (options && options.top !== undefined) ? options.top : undefined; - let skip = (options && options.skip !== undefined) ? options.skip : undefined; - let select = (options && options.select !== undefined) ? options.select : undefined; - let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let count = (options && options.count !== undefined) ? options.count : undefined; // 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 (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 (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { throw new Error('accountName 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 (top !== null && top !== undefined && typeof top !== 'number') { - throw new Error('top must be of type number.'); - } - if (top !== null && top !== undefined) { - if (top < 1) - { - throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } - if (skip !== null && skip !== undefined) { - if (skip < 1) - { - throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - if (select !== null && select !== undefined && typeof select.valueOf() !== 'string') { - throw new Error('select must be of type string.'); - } - if (orderby !== null && orderby !== undefined && typeof orderby.valueOf() !== 'string') { - throw new Error('orderby must be of type string.'); + if (storageAccountName === null || storageAccountName === undefined || typeof storageAccountName.valueOf() !== 'string') { + throw new Error('storageAccountName cannot be null or undefined and it must be of type string.'); } - if (count !== null && count !== undefined && typeof count !== 'boolean') { - throw new Error('count must be of type boolean.'); + if (containerName === null || containerName === undefined || typeof containerName.valueOf() !== 'string') { + throw new Error('containerName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion 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.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - if (filter !== null && filter !== undefined) { - queryParameters.push('$filter=' + encodeURIComponent(filter)); - } - if (top !== null && top !== undefined) { - queryParameters.push('$top=' + encodeURIComponent(top.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('$skip=' + encodeURIComponent(skip.toString())); - } - if (select !== null && select !== undefined) { - queryParameters.push('$select=' + encodeURIComponent(select)); - } - if (orderby !== null && orderby !== undefined) { - queryParameters.push('$orderby=' + encodeURIComponent(orderby)); - } - if (count !== null && count !== undefined) { - queryParameters.push('$count=' + encodeURIComponent(count.toString())); + 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.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{storageAccountName}', encodeURIComponent(storageAccountName)); + requestUrl = requestUrl.replace('{containerName}', encodeURIComponent(containerName)); + let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1262,7 +1247,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1322,7 +1307,7 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DataLakeAnalyticsAccountListStorageAccountsResult']().mapper(); + let resultMapper = new client.models['SasTokenInformationListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1338,9 +1323,9 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { } /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1357,14 +1342,14 @@ function _listByAccount(resourceGroupName, accountName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ListStorageContainersResult} for more - * information. + * See {@link StorageAccountInformationListResult} 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 _listStorageContainersNext(nextPageLink, options, callback) { +function _listByAccountNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1452,7 +1437,7 @@ function _listStorageContainersNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListStorageContainersResult']().mapper(); + let resultMapper = new client.models['StorageAccountInformationListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1468,8 +1453,9 @@ function _listStorageContainersNext(nextPageLink, options, callback) { } /** - * Gets the SAS token associated with the specified Data Lake Analytics and - * Azure Storage account and container combination. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1486,13 +1472,14 @@ function _listStorageContainersNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ListSasTokensResult} for more information. + * See {@link StorageContainerListResult} 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 _listSasTokensNext(nextPageLink, options, callback) { +function _listStorageContainersNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1520,7 +1507,7 @@ function _listSasTokensNext(nextPageLink, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1580,7 +1567,7 @@ function _listSasTokensNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListSasTokensResult']().mapper(); + let resultMapper = new client.models['StorageContainerListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1596,9 +1583,8 @@ function _listSasTokensNext(nextPageLink, options, callback) { } /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. + * Gets the SAS token associated with the specified Data Lake Analytics and + * Azure Storage account and container combination. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1615,15 +1601,14 @@ function _listSasTokensNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link - * DataLakeAnalyticsAccountListStorageAccountsResult} for - * more information. + * See {@link SasTokenInformationListResult} 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 _listByAccountNext(nextPageLink, options, callback) { +function _listSasTokensNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1651,7 +1636,7 @@ function _listByAccountNext(nextPageLink, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1711,7 +1696,7 @@ function _listByAccountNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DataLakeAnalyticsAccountListStorageAccountsResult']().mapper(); + let resultMapper = new client.models['SasTokenInformationListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1734,28 +1719,157 @@ class StorageAccounts { */ constructor(client) { this.client = client; + this._listByAccount = _listByAccount; this._add = _add; + this._get = _get; this._update = _update; this._deleteMethod = _deleteMethod; - this._get = _get; - this._getStorageContainer = _getStorageContainer; this._listStorageContainers = _listStorageContainers; + this._getStorageContainer = _getStorageContainer; this._listSasTokens = _listSasTokens; - this._listByAccount = _listByAccount; + this._listByAccountNext = _listByAccountNext; this._listStorageContainersNext = _listStorageContainersNext; this._listSasTokensNext = _listSasTokensNext; - this._listByAccountNext = _listByAccountNext; + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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. + */ + listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the first page of Azure Storage accounts, if any, linked to the + * specified Data Lake Analytics account. The response includes a link to the + * next page, if any. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The OData filter. Optional. + * + * @param {number} [options.top] The number of items to return. Optional. + * + * @param {number} [options.skip] The number of items to skip over before + * returning elements. Optional. + * + * @param {string} [options.select] OData Select statement. Limits the + * properties on each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + * + * @param {string} [options.orderby] OrderBy clause. One or more + * comma-separated expressions with an optional "asc" (the default) or "desc" + * depending on the order you'd like the values sorted, e.g. + * Categories?$orderby=CategoryName desc. Optional. + * + * @param {boolean} [options.count] The Boolean value of true or false to + * request a count of the matching resources included with the resources in the + * response, e.g. Categories?$count=true. Optional. + * + * @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 {StorageAccountInformationListResult} - 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 StorageAccountInformationListResult} 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. + */ + listByAccount(resourceGroupName, accountName, 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._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); + } } /** * Updates the specified Data Lake Analytics account to add an Azure Storage * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure Storage account to * add @@ -1763,10 +1877,10 @@ class StorageAccounts { * @param {object} parameters The parameters containing the access key and * optional suffix for the Azure Storage Account. * - * @param {string} parameters.accessKey the access key associated with this + * @param {string} parameters.accessKey The access key associated with this * Azure Storage account that will be used to connect to it. * - * @param {string} [parameters.suffix] the optional suffix for the storage + * @param {string} [parameters.suffix] The optional suffix for the storage * account. * * @param {object} [options] Optional Parameters. @@ -1798,11 +1912,9 @@ class StorageAccounts { * Updates the specified Data Lake Analytics account to add an Azure Storage * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * which to add the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure Storage account to * add @@ -1810,10 +1922,10 @@ class StorageAccounts { * @param {object} parameters The parameters containing the access key and * optional suffix for the Azure Storage Account. * - * @param {string} parameters.accessKey the access key associated with this + * @param {string} parameters.accessKey The access key associated with this * Azure Storage account that will be used to connect to it. * - * @param {string} [parameters.suffix] the optional suffix for the storage + * @param {string} [parameters.suffix] The optional suffix for the storage * account. * * @param {object} [options] Optional Parameters. @@ -1863,44 +1975,32 @@ class StorageAccounts { } /** - * Updates the Data Lake Analytics account to replace Azure Storage blob - * account details, such as the access key and/or suffix. + * Gets the specified Azure Storage account linked to the given Data Lake + * Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * modify storage accounts in + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The Azure Storage account to modify + * @param {string} storageAccountName The name of the Azure Storage account for + * which to retrieve the details. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The parameters containing the access - * key and suffix to update the storage account with, if any. Passing nothing - * results in no change. - * - * @param {string} [options.parameters.accessKey] the updated access key - * associated with this Azure Storage account that will be used to connect to - * it. - * - * @param {string} [options.parameters.suffix] the optional suffix for the - * storage account. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1911,30 +2011,18 @@ class StorageAccounts { } /** - * Updates the Data Lake Analytics account to replace Azure Storage blob - * account details, such as the access key and/or suffix. + * Gets the specified Azure Storage account linked to the given Data Lake + * Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account to - * modify storage accounts in + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The Azure Storage account to modify + * @param {string} storageAccountName The name of the Azure Storage account for + * which to retrieve the details. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The parameters containing the access - * key and suffix to update the storage account with, if any. Passing nothing - * results in no change. - * - * @param {string} [options.parameters.accessKey] the updated access key - * associated with this Azure Storage account that will be used to connect to - * it. - * - * @param {string} [options.parameters.suffix] the optional suffix for the - * storage account. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1945,7 +2033,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {StorageAccountInformation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1953,13 +2041,15 @@ class StorageAccounts { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link StorageAccountInformation} 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, accountName, storageAccountName, options, optionalCallback) { + get(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1968,32 +2058,40 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, accountName, storageAccountName, options, optionalCallback); + return self._get(resourceGroupName, accountName, storageAccountName, options, optionalCallback); } } /** - * Updates the specified Data Lake Analytics account to remove an Azure Storage - * account. + * Updates the Data Lake Analytics account to replace Azure Storage blob + * account details, such as the access key and/or suffix. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Azure Storage account. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account to - * remove + * @param {string} storageAccountName The Azure Storage account to modify * * @param {object} [options] Optional Parameters. * + * @param {object} [options.parameters] The parameters containing the access + * key and suffix to update the storage account with, if any. Passing nothing + * results in no change. + * + * @param {string} [options.parameters.accessKey] The updated access key + * associated with this Azure Storage account that will be used to connect to + * it. + * + * @param {string} [options.parameters.suffix] The optional suffix for the + * storage account. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2003,11 +2101,11 @@ class StorageAccounts { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { + updateWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2018,19 +2116,27 @@ class StorageAccounts { } /** - * Updates the specified Data Lake Analytics account to remove an Azure Storage - * account. + * Updates the Data Lake Analytics account to replace Azure Storage blob + * account details, such as the access key and/or suffix. + * + * @param {string} resourceGroupName The name of the Azure resource group. + * + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} storageAccountName The Azure Storage account to modify + * + * @param {object} [options] Optional Parameters. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to remove the Azure Storage account. + * @param {object} [options.parameters] The parameters containing the access + * key and suffix to update the storage account with, if any. Passing nothing + * results in no change. * - * @param {string} storageAccountName The name of the Azure Storage account to - * remove + * @param {string} [options.parameters.accessKey] The updated access key + * associated with this Azure Storage account that will be used to connect to + * it. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.parameters.suffix] The optional suffix for the + * storage account. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2056,7 +2162,7 @@ class StorageAccounts { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { + update(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2065,29 +2171,27 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, optionalCallback); + return self._update(resourceGroupName, accountName, storageAccountName, options, optionalCallback); } } /** - * Gets the specified Azure Storage account linked to the given Data Lake - * Analytics account. + * Updates the specified Data Lake Analytics account to remove an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve Azure storage account details. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account for - * which to retrieve the details. + * @param {string} storageAccountName The name of the Azure Storage account to + * remove * * @param {object} [options] Optional Parameters. * @@ -2096,15 +2200,15 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2115,17 +2219,15 @@ class StorageAccounts { } /** - * Gets the specified Azure Storage account linked to the given Data Lake - * Analytics account. + * Updates the specified Data Lake Analytics account to remove an Azure Storage + * account. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which to retrieve Azure storage account details. + * @param {string} accountName The name of the Data Lake Analytics account. * - * @param {string} storageAccountName The name of the Azure Storage account for - * which to retrieve the details. + * @param {string} storageAccountName The name of the Azure Storage account to + * remove * * @param {object} [options] Optional Parameters. * @@ -2139,7 +2241,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {StorageAccountInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2147,14 +2249,13 @@ class StorageAccounts { * * {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 StorageAccountInfo} for more information. + * {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. */ - get(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2163,32 +2264,28 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, accountName, storageAccountName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, storageAccountName, options, optionalCallback); } } /** - * Gets the specified Azure Storage container associated with the given Data - * Lake Analytics and Azure Storage accounts. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to retrieve blob container. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account - * from which to retrieve the blob container. - * - * @param {string} containerName The name of the Azure storage container to - * retrieve + * from which to list blob containers. * * @param {object} [options] Optional Parameters. * @@ -2197,15 +2294,15 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getStorageContainerWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, containerName, options) { + listStorageContainersWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, (err, result, request, response) => { + self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2216,20 +2313,16 @@ class StorageAccounts { } /** - * Gets the specified Azure Storage container associated with the given Data - * Lake Analytics and Azure Storage accounts. + * Lists the Azure Storage containers, if any, associated with the specified + * Data Lake Analytics and Azure Storage account combination. The response + * includes a link to the next page of results, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to retrieve blob container. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account - * from which to retrieve the blob container. - * - * @param {string} containerName The name of the Azure storage container to - * retrieve + * from which to list blob containers. * * @param {object} [options] Optional Parameters. * @@ -2243,7 +2336,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {StorageContainer} - The deserialized result object. + * @resolve {StorageContainerListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2252,13 +2345,14 @@ class StorageAccounts { * {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 StorageContainer} for more information. + * See {@link StorageContainerListResult} 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. */ - getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, optionalCallback) { + listStorageContainers(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2267,30 +2361,30 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, (err, result, request, response) => { + self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, optionalCallback); + return self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, optionalCallback); } } /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. + * Gets the specified Azure Storage container associated with the given Data + * Lake Analytics and Azure Storage accounts. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage blob containers. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account - * from which to list blob containers. + * from which to retrieve the blob container. + * + * @param {string} containerName The name of the Azure storage container to + * retrieve * * @param {object} [options] Optional Parameters. * @@ -2299,15 +2393,15 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listStorageContainersWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, options) { + getStorageContainerWithHttpOperationResponse(resourceGroupName, accountName, storageAccountName, containerName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2318,18 +2412,18 @@ class StorageAccounts { } /** - * Lists the Azure Storage containers, if any, associated with the specified - * Data Lake Analytics and Azure Storage account combination. The response - * includes a link to the next page of results, if any. + * Gets the specified Azure Storage container associated with the given Data + * Lake Analytics and Azure Storage accounts. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage blob containers. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account - * from which to list blob containers. + * from which to retrieve the blob container. + * + * @param {string} containerName The name of the Azure storage container to + * retrieve * * @param {object} [options] Optional Parameters. * @@ -2343,7 +2437,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {ListStorageContainersResult} - The deserialized result object. + * @resolve {StorageContainer} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2352,14 +2446,13 @@ class StorageAccounts { * {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 ListStorageContainersResult} for more - * information. + * See {@link StorageContainer} 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. */ - listStorageContainers(resourceGroupName, accountName, storageAccountName, options, optionalCallback) { + getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2368,14 +2461,14 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, (err, result, request, response) => { + self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listStorageContainers(resourceGroupName, accountName, storageAccountName, options, optionalCallback); + return self._getStorageContainer(resourceGroupName, accountName, storageAccountName, containerName, options, optionalCallback); } } @@ -2383,11 +2476,9 @@ class StorageAccounts { * Gets the SAS token associated with the specified Data Lake Analytics and * Azure Storage account and container combination. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which an Azure Storage account's SAS token is being requested. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account for * which the SAS token is being requested. @@ -2402,7 +2493,7 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2424,11 +2515,9 @@ class StorageAccounts { * Gets the SAS token associated with the specified Data Lake Analytics and * Azure Storage account and container combination. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. + * @param {string} resourceGroupName The name of the Azure resource group. * - * @param {string} accountName The name of the Data Lake Analytics account from - * which an Azure Storage account's SAS token is being requested. + * @param {string} accountName The name of the Data Lake Analytics account. * * @param {string} storageAccountName The name of the Azure storage account for * which the SAS token is being requested. @@ -2448,7 +2537,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {ListSasTokensResult} - The deserialized result object. + * @resolve {SasTokenInformationListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2457,7 +2546,8 @@ class StorageAccounts { * {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 ListSasTokensResult} for more information. + * See {@link SasTokenInformationListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2488,48 +2578,25 @@ class StorageAccounts { * specified Data Lake Analytics account. The response includes a link to the * next page, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage accounts. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. - * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. - * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. - * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByAccountWithHttpOperationResponse(resourceGroupName, accountName, options) { + listByAccountNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._listByAccountNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2544,34 +2611,11 @@ class StorageAccounts { * specified Data Lake Analytics account. The response includes a link to the * next page, if any. * - * @param {string} resourceGroupName The name of the Azure resource group that - * contains the Data Lake Analytics account. - * - * @param {string} accountName The name of the Data Lake Analytics account for - * which to list Azure Storage accounts. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The OData filter. Optional. - * - * @param {number} [options.top] The number of items to return. Optional. - * - * @param {number} [options.skip] The number of items to skip over before - * returning elements. Optional. - * - * @param {string} [options.select] OData Select statement. Limits the - * properties on each entry to just those requested, e.g. - * Categories?$select=CategoryName,Description. Optional. - * - * @param {string} [options.orderby] OrderBy clause. One or more - * comma-separated expressions with an optional "asc" (the default) or "desc" - * depending on the order you'd like the values sorted, e.g. - * Categories?$orderby=CategoryName desc. Optional. - * - * @param {boolean} [options.count] The Boolean value of true or false to - * request a count of the matching resources included with the resources in the - * response, e.g. Categories?$count=true. Optional. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2582,7 +2626,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {DataLakeAnalyticsAccountListStorageAccountsResult} - The deserialized result object. + * @resolve {StorageAccountInformationListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2591,15 +2635,14 @@ class StorageAccounts { * {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 - * DataLakeAnalyticsAccountListStorageAccountsResult} for + * See {@link StorageAccountInformationListResult} 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. */ - listByAccount(resourceGroupName, accountName, options, optionalCallback) { + listByAccountNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2608,14 +2651,14 @@ class StorageAccounts { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAccount(resourceGroupName, accountName, options, (err, result, request, response) => { + self._listByAccountNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAccount(resourceGroupName, accountName, options, optionalCallback); + return self._listByAccountNext(nextPageLink, options, optionalCallback); } } @@ -2634,7 +2677,7 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2672,7 +2715,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {ListStorageContainersResult} - The deserialized result object. + * @resolve {StorageContainerListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2681,7 +2724,7 @@ class StorageAccounts { * {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 ListStorageContainersResult} for more + * See {@link StorageContainerListResult} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -2722,7 +2765,7 @@ class StorageAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2759,7 +2802,7 @@ class StorageAccounts { * * {Promise} A promise is returned * - * @resolve {ListSasTokensResult} - The deserialized result object. + * @resolve {SasTokenInformationListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2768,7 +2811,8 @@ class StorageAccounts { * {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 ListSasTokensResult} for more information. + * See {@link SasTokenInformationListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2794,96 +2838,6 @@ class StorageAccounts { } } - /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. - * - * @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. - */ - listByAccountNextWithHttpOperationResponse(nextPageLink, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listByAccountNext(nextPageLink, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Gets the first page of Azure Storage accounts, if any, linked to the - * specified Data Lake Analytics account. The response includes a link to the - * next page, if any. - * - * @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 {DataLakeAnalyticsAccountListStorageAccountsResult} - 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 - * DataLakeAnalyticsAccountListStorageAccountsResult} 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. - */ - listByAccountNext(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._listByAccountNext(nextPageLink, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listByAccountNext(nextPageLink, options, optionalCallback); - } - } - } module.exports = StorageAccounts;