diff --git a/packages/@azure/arm-datalake-store/.npmignore b/packages/@azure/arm-datalake-store/.npmignore new file mode 100644 index 000000000000..a07a455ac10c --- /dev/null +++ b/packages/@azure/arm-datalake-store/.npmignore @@ -0,0 +1,35 @@ +#git +.git +.gitignore +#gulp +gulpfile.js +#documentation +doc/ +docs/ +#dependencies +node_modules/ +#samples +sample/ +samples/ +#tests +test/ +tests/ +coverage/ +#tools and scripts +tools/ +scripts/ +#IDE settings +*.sln +.vscode/ +.idea +.editorconfig +.ntvs_analysis.* +#build tools +.travis.yml +.jenkins.yml +.codeclimate.yml +appveyor.yml +# Nuget packages # +.nuget/ +packages/ +packages.config diff --git a/packages/@azure/arm-datalake-store/LICENSE.txt b/packages/@azure/arm-datalake-store/LICENSE.txt new file mode 100644 index 000000000000..5431ba98b936 --- /dev/null +++ b/packages/@azure/arm-datalake-store/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-datalake-store/README.md b/packages/@azure/arm-datalake-store/README.md new file mode 100644 index 000000000000..cc19f88327ff --- /dev/null +++ b/packages/@azure/arm-datalake-store/README.md @@ -0,0 +1,79 @@ +# Azure DataLakeStoreAccountManagementClient SDK for JavaScript +This package contains an isomorphic SDK for DataLakeStoreAccountManagementClient. + +## Currently supported environments +- Node.js version 6.x.x or higher +- Browser JavaScript + +## How to Install +``` +npm install @azure/arm-datalake-store +``` + + +## How to use + +### nodejs - Authentication, client creation and list accounts as an example written in TypeScript. + +```ts +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as msRestNodeAuth from "ms-rest-nodeauth"; +import { DataLakeStoreAccountManagementClient, DataLakeStoreAccountManagementModels, DataLakeStoreAccountManagementMappers } from "@azure/arm-datalake-store"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new DataLakeStoreAccountManagementClient(creds, subscriptionId); + const filter = "testfilter"; + const top = 1; + const skip = 1; + const select = "testselect"; + const orderby = "testorderby"; + const count = true; + client.accounts.list(filter, top, skip, select, orderby, count).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +### browser - Authentication, client creation and list accounts as an example written in JavaScript. + +- index.html +```html + + + + @azure/arm-datalake-store sample + + + + + + + + +``` + +# Related projects + - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClient.ts b/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClient.ts new file mode 100644 index 000000000000..4b7b31234dd8 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClient.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { DataLakeStoreAccountManagementClientContext } from "./dataLakeStoreAccountManagementClientContext"; + + +class DataLakeStoreAccountManagementClient extends DataLakeStoreAccountManagementClientContext { + // Operation groups + accounts: operations.Accounts; + firewallRules: operations.FirewallRules; + virtualNetworkRules: operations.VirtualNetworkRules; + trustedIdProviders: operations.TrustedIdProviders; + operations: operations.Operations; + locations: operations.Locations; + + /** + * Initializes a new instance of the DataLakeStoreAccountManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataLakeStoreAccountManagementClientOptions) { + super(credentials, subscriptionId, options); + this.accounts = new operations.Accounts(this); + this.firewallRules = new operations.FirewallRules(this); + this.virtualNetworkRules = new operations.VirtualNetworkRules(this); + this.trustedIdProviders = new operations.TrustedIdProviders(this); + this.operations = new operations.Operations(this); + this.locations = new operations.Locations(this); + } +} + +// Operation Specifications + +export { + DataLakeStoreAccountManagementClient, + DataLakeStoreAccountManagementClientContext, + Models as DataLakeStoreAccountManagementModels, + Mappers as DataLakeStoreAccountManagementMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClientContext.ts b/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClientContext.ts new file mode 100644 index 000000000000..13ef8256f0ac --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/dataLakeStoreAccountManagementClientContext.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; + +const packageName = "@azure/arm-datalake-store"; +const packageVersion = "1.0.0"; + +export class DataLakeStoreAccountManagementClientContext extends msRestAzure.AzureServiceClient { + + credentials: msRest.ServiceClientCredentials; + + subscriptionId: string; + + apiVersion: string; + + acceptLanguage: string; + + longRunningOperationRetryTimeout: number; + + /** + * Initializes a new instance of the DataLakeStoreAccountManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataLakeStoreAccountManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + super(credentials, options); + + this.apiVersion = '2016-11-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + this.addUserAgentInfo(`${packageName}/${packageVersion}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-datalake-store/lib/account/models/accountsMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/accountsMappers.ts new file mode 100644 index 000000000000..0eba91ddf553 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/accountsMappers.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DataLakeStoreAccountListResult, + DataLakeStoreAccountBasic, + Resource, + BaseResource, + CloudError, + CreateDataLakeStoreAccountParameters, + EncryptionIdentity, + EncryptionConfig, + KeyVaultMetaInfo, + CreateFirewallRuleWithAccountParameters, + CreateVirtualNetworkRuleWithAccountParameters, + CreateTrustedIdProviderWithAccountParameters, + DataLakeStoreAccount, + FirewallRule, + SubResource, + VirtualNetworkRule, + TrustedIdProvider, + UpdateDataLakeStoreAccountParameters, + UpdateEncryptionConfig, + UpdateKeyVaultMetaInfo, + UpdateFirewallRuleWithAccountParameters, + UpdateVirtualNetworkRuleWithAccountParameters, + UpdateTrustedIdProviderWithAccountParameters, + CheckNameAvailabilityParameters, + NameAvailabilityInformation +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/models/firewallRulesMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/firewallRulesMappers.ts new file mode 100644 index 000000000000..3ca9a66a74a7 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/firewallRulesMappers.ts @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + FirewallRuleListResult, + FirewallRule, + SubResource, + BaseResource, + CloudError, + CreateOrUpdateFirewallRuleParameters, + UpdateFirewallRuleParameters, + Resource, + VirtualNetworkRule, + TrustedIdProvider, + DataLakeStoreAccount, + EncryptionIdentity, + EncryptionConfig, + KeyVaultMetaInfo, + DataLakeStoreAccountBasic +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/models/index.ts b/packages/@azure/arm-datalake-store/lib/account/models/index.ts new file mode 100644 index 000000000000..cbe51569eb19 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/index.ts @@ -0,0 +1,1851 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Resource. + * The resource model definition. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The resource name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The resource type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {string} [location] The resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] The resource tags. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing SubResource. + * The resource model definition for a nested resource. + * + * @extends BaseResource + */ +export interface SubResource extends BaseResource { + /** + * @member {string} [id] The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The resource name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The resource type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing EncryptionIdentity. + * The encryption identity properties. + * + */ +export interface EncryptionIdentity { + /** + * @member {string} [principalId] The principal identifier associated with + * the encryption. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly principalId?: string; + /** + * @member {string} [tenantId] The tenant identifier associated with the + * encryption. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tenantId?: string; +} + +/** + * @interface + * An interface representing KeyVaultMetaInfo. + * Metadata information used by account encryption. + * + */ +export interface KeyVaultMetaInfo { + /** + * @member {string} keyVaultResourceId The resource identifier for the user + * managed Key Vault being used to encrypt. + */ + keyVaultResourceId: string; + /** + * @member {string} encryptionKeyName The name of the user managed encryption + * key. + */ + encryptionKeyName: string; + /** + * @member {string} encryptionKeyVersion The version of the user managed + * encryption key. + */ + encryptionKeyVersion: string; +} + +/** + * @interface + * An interface representing EncryptionConfig. + * The encryption configuration for the account. + * + */ +export interface EncryptionConfig { + /** + * @member {EncryptionConfigType} type The type of encryption configuration + * being used. Currently the only supported types are 'UserManaged' and + * 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged' + */ + type: EncryptionConfigType; + /** + * @member {KeyVaultMetaInfo} [keyVaultMetaInfo] The Key Vault information + * for connecting to user managed encryption keys. + */ + keyVaultMetaInfo?: KeyVaultMetaInfo; +} + +/** + * @interface + * An interface representing FirewallRule. + * Data Lake Store firewall rule information. + * + * @extends SubResource + */ +export interface FirewallRule extends SubResource { + /** + * @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. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startIpAddress?: string; + /** + * @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. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endIpAddress?: string; +} + +/** + * @interface + * An interface representing VirtualNetworkRule. + * Data Lake Store virtual network rule information. + * + * @extends SubResource + */ +export interface VirtualNetworkRule extends SubResource { + /** + * @member {string} [subnetId] The resource identifier for the subnet. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subnetId?: string; +} + +/** + * @interface + * An interface representing TrustedIdProvider. + * Data Lake Store trusted identity provider information. + * + * @extends SubResource + */ +export interface TrustedIdProvider extends SubResource { + /** + * @member {string} [idProvider] The URL of this trusted identity provider. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly idProvider?: string; +} + +/** + * @interface + * An interface representing DataLakeStoreAccount. + * Data Lake Store account information. + * + * @extends Resource + */ +export interface DataLakeStoreAccount extends Resource { + /** + * @member {EncryptionIdentity} [identity] The Key Vault encryption identity, + * if any. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly identity?: EncryptionIdentity; + /** + * @member {string} [accountId] The unique identifier associated with this + * Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly accountId?: string; + /** + * @member {DataLakeStoreAccountStatus} [provisioningState] The provisioning + * status of the Data Lake Store account. Possible values include: 'Failed', + * 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', + * 'Deleting', 'Deleted', 'Undeleting', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: DataLakeStoreAccountStatus; + /** + * @member {DataLakeStoreAccountState} [state] The state of the Data Lake + * Store account. Possible values include: 'Active', 'Suspended' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: DataLakeStoreAccountState; + /** + * @member {Date} [creationTime] The account creation time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {Date} [lastModifiedTime] The account last modified time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; + /** + * @member {string} [endpoint] The full CName endpoint for this account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endpoint?: string; + /** + * @member {string} [defaultGroup] The default owner group for all new + * folders and files created in the Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultGroup?: string; + /** + * @member {EncryptionConfig} [encryptionConfig] The Key Vault encryption + * configuration. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly encryptionConfig?: EncryptionConfig; + /** + * @member {EncryptionState} [encryptionState] The current state of + * encryption for this Data Lake Store account. Possible values include: + * 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly encryptionState?: EncryptionState; + /** + * @member {EncryptionProvisioningState} [encryptionProvisioningState] The + * current state of encryption provisioning for this Data Lake Store account. + * Possible values include: 'Creating', 'Succeeded' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly encryptionProvisioningState?: EncryptionProvisioningState; + /** + * @member {FirewallRule[]} [firewallRules] The list of firewall rules + * associated with this Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly firewallRules?: FirewallRule[]; + /** + * @member {VirtualNetworkRule[]} [virtualNetworkRules] The list of virtual + * network rules associated with this Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly virtualNetworkRules?: VirtualNetworkRule[]; + /** + * @member {FirewallState} [firewallState] The current state of the IP + * address firewall for this Data Lake Store account. Possible values + * include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly firewallState?: FirewallState; + /** + * @member {FirewallAllowAzureIpsState} [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' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly firewallAllowAzureIps?: FirewallAllowAzureIpsState; + /** + * @member {TrustedIdProvider[]} [trustedIdProviders] The list of trusted + * identity providers associated with this Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly trustedIdProviders?: TrustedIdProvider[]; + /** + * @member {TrustedIdProviderState} [trustedIdProviderState] The current + * state of the trusted identity provider feature for this Data Lake Store + * account. Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly trustedIdProviderState?: TrustedIdProviderState; + /** + * @member {TierType} [newTier] The commitment tier to use for next month. + * Possible values include: 'Consumption', 'Commitment_1TB', + * 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', + * 'Commitment_1PB', 'Commitment_5PB' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly newTier?: TierType; + /** + * @member {TierType} [currentTier] The commitment tier in use for the + * current month. Possible values include: 'Consumption', 'Commitment_1TB', + * 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', + * 'Commitment_1PB', 'Commitment_5PB' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentTier?: TierType; +} + +/** + * @interface + * An interface representing DataLakeStoreAccountBasic. + * Basic Data Lake Store account information, returned on list calls. + * + * @extends Resource + */ +export interface DataLakeStoreAccountBasic extends Resource { + /** + * @member {string} [accountId] The unique identifier associated with this + * Data Lake Store account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly accountId?: string; + /** + * @member {DataLakeStoreAccountStatus} [provisioningState] The provisioning + * status of the Data Lake Store account. Possible values include: 'Failed', + * 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', + * 'Deleting', 'Deleted', 'Undeleting', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: DataLakeStoreAccountStatus; + /** + * @member {DataLakeStoreAccountState} [state] The state of the Data Lake + * Store account. Possible values include: 'Active', 'Suspended' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: DataLakeStoreAccountState; + /** + * @member {Date} [creationTime] The account creation time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {Date} [lastModifiedTime] The account last modified time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; + /** + * @member {string} [endpoint] The full CName endpoint for this account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endpoint?: string; +} + +/** + * @interface + * An interface representing OperationDisplay. + * The display information for a particular operation. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] The resource provider of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; + /** + * @member {string} [resource] The resource type of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resource?: string; + /** + * @member {string} [operation] A friendly name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [description] A friendly description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; +} + +/** + * @interface + * An interface representing Operation. + * An available operation for Data Lake Store. + * + */ +export interface Operation { + /** + * @member {string} [name] The name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {OperationDisplay} [display] The display information for the + * operation. + */ + display?: OperationDisplay; + /** + * @member {OperationOrigin} [origin] The intended executor of the operation. + * Possible values include: 'user', 'system', 'user,system' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly origin?: OperationOrigin; +} + +/** + * @interface + * An interface representing OperationListResult. + * The list of available operations for Data Lake Store. + * + */ +export interface OperationListResult { + /** + * @member {Operation[]} [value] The results of the list operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: Operation[]; + /** + * @member {string} [nextLink] The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing CapabilityInformation. + * Subscription-level properties and limits for Data Lake Store. + * + */ +export interface CapabilityInformation { + /** + * @member {string} [subscriptionId] The subscription credentials that + * uniquely identifies the subscription. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subscriptionId?: string; + /** + * @member {SubscriptionState} [state] The subscription state. Possible + * values include: 'Registered', 'Suspended', 'Deleted', 'Unregistered', + * 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: SubscriptionState; + /** + * @member {number} [maxAccountCount] The maximum supported number of + * accounts under this subscription. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxAccountCount?: number; + /** + * @member {number} [accountCount] The current number of accounts under this + * subscription. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly accountCount?: number; + /** + * @member {boolean} [migrationState] The Boolean value of true or false to + * indicate the maintenance state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationState?: boolean; +} + +/** + * @interface + * An interface representing NameAvailabilityInformation. + * Data Lake Store account name availability result information. + * + */ +export interface NameAvailabilityInformation { + /** + * @member {boolean} [nameAvailable] The Boolean value of true or false to + * indicate whether the Data Lake Store account name is available or not. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nameAvailable?: boolean; + /** + * @member {string} [reason] The reason why the Data Lake Store account name + * is not available, if nameAvailable is false. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reason?: string; + /** + * @member {string} [message] The message describing why the Data Lake Store + * account name is not available, if nameAvailable is false. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; +} + +/** + * @interface + * An interface representing CreateFirewallRuleWithAccountParameters. + * The parameters used to create a new firewall rule while creating a new Data + * Lake Store account. + * + */ +export interface CreateFirewallRuleWithAccountParameters { + /** + * @member {string} name The unique name of the firewall rule to create. + */ + name: string; + /** + * @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. + */ + startIpAddress: string; + /** + * @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. + */ + endIpAddress: string; +} + +/** + * @interface + * An interface representing CreateVirtualNetworkRuleWithAccountParameters. + * The parameters used to create a new virtual network rule while creating a + * new Data Lake Store account. + * + */ +export interface CreateVirtualNetworkRuleWithAccountParameters { + /** + * @member {string} name The unique name of the virtual network rule to + * create. + */ + name: string; + /** + * @member {string} subnetId The resource identifier for the subnet. + */ + subnetId: string; +} + +/** + * @interface + * An interface representing CreateTrustedIdProviderWithAccountParameters. + * The parameters used to create a new trusted identity provider while creating + * a new Data Lake Store account. + * + */ +export interface CreateTrustedIdProviderWithAccountParameters { + /** + * @member {string} name The unique name of the trusted identity provider to + * create. + */ + name: string; + /** + * @member {string} idProvider The URL of this trusted identity provider. + */ + idProvider: string; +} + +/** + * @interface + * An interface representing CreateDataLakeStoreAccountParameters. + */ +export interface CreateDataLakeStoreAccountParameters { + /** + * @member {string} location The resource location. + */ + location: string; + /** + * @member {{ [propertyName: string]: string }} [tags] The resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * @member {EncryptionIdentity} [identity] The Key Vault encryption identity, + * if any. + */ + identity?: EncryptionIdentity; + /** + * @member {string} [defaultGroup] The default owner group for all new + * folders and files created in the Data Lake Store account. + */ + defaultGroup?: string; + /** + * @member {EncryptionConfig} [encryptionConfig] The Key Vault encryption + * configuration. + */ + encryptionConfig?: EncryptionConfig; + /** + * @member {EncryptionState} [encryptionState] The current state of + * encryption for this Data Lake Store account. Possible values include: + * 'Enabled', 'Disabled' + */ + encryptionState?: EncryptionState; + /** + * @member {CreateFirewallRuleWithAccountParameters[]} [firewallRules] The + * list of firewall rules associated with this Data Lake Store account. + */ + firewallRules?: CreateFirewallRuleWithAccountParameters[]; + /** + * @member {CreateVirtualNetworkRuleWithAccountParameters[]} + * [virtualNetworkRules] The list of virtual network rules associated with + * this Data Lake Store account. + */ + virtualNetworkRules?: CreateVirtualNetworkRuleWithAccountParameters[]; + /** + * @member {FirewallState} [firewallState] The current state of the IP + * address firewall for this Data Lake Store account. Possible values + * include: 'Enabled', 'Disabled' + */ + firewallState?: FirewallState; + /** + * @member {FirewallAllowAzureIpsState} [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' + */ + firewallAllowAzureIps?: FirewallAllowAzureIpsState; + /** + * @member {CreateTrustedIdProviderWithAccountParameters[]} + * [trustedIdProviders] The list of trusted identity providers associated + * with this Data Lake Store account. + */ + trustedIdProviders?: CreateTrustedIdProviderWithAccountParameters[]; + /** + * @member {TrustedIdProviderState} [trustedIdProviderState] The current + * state of the trusted identity provider feature for this Data Lake Store + * account. Possible values include: 'Enabled', 'Disabled' + */ + trustedIdProviderState?: TrustedIdProviderState; + /** + * @member {TierType} [newTier] The commitment tier to use for next month. + * Possible values include: 'Consumption', 'Commitment_1TB', + * 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', + * 'Commitment_1PB', 'Commitment_5PB' + */ + newTier?: TierType; +} + +/** + * @interface + * An interface representing UpdateKeyVaultMetaInfo. + * The Key Vault update information used for user managed key rotation. + * + */ +export interface UpdateKeyVaultMetaInfo { + /** + * @member {string} [encryptionKeyVersion] The version of the user managed + * encryption key to update through a key rotation. + */ + encryptionKeyVersion?: string; +} + +/** + * @interface + * An interface representing UpdateEncryptionConfig. + * The encryption configuration used to update a user managed Key Vault key. + * + */ +export interface UpdateEncryptionConfig { + /** + * @member {UpdateKeyVaultMetaInfo} [keyVaultMetaInfo] The updated Key Vault + * key to use in user managed key rotation. + */ + keyVaultMetaInfo?: UpdateKeyVaultMetaInfo; +} + +/** + * @interface + * An interface representing UpdateFirewallRuleWithAccountParameters. + * The parameters used to update a firewall rule while updating a Data Lake + * Store account. + * + */ +export interface UpdateFirewallRuleWithAccountParameters { + /** + * @member {string} name The unique name of the firewall rule to update. + */ + name: string; + /** + * @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. + */ + startIpAddress?: string; + /** + * @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. + */ + endIpAddress?: string; +} + +/** + * @interface + * An interface representing UpdateVirtualNetworkRuleWithAccountParameters. + * The parameters used to update a virtual network rule while updating a Data + * Lake Store account. + * + */ +export interface UpdateVirtualNetworkRuleWithAccountParameters { + /** + * @member {string} name The unique name of the virtual network rule to + * update. + */ + name: string; + /** + * @member {string} [subnetId] The resource identifier for the subnet. + */ + subnetId?: string; +} + +/** + * @interface + * An interface representing UpdateTrustedIdProviderWithAccountParameters. + * The parameters used to update a trusted identity provider while updating a + * Data Lake Store account. + * + */ +export interface UpdateTrustedIdProviderWithAccountParameters { + /** + * @member {string} name The unique name of the trusted identity provider to + * update. + */ + name: string; + /** + * @member {string} [idProvider] The URL of this trusted identity provider. + */ + idProvider?: string; +} + +/** + * @interface + * An interface representing UpdateDataLakeStoreAccountParameters. + * Data Lake Store account information to update. + * + */ +export interface UpdateDataLakeStoreAccountParameters { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} [defaultGroup] The default owner group for all new + * folders and files created in the Data Lake Store account. + */ + defaultGroup?: string; + /** + * @member {UpdateEncryptionConfig} [encryptionConfig] Used for rotation of + * user managed Key Vault keys. Can only be used to rotate a user managed + * encryption Key Vault key. + */ + encryptionConfig?: UpdateEncryptionConfig; + /** + * @member {UpdateFirewallRuleWithAccountParameters[]} [firewallRules] The + * list of firewall rules associated with this Data Lake Store account. + */ + firewallRules?: UpdateFirewallRuleWithAccountParameters[]; + /** + * @member {UpdateVirtualNetworkRuleWithAccountParameters[]} + * [virtualNetworkRules] The list of virtual network rules associated with + * this Data Lake Store account. + */ + virtualNetworkRules?: UpdateVirtualNetworkRuleWithAccountParameters[]; + /** + * @member {FirewallState} [firewallState] The current state of the IP + * address firewall for this Data Lake Store 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' + */ + firewallState?: FirewallState; + /** + * @member {FirewallAllowAzureIpsState} [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' + */ + firewallAllowAzureIps?: FirewallAllowAzureIpsState; + /** + * @member {UpdateTrustedIdProviderWithAccountParameters[]} + * [trustedIdProviders] The list of trusted identity providers associated + * with this Data Lake Store account. + */ + trustedIdProviders?: UpdateTrustedIdProviderWithAccountParameters[]; + /** + * @member {TrustedIdProviderState} [trustedIdProviderState] The current + * state of the trusted identity provider feature for this Data Lake Store + * account. Disabling trusted identity provider functionality does not remove + * the providers, they will just be ignored until this feature is re-enabled. + * Possible values include: 'Enabled', 'Disabled' + */ + trustedIdProviderState?: TrustedIdProviderState; + /** + * @member {TierType} [newTier] The commitment tier to use for next month. + * Possible values include: 'Consumption', 'Commitment_1TB', + * 'Commitment_10TB', 'Commitment_100TB', 'Commitment_500TB', + * 'Commitment_1PB', 'Commitment_5PB' + */ + newTier?: TierType; +} + +/** + * @interface + * An interface representing CreateOrUpdateFirewallRuleParameters. + * The parameters used to create a new firewall rule. + * + */ +export interface 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. + */ + startIpAddress: string; + /** + * @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. + */ + endIpAddress: string; +} + +/** + * @interface + * An interface representing UpdateFirewallRuleParameters. + * The parameters used to update a firewall rule. + * + */ +export interface UpdateFirewallRuleParameters { + /** + * @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. + */ + startIpAddress?: string; + /** + * @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. + */ + endIpAddress?: string; +} + +/** + * @interface + * An interface representing CreateOrUpdateVirtualNetworkRuleParameters. + * The parameters used to create a new virtual network rule. + * + */ +export interface CreateOrUpdateVirtualNetworkRuleParameters { + /** + * @member {string} subnetId The resource identifier for the subnet. + */ + subnetId: string; +} + +/** + * @interface + * An interface representing UpdateVirtualNetworkRuleParameters. + * The parameters used to update a virtual network rule. + * + */ +export interface UpdateVirtualNetworkRuleParameters { + /** + * @member {string} [subnetId] The resource identifier for the subnet. + */ + subnetId?: string; +} + +/** + * @interface + * An interface representing CreateOrUpdateTrustedIdProviderParameters. + * The parameters used to create a new trusted identity provider. + * + */ +export interface CreateOrUpdateTrustedIdProviderParameters { + /** + * @member {string} idProvider The URL of this trusted identity provider. + */ + idProvider: string; +} + +/** + * @interface + * An interface representing UpdateTrustedIdProviderParameters. + * The parameters used to update a trusted identity provider. + * + */ +export interface UpdateTrustedIdProviderParameters { + /** + * @member {string} [idProvider] The URL of this trusted identity provider. + */ + idProvider?: string; +} + +/** + * @interface + * An interface representing CheckNameAvailabilityParameters. + * Data Lake Store account name availability check parameters. + * + */ +export interface CheckNameAvailabilityParameters { + /** + * @member {string} name The Data Lake Store name to check availability for. + */ + name: string; +} + +/** + * @interface + * An interface representing AccountsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {number} [top] The number of items to return. Optional. + */ + top?: number; + /** + * @member {number} [skip] The number of items to skip over before returning + * elements. Optional. + */ + skip?: number; + /** + * @member {string} [select] OData Select statement. Limits the properties on + * each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + */ + select?: string; + /** + * @member {string} [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. + */ + orderby?: string; + /** + * @member {boolean} [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. + */ + count?: boolean; +} + +/** + * @interface + * An interface representing AccountsListByResourceGroupOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AccountsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] OData filter. Optional. + */ + filter?: string; + /** + * @member {number} [top] The number of items to return. Optional. + */ + top?: number; + /** + * @member {number} [skip] The number of items to skip over before returning + * elements. Optional. + */ + skip?: number; + /** + * @member {string} [select] OData Select statement. Limits the properties on + * each entry to just those requested, e.g. + * Categories?$select=CategoryName,Description. Optional. + */ + select?: string; + /** + * @member {string} [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. + */ + orderby?: string; + /** + * @member {boolean} [count] A 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. + */ + count?: boolean; +} + +/** + * @interface + * An interface representing FirewallRulesUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface FirewallRulesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {UpdateFirewallRuleParameters} [parameters] Parameters supplied to + * update the firewall rule. + */ + parameters?: UpdateFirewallRuleParameters; +} + +/** + * @interface + * An interface representing VirtualNetworkRulesUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface VirtualNetworkRulesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {UpdateVirtualNetworkRuleParameters} [parameters] Parameters + * supplied to update the virtual network rule. + */ + parameters?: UpdateVirtualNetworkRuleParameters; +} + +/** + * @interface + * An interface representing TrustedIdProvidersUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TrustedIdProvidersUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {UpdateTrustedIdProviderParameters} [parameters] Parameters + * supplied to update the trusted identity provider. + */ + parameters?: UpdateTrustedIdProviderParameters; +} + +/** + * @interface + * An interface representing DataLakeStoreAccountManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface DataLakeStoreAccountManagementClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the DataLakeStoreAccountListResult. + * Data Lake Store account list information response. + * + * @extends Array + */ +export interface DataLakeStoreAccountListResult extends Array { + /** + * @member {string} [nextLink] The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the FirewallRuleListResult. + * Data Lake Store firewall rule list information. + * + * @extends Array + */ +export interface FirewallRuleListResult extends Array { + /** + * @member {string} [nextLink] The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the VirtualNetworkRuleListResult. + * Data Lake Store virtual network rule list information. + * + * @extends Array + */ +export interface VirtualNetworkRuleListResult extends Array { + /** + * @member {string} [nextLink] The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TrustedIdProviderListResult. + * Data Lake Store trusted identity provider list information. + * + * @extends Array + */ +export interface TrustedIdProviderListResult extends Array { + /** + * @member {string} [nextLink] The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for EncryptionConfigType. + * Possible values include: 'UserManaged', 'ServiceManaged' + * @readonly + * @enum {string} + */ +export enum EncryptionConfigType { + UserManaged = 'UserManaged', + ServiceManaged = 'ServiceManaged', +} + +/** + * Defines values for EncryptionState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export enum EncryptionState { + Enabled = 'Enabled', + Disabled = 'Disabled', +} + +/** + * Defines values for EncryptionProvisioningState. + * Possible values include: 'Creating', 'Succeeded' + * @readonly + * @enum {string} + */ +export enum EncryptionProvisioningState { + Creating = 'Creating', + Succeeded = 'Succeeded', +} + +/** + * Defines values for FirewallState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export enum FirewallState { + Enabled = 'Enabled', + Disabled = 'Disabled', +} + +/** + * Defines values for FirewallAllowAzureIpsState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export enum FirewallAllowAzureIpsState { + Enabled = 'Enabled', + Disabled = 'Disabled', +} + +/** + * Defines values for TrustedIdProviderState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export enum TrustedIdProviderState { + Enabled = 'Enabled', + Disabled = 'Disabled', +} + +/** + * Defines values for TierType. + * Possible values include: 'Consumption', 'Commitment_1TB', 'Commitment_10TB', + * 'Commitment_100TB', 'Commitment_500TB', 'Commitment_1PB', 'Commitment_5PB' + * @readonly + * @enum {string} + */ +export enum TierType { + Consumption = 'Consumption', + Commitment1TB = 'Commitment_1TB', + Commitment10TB = 'Commitment_10TB', + Commitment100TB = 'Commitment_100TB', + Commitment500TB = 'Commitment_500TB', + Commitment1PB = 'Commitment_1PB', + Commitment5PB = 'Commitment_5PB', +} + +/** + * Defines values for DataLakeStoreAccountStatus. + * Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', + * 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', + * 'Canceled' + * @readonly + * @enum {string} + */ +export enum DataLakeStoreAccountStatus { + Failed = 'Failed', + Creating = 'Creating', + Running = 'Running', + Succeeded = 'Succeeded', + Patching = 'Patching', + Suspending = 'Suspending', + Resuming = 'Resuming', + Deleting = 'Deleting', + Deleted = 'Deleted', + Undeleting = 'Undeleting', + Canceled = 'Canceled', +} + +/** + * Defines values for DataLakeStoreAccountState. + * Possible values include: 'Active', 'Suspended' + * @readonly + * @enum {string} + */ +export enum DataLakeStoreAccountState { + Active = 'Active', + Suspended = 'Suspended', +} + +/** + * Defines values for OperationOrigin. + * Possible values include: 'user', 'system', 'user,system' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: OperationOrigin = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum OperationOrigin { + User = 'user', + System = 'system', + Usersystem = 'user,system', +} + +/** + * Defines values for SubscriptionState. + * Possible values include: 'Registered', 'Suspended', 'Deleted', + * 'Unregistered', 'Warned' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SubscriptionState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SubscriptionState { + Registered = 'Registered', + Suspended = 'Suspended', + Deleted = 'Deleted', + Unregistered = 'Unregistered', + Warned = 'Warned', +} + +/** + * Contains response data for the list operation. + */ +export type AccountsListResponse = DataLakeStoreAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccountListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type AccountsListByResourceGroupResponse = DataLakeStoreAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccountListResult; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type AccountsCreateResponse = DataLakeStoreAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccount; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AccountsGetResponse = DataLakeStoreAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccount; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type AccountsUpdateResponse = DataLakeStoreAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccount; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type AccountsCheckNameAvailabilityResponse = NameAvailabilityInformation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailabilityInformation; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type AccountsBeginCreateResponse = DataLakeStoreAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccount; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type AccountsBeginUpdateResponse = DataLakeStoreAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccount; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccountsListNextResponse = DataLakeStoreAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccountListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type AccountsListByResourceGroupNextResponse = DataLakeStoreAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataLakeStoreAccountListResult; + }; +}; + +/** + * Contains response data for the listByAccount operation. + */ +export type FirewallRulesListByAccountResponse = FirewallRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type FirewallRulesGetResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type FirewallRulesUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the listByAccountNext operation. + */ +export type FirewallRulesListByAccountNextResponse = FirewallRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRuleListResult; + }; +}; + +/** + * Contains response data for the listByAccount operation. + */ +export type VirtualNetworkRulesListByAccountResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VirtualNetworkRulesUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByAccountNext operation. + */ +export type VirtualNetworkRulesListByAccountNextResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the listByAccount operation. + */ +export type TrustedIdProvidersListByAccountResponse = TrustedIdProviderListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TrustedIdProviderListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type TrustedIdProvidersCreateOrUpdateResponse = TrustedIdProvider & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TrustedIdProvider; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TrustedIdProvidersGetResponse = TrustedIdProvider & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TrustedIdProvider; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type TrustedIdProvidersUpdateResponse = TrustedIdProvider & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TrustedIdProvider; + }; +}; + +/** + * Contains response data for the listByAccountNext operation. + */ +export type TrustedIdProvidersListByAccountNextResponse = TrustedIdProviderListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TrustedIdProviderListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the getCapability operation. + */ +export type LocationsGetCapabilityResponse = CapabilityInformation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CapabilityInformation; + }; +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/models/locationsMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/locationsMappers.ts new file mode 100644 index 000000000000..64eade394771 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/locationsMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CapabilityInformation, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/models/mappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/mappers.ts new file mode 100644 index 000000000000..8fc95d32e373 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/mappers.ts @@ -0,0 +1,1412 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SubResource: msRest.CompositeMapper = { + serializedName: "SubResource", + type: { + name: "Composite", + className: "SubResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionIdentity: msRest.CompositeMapper = { + serializedName: "EncryptionIdentity", + type: { + name: "Composite", + className: "EncryptionIdentity", + modelProperties: { + type: { + required: true, + isConstant: true, + serializedName: "type", + defaultValue: 'SystemAssigned', + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const KeyVaultMetaInfo: msRest.CompositeMapper = { + serializedName: "KeyVaultMetaInfo", + type: { + name: "Composite", + className: "KeyVaultMetaInfo", + modelProperties: { + keyVaultResourceId: { + required: true, + serializedName: "keyVaultResourceId", + type: { + name: "String" + } + }, + encryptionKeyName: { + required: true, + serializedName: "encryptionKeyName", + type: { + name: "String" + } + }, + encryptionKeyVersion: { + required: true, + serializedName: "encryptionKeyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionConfig: msRest.CompositeMapper = { + serializedName: "EncryptionConfig", + type: { + name: "Composite", + className: "EncryptionConfig", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "UserManaged", + "ServiceManaged" + ] + } + }, + keyVaultMetaInfo: { + serializedName: "keyVaultMetaInfo", + type: { + name: "Composite", + className: "KeyVaultMetaInfo" + } + } + } + } +}; + +export const FirewallRule: msRest.CompositeMapper = { + serializedName: "FirewallRule", + type: { + name: "Composite", + className: "FirewallRule", + modelProperties: { + ...SubResource.type.modelProperties, + startIpAddress: { + readOnly: true, + serializedName: "properties.startIpAddress", + type: { + name: "String" + } + }, + endIpAddress: { + readOnly: true, + serializedName: "properties.endIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkRule: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRule", + type: { + name: "Composite", + className: "VirtualNetworkRule", + modelProperties: { + ...SubResource.type.modelProperties, + subnetId: { + readOnly: true, + serializedName: "properties.subnetId", + type: { + name: "String" + } + } + } + } +}; + +export const TrustedIdProvider: msRest.CompositeMapper = { + serializedName: "TrustedIdProvider", + type: { + name: "Composite", + className: "TrustedIdProvider", + modelProperties: { + ...SubResource.type.modelProperties, + idProvider: { + readOnly: true, + serializedName: "properties.idProvider", + type: { + name: "String" + } + } + } + } +}; + +export const DataLakeStoreAccount: msRest.CompositeMapper = { + serializedName: "DataLakeStoreAccount", + type: { + name: "Composite", + className: "DataLakeStoreAccount", + modelProperties: { + ...Resource.type.modelProperties, + identity: { + readOnly: true, + serializedName: "identity", + type: { + name: "Composite", + className: "EncryptionIdentity" + } + }, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "Uuid" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Failed", + "Creating", + "Running", + "Succeeded", + "Patching", + "Suspending", + "Resuming", + "Deleting", + "Deleted", + "Undeleting", + "Canceled" + ] + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Active", + "Suspended" + ] + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "DateTime" + } + }, + endpoint: { + readOnly: true, + serializedName: "properties.endpoint", + type: { + name: "String" + } + }, + defaultGroup: { + readOnly: true, + serializedName: "properties.defaultGroup", + type: { + name: "String" + } + }, + encryptionConfig: { + readOnly: true, + serializedName: "properties.encryptionConfig", + type: { + name: "Composite", + className: "EncryptionConfig" + } + }, + encryptionState: { + readOnly: true, + serializedName: "properties.encryptionState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + encryptionProvisioningState: { + readOnly: true, + serializedName: "properties.encryptionProvisioningState", + type: { + name: "Enum", + allowedValues: [ + "Creating", + "Succeeded" + ] + } + }, + firewallRules: { + readOnly: true, + serializedName: "properties.firewallRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallRule" + } + } + } + }, + virtualNetworkRules: { + readOnly: true, + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule" + } + } + } + }, + firewallState: { + readOnly: true, + serializedName: "properties.firewallState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + firewallAllowAzureIps: { + readOnly: true, + serializedName: "properties.firewallAllowAzureIps", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + trustedIdProviders: { + readOnly: true, + serializedName: "properties.trustedIdProviders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedIdProvider" + } + } + } + }, + trustedIdProviderState: { + readOnly: true, + serializedName: "properties.trustedIdProviderState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + newTier: { + readOnly: true, + serializedName: "properties.newTier", + type: { + name: "Enum", + allowedValues: [ + "Consumption", + "Commitment_1TB", + "Commitment_10TB", + "Commitment_100TB", + "Commitment_500TB", + "Commitment_1PB", + "Commitment_5PB" + ] + } + }, + currentTier: { + readOnly: true, + serializedName: "properties.currentTier", + type: { + name: "Enum", + allowedValues: [ + "Consumption", + "Commitment_1TB", + "Commitment_10TB", + "Commitment_100TB", + "Commitment_500TB", + "Commitment_1PB", + "Commitment_5PB" + ] + } + } + } + } +}; + +export const DataLakeStoreAccountBasic: msRest.CompositeMapper = { + serializedName: "DataLakeStoreAccountBasic", + type: { + name: "Composite", + className: "DataLakeStoreAccountBasic", + modelProperties: { + ...Resource.type.modelProperties, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "Uuid" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Failed", + "Creating", + "Running", + "Succeeded", + "Patching", + "Suspending", + "Resuming", + "Deleting", + "Deleted", + "Undeleting", + "Canceled" + ] + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Active", + "Suspended" + ] + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "DateTime" + } + }, + endpoint: { + readOnly: true, + serializedName: "properties.endpoint", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CapabilityInformation: msRest.CompositeMapper = { + serializedName: "CapabilityInformation", + type: { + name: "Composite", + className: "CapabilityInformation", + modelProperties: { + subscriptionId: { + readOnly: true, + serializedName: "subscriptionId", + type: { + name: "Uuid" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + maxAccountCount: { + readOnly: true, + serializedName: "maxAccountCount", + type: { + name: "Number" + } + }, + accountCount: { + readOnly: true, + serializedName: "accountCount", + type: { + name: "Number" + } + }, + migrationState: { + readOnly: true, + serializedName: "migrationState", + type: { + name: "Boolean" + } + } + } + } +}; + +export const NameAvailabilityInformation: msRest.CompositeMapper = { + serializedName: "NameAvailabilityInformation", + type: { + name: "Composite", + className: "NameAvailabilityInformation", + modelProperties: { + nameAvailable: { + readOnly: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const CreateFirewallRuleWithAccountParameters: msRest.CompositeMapper = { + 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" + } + } + } + } +}; + +export const CreateVirtualNetworkRuleWithAccountParameters: msRest.CompositeMapper = { + serializedName: "CreateVirtualNetworkRuleWithAccountParameters", + type: { + name: "Composite", + className: "CreateVirtualNetworkRuleWithAccountParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + subnetId: { + required: true, + serializedName: "properties.subnetId", + type: { + name: "String" + } + } + } + } +}; + +export const CreateTrustedIdProviderWithAccountParameters: msRest.CompositeMapper = { + serializedName: "CreateTrustedIdProviderWithAccountParameters", + type: { + name: "Composite", + className: "CreateTrustedIdProviderWithAccountParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + idProvider: { + required: true, + serializedName: "properties.idProvider", + type: { + name: "String" + } + } + } + } +}; + +export const CreateDataLakeStoreAccountParameters: msRest.CompositeMapper = { + serializedName: "CreateDataLakeStoreAccountParameters", + type: { + name: "Composite", + className: "CreateDataLakeStoreAccountParameters", + modelProperties: { + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "EncryptionIdentity" + } + }, + defaultGroup: { + serializedName: "properties.defaultGroup", + type: { + name: "String" + } + }, + encryptionConfig: { + serializedName: "properties.encryptionConfig", + type: { + name: "Composite", + className: "EncryptionConfig" + } + }, + encryptionState: { + serializedName: "properties.encryptionState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + firewallRules: { + serializedName: "properties.firewallRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CreateFirewallRuleWithAccountParameters" + } + } + } + }, + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CreateVirtualNetworkRuleWithAccountParameters" + } + } + } + }, + firewallState: { + serializedName: "properties.firewallState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + firewallAllowAzureIps: { + serializedName: "properties.firewallAllowAzureIps", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + trustedIdProviders: { + serializedName: "properties.trustedIdProviders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CreateTrustedIdProviderWithAccountParameters" + } + } + } + }, + trustedIdProviderState: { + serializedName: "properties.trustedIdProviderState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + newTier: { + serializedName: "properties.newTier", + type: { + name: "Enum", + allowedValues: [ + "Consumption", + "Commitment_1TB", + "Commitment_10TB", + "Commitment_100TB", + "Commitment_500TB", + "Commitment_1PB", + "Commitment_5PB" + ] + } + } + } + } +}; + +export const UpdateKeyVaultMetaInfo: msRest.CompositeMapper = { + serializedName: "UpdateKeyVaultMetaInfo", + type: { + name: "Composite", + className: "UpdateKeyVaultMetaInfo", + modelProperties: { + encryptionKeyVersion: { + serializedName: "encryptionKeyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateEncryptionConfig: msRest.CompositeMapper = { + serializedName: "UpdateEncryptionConfig", + type: { + name: "Composite", + className: "UpdateEncryptionConfig", + modelProperties: { + keyVaultMetaInfo: { + serializedName: "keyVaultMetaInfo", + type: { + name: "Composite", + className: "UpdateKeyVaultMetaInfo" + } + } + } + } +}; + +export const UpdateFirewallRuleWithAccountParameters: msRest.CompositeMapper = { + serializedName: "UpdateFirewallRuleWithAccountParameters", + type: { + name: "Composite", + className: "UpdateFirewallRuleWithAccountParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + startIpAddress: { + serializedName: "properties.startIpAddress", + type: { + name: "String" + } + }, + endIpAddress: { + serializedName: "properties.endIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateVirtualNetworkRuleWithAccountParameters: msRest.CompositeMapper = { + serializedName: "UpdateVirtualNetworkRuleWithAccountParameters", + type: { + name: "Composite", + className: "UpdateVirtualNetworkRuleWithAccountParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + subnetId: { + serializedName: "properties.subnetId", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateTrustedIdProviderWithAccountParameters: msRest.CompositeMapper = { + serializedName: "UpdateTrustedIdProviderWithAccountParameters", + type: { + name: "Composite", + className: "UpdateTrustedIdProviderWithAccountParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + idProvider: { + serializedName: "properties.idProvider", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateDataLakeStoreAccountParameters: msRest.CompositeMapper = { + serializedName: "UpdateDataLakeStoreAccountParameters", + type: { + name: "Composite", + className: "UpdateDataLakeStoreAccountParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + defaultGroup: { + serializedName: "properties.defaultGroup", + type: { + name: "String" + } + }, + encryptionConfig: { + serializedName: "properties.encryptionConfig", + type: { + name: "Composite", + className: "UpdateEncryptionConfig" + } + }, + firewallRules: { + serializedName: "properties.firewallRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateFirewallRuleWithAccountParameters" + } + } + } + }, + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateVirtualNetworkRuleWithAccountParameters" + } + } + } + }, + firewallState: { + serializedName: "properties.firewallState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + firewallAllowAzureIps: { + serializedName: "properties.firewallAllowAzureIps", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + trustedIdProviders: { + serializedName: "properties.trustedIdProviders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateTrustedIdProviderWithAccountParameters" + } + } + } + }, + trustedIdProviderState: { + serializedName: "properties.trustedIdProviderState", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + newTier: { + serializedName: "properties.newTier", + type: { + name: "Enum", + allowedValues: [ + "Consumption", + "Commitment_1TB", + "Commitment_10TB", + "Commitment_100TB", + "Commitment_500TB", + "Commitment_1PB", + "Commitment_5PB" + ] + } + } + } + } +}; + +export const CreateOrUpdateFirewallRuleParameters: msRest.CompositeMapper = { + 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" + } + } + } + } +}; + +export const UpdateFirewallRuleParameters: msRest.CompositeMapper = { + serializedName: "UpdateFirewallRuleParameters", + type: { + name: "Composite", + className: "UpdateFirewallRuleParameters", + modelProperties: { + startIpAddress: { + serializedName: "properties.startIpAddress", + type: { + name: "String" + } + }, + endIpAddress: { + serializedName: "properties.endIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const CreateOrUpdateVirtualNetworkRuleParameters: msRest.CompositeMapper = { + serializedName: "CreateOrUpdateVirtualNetworkRuleParameters", + type: { + name: "Composite", + className: "CreateOrUpdateVirtualNetworkRuleParameters", + modelProperties: { + subnetId: { + required: true, + serializedName: "properties.subnetId", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateVirtualNetworkRuleParameters: msRest.CompositeMapper = { + serializedName: "UpdateVirtualNetworkRuleParameters", + type: { + name: "Composite", + className: "UpdateVirtualNetworkRuleParameters", + modelProperties: { + subnetId: { + serializedName: "properties.subnetId", + type: { + name: "String" + } + } + } + } +}; + +export const CreateOrUpdateTrustedIdProviderParameters: msRest.CompositeMapper = { + serializedName: "CreateOrUpdateTrustedIdProviderParameters", + type: { + name: "Composite", + className: "CreateOrUpdateTrustedIdProviderParameters", + modelProperties: { + idProvider: { + required: true, + serializedName: "properties.idProvider", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateTrustedIdProviderParameters: msRest.CompositeMapper = { + serializedName: "UpdateTrustedIdProviderParameters", + type: { + name: "Composite", + className: "UpdateTrustedIdProviderParameters", + modelProperties: { + idProvider: { + serializedName: "properties.idProvider", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityParameters: msRest.CompositeMapper = { + 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.DataLakeStore/accounts', + type: { + name: "String" + } + } + } + } +}; + +export const DataLakeStoreAccountListResult: msRest.CompositeMapper = { + serializedName: "DataLakeStoreAccountListResult", + type: { + name: "Composite", + className: "DataLakeStoreAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataLakeStoreAccountBasic" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FirewallRuleListResult: msRest.CompositeMapper = { + serializedName: "FirewallRuleListResult", + type: { + name: "Composite", + className: "FirewallRuleListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallRule" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkRuleListResult: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRuleListResult", + type: { + name: "Composite", + className: "VirtualNetworkRuleListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TrustedIdProviderListResult: msRest.CompositeMapper = { + serializedName: "TrustedIdProviderListResult", + type: { + name: "Composite", + className: "TrustedIdProviderListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedIdProvider" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/models/operationsMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/operationsMappers.ts new file mode 100644 index 000000000000..2edcc577920e --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/operationsMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + OperationListResult, + Operation, + OperationDisplay, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/models/parameters.ts b/packages/@azure/arm-datalake-store/lib/account/models/parameters.ts new file mode 100644 index 000000000000..135954afb43d --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/parameters.ts @@ -0,0 +1,191 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const accountName: msRest.OperationURLParameter = { + parameterPath: "accountName", + mapper: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const count: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "count" + ], + mapper: { + serializedName: "$count", + type: { + name: "Boolean" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const firewallRuleName: msRest.OperationURLParameter = { + parameterPath: "firewallRuleName", + mapper: { + required: true, + serializedName: "firewallRuleName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const orderby: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "orderby" + ], + mapper: { + serializedName: "$orderby", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const select: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "select" + ], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; +export const skip: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skip" + ], + mapper: { + serializedName: "$skip", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; +export const trustedIdProviderName: msRest.OperationURLParameter = { + parameterPath: "trustedIdProviderName", + mapper: { + required: true, + serializedName: "trustedIdProviderName", + type: { + name: "String" + } + } +}; +export const virtualNetworkRuleName: msRest.OperationURLParameter = { + parameterPath: "virtualNetworkRuleName", + mapper: { + required: true, + serializedName: "virtualNetworkRuleName", + type: { + name: "String" + } + } +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/models/trustedIdProvidersMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/trustedIdProvidersMappers.ts new file mode 100644 index 000000000000..290a20dcc02c --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/trustedIdProvidersMappers.ts @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + TrustedIdProviderListResult, + TrustedIdProvider, + SubResource, + BaseResource, + CloudError, + CreateOrUpdateTrustedIdProviderParameters, + UpdateTrustedIdProviderParameters, + Resource, + FirewallRule, + VirtualNetworkRule, + DataLakeStoreAccount, + EncryptionIdentity, + EncryptionConfig, + KeyVaultMetaInfo, + DataLakeStoreAccountBasic +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/models/virtualNetworkRulesMappers.ts b/packages/@azure/arm-datalake-store/lib/account/models/virtualNetworkRulesMappers.ts new file mode 100644 index 000000000000..ae124d94899a --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/models/virtualNetworkRulesMappers.ts @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + VirtualNetworkRuleListResult, + VirtualNetworkRule, + SubResource, + BaseResource, + CloudError, + CreateOrUpdateVirtualNetworkRuleParameters, + UpdateVirtualNetworkRuleParameters, + Resource, + FirewallRule, + TrustedIdProvider, + DataLakeStoreAccount, + EncryptionIdentity, + EncryptionConfig, + KeyVaultMetaInfo, + DataLakeStoreAccountBasic +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/accounts.ts b/packages/@azure/arm-datalake-store/lib/account/operations/accounts.ts new file mode 100644 index 000000000000..199d784c5c23 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/accounts.ts @@ -0,0 +1,614 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/accountsMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a Accounts. */ +export class Accounts { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a Accounts. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the + * next page of results, if any. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.AccountsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.AccountsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AccountsListOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a + * link to the next page of results, if any. + * @param resourceGroupName The name of the Azure resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.AccountsListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.AccountsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.AccountsListByResourceGroupOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Creates the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, parameters: Models.CreateDataLakeStoreAccountParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,accountName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified Data Lake Store account information. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, parameters: Models.UpdateDataLakeStoreAccountParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,accountName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store + * account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + enableKeyVault(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param callback The callback + */ + enableKeyVault(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param options The optional parameters + * @param callback The callback + */ + enableKeyVault(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableKeyVault(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + enableKeyVaultOperationSpec, + callback); + } + + /** + * Checks whether the specified account name is available or taken. + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(location: string, parameters: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback): void; + /** + * @param location The resource location without whitespace. + * @param parameters Parameters supplied to check the Data Lake Store account name availability. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(location: string, parameters: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Creates the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to create the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, accountName: string, parameters: Models.CreateDataLakeStoreAccountParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates the specified Data Lake Store account information. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param parameters Parameters supplied to update the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, parameters: Models.UpdateDataLakeStoreAccountParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists the Data Lake Store accounts within the subscription. The response includes a link to the + * next page of results, if any. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the Data Lake Store accounts within a specific resource group. The response includes a + * link to the next page of results, if any. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.select, + Parameters.orderby, + Parameters.count, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccountListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.select, + Parameters.orderby, + Parameters.count, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccountListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableKeyVaultOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.NameAvailabilityInformation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CreateDataLakeStoreAccountParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + 201: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.UpdateDataLakeStoreAccountParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + 201: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + 202: { + bodyMapper: Mappers.DataLakeStoreAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccountListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataLakeStoreAccountListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/firewallRules.ts b/packages/@azure/arm-datalake-store/lib/account/operations/firewallRules.ts new file mode 100644 index 000000000000..4b08bc004931 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/firewallRules.ts @@ -0,0 +1,402 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/firewallRulesMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a FirewallRules. */ +export class FirewallRules { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a FirewallRules. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param options The optional parameters + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listByAccountOperationSpec, + callback) as 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 resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: Models.CreateOrUpdateFirewallRuleParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: Models.CreateOrUpdateFirewallRuleParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to create or update. + * @param parameters Parameters supplied to create or update the firewall rule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: Models.CreateOrUpdateFirewallRuleParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, firewallRuleName: string, parameters: Models.CreateOrUpdateFirewallRuleParameters, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + firewallRuleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified Data Lake Store firewall rule. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, firewallRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + firewallRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified firewall rule. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: Models.FirewallRulesUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to update. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, firewallRuleName: string, options: Models.FirewallRulesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: Models.FirewallRulesUpdateOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + firewallRuleName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified firewall rule from the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param firewallRuleName The name of the firewall rule to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + firewallRuleName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CreateOrUpdateFirewallRuleParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.FirewallRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.UpdateFirewallRuleParameters + }, + responses: { + 200: { + bodyMapper: Mappers.FirewallRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/index.ts b/packages/@azure/arm-datalake-store/lib/account/operations/index.ts new file mode 100644 index 000000000000..fe25ee360759 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./accounts"; +export * from "./firewallRules"; +export * from "./virtualNetworkRules"; +export * from "./trustedIdProviders"; +export * from "./operations"; +export * from "./locations"; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/locations.ts b/packages/@azure/arm-datalake-store/lib/account/operations/locations.ts new file mode 100644 index 000000000000..25e357756259 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/locations.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationsMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a Locations. */ +export class Locations { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a Locations. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Gets subscription-level properties and limits for Data Lake Store specified by resource + * location. + * @param location The resource location without whitespace. + * @param [options] The optional parameters + * @returns Promise + */ + getCapability(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The resource location without whitespace. + * @param callback The callback + */ + getCapability(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The resource location without whitespace. + * @param options The optional parameters + * @param callback The callback + */ + getCapability(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getCapability(location: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + getCapabilityOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getCapabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/capability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CapabilityInformation + }, + 404: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/operations.ts b/packages/@azure/arm-datalake-store/lib/account/operations/operations.ts new file mode 100644 index 000000000000..d966c0e72b48 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/operations.ts @@ -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. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a Operations. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available Data Lake Store REST API operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.DataLakeStore/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/trustedIdProviders.ts b/packages/@azure/arm-datalake-store/lib/account/operations/trustedIdProviders.ts new file mode 100644 index 000000000000..d2cb22452f78 --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/trustedIdProviders.ts @@ -0,0 +1,410 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/trustedIdProvidersMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a TrustedIdProviders. */ +export class TrustedIdProviders { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a TrustedIdProviders. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store + * account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param options The optional parameters + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listByAccountOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the specified trusted identity provider. During update, the trusted identity + * provider with the specified name will be replaced with this new provider + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, trustedIdProviderName: string, parameters: Models.CreateOrUpdateTrustedIdProviderParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, trustedIdProviderName: string, parameters: Models.CreateOrUpdateTrustedIdProviderParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param parameters Parameters supplied to create or replace the trusted identity provider. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, trustedIdProviderName: string, parameters: Models.CreateOrUpdateTrustedIdProviderParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, trustedIdProviderName: string, parameters: Models.CreateOrUpdateTrustedIdProviderParameters, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + trustedIdProviderName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified Data Lake Store trusted identity provider. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, trustedIdProviderName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + trustedIdProviderName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified trusted identity provider. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: Models.TrustedIdProvidersUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, trustedIdProviderName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider. This is used for + * differentiation of providers in the account. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options: Models.TrustedIdProvidersUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: Models.TrustedIdProvidersUpdateOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + trustedIdProviderName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified trusted identity provider from the specified Data Lake Store account + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, trustedIdProviderName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param trustedIdProviderName The name of the trusted identity provider to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, trustedIdProviderName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + trustedIdProviderName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the Data Lake Store trusted identity providers within the specified Data Lake Store + * account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TrustedIdProviderListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.trustedIdProviderName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CreateOrUpdateTrustedIdProviderParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TrustedIdProvider + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.trustedIdProviderName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TrustedIdProvider + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.trustedIdProviderName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.UpdateTrustedIdProviderParameters + }, + responses: { + 200: { + bodyMapper: Mappers.TrustedIdProvider + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.trustedIdProviderName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TrustedIdProviderListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/lib/account/operations/virtualNetworkRules.ts b/packages/@azure/arm-datalake-store/lib/account/operations/virtualNetworkRules.ts new file mode 100644 index 000000000000..263aea9a4baa --- /dev/null +++ b/packages/@azure/arm-datalake-store/lib/account/operations/virtualNetworkRules.ts @@ -0,0 +1,402 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualNetworkRulesMappers"; +import * as Parameters from "../models/parameters"; +import { DataLakeStoreAccountManagementClientContext } from "../dataLakeStoreAccountManagementClientContext"; + +/** Class representing a VirtualNetworkRules. */ +export class VirtualNetworkRules { + private readonly client: DataLakeStoreAccountManagementClientContext; + + /** + * Create a VirtualNetworkRules. + * @param {DataLakeStoreAccountManagementClientContext} client Reference to the service client. + */ + constructor(client: DataLakeStoreAccountManagementClientContext) { + this.client = client; + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param options The optional parameters + * @param callback The callback + */ + listByAccount(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listByAccountOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the specified virtual network rule. During update, the virtual network rule + * with the specified name will be replaced with this new virtual network rule. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, parameters: Models.CreateOrUpdateVirtualNetworkRuleParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, parameters: Models.CreateOrUpdateVirtualNetworkRuleParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to create or update. + * @param parameters Parameters supplied to create or update the virtual network rule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, parameters: Models.CreateOrUpdateVirtualNetworkRuleParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, parameters: Models.CreateOrUpdateVirtualNetworkRuleParameters, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + virtualNetworkRuleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified Data Lake Store virtual network rule. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + virtualNetworkRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified virtual network rule. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: Models.VirtualNetworkRulesUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to update. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options: Models.VirtualNetworkRulesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: Models.VirtualNetworkRulesUpdateOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + virtualNetworkRuleName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified virtual network rule from the specified Data Lake Store account. + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group. + * @param accountName The name of the Data Lake Store account. + * @param virtualNetworkRuleName The name of the virtual network rule to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + virtualNetworkRuleName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.virtualNetworkRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CreateOrUpdateVirtualNetworkRuleParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.virtualNetworkRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.virtualNetworkRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.UpdateVirtualNetworkRuleParameters + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.virtualNetworkRuleName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datalake-store/package.json b/packages/@azure/arm-datalake-store/package.json new file mode 100644 index 000000000000..da28646608b5 --- /dev/null +++ b/packages/@azure/arm-datalake-store/package.json @@ -0,0 +1,39 @@ +{ + "name": "@azure/arm-datalake-store", + "author": "Microsoft Corporation", + "description": "DataLakeStoreAccountManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "ms-rest-azure-js": "~0.17.165", + "ms-rest-js": "~0.22.434" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./cjs/dataLakeStoreAccountManagementClient.js", + "module": "./esm/dataLakeStoreAccountManagementClient.js", + "types": "./cjs/dataLakeStoreAccountManagementClient.d.ts", + "devDependencies": { + "tslib": "^1.9.3", + "typescript": "^3.0.3", + "webpack": "^4.17.2", + "webpack-cli": "^3.1.0" + }, + "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-datalake-store", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json && webpack", + "prepare": "npm run build" + } +} diff --git a/packages/@azure/arm-datalake-store/tsconfig.esm.json b/packages/@azure/arm-datalake-store/tsconfig.esm.json new file mode 100644 index 000000000000..0b3aed07505c --- /dev/null +++ b/packages/@azure/arm-datalake-store/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "./esm", + "module": "es6", + "target": "es5" + } +} diff --git a/packages/@azure/arm-datalake-store/tsconfig.json b/packages/@azure/arm-datalake-store/tsconfig.json new file mode 100644 index 000000000000..d5b25971c029 --- /dev/null +++ b/packages/@azure/arm-datalake-store/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6"], + "declaration": true, + "outDir": "./cjs" + }, + "include": ["./lib/**/*"], + "exclude": ["node_modules"] +} diff --git a/packages/@azure/arm-datalake-store/webpack.config.js b/packages/@azure/arm-datalake-store/webpack.config.js new file mode 100644 index 000000000000..b4930a974ead --- /dev/null +++ b/packages/@azure/arm-datalake-store/webpack.config.js @@ -0,0 +1,30 @@ +// This is a template webpack config file with minimal configuration. +// Users are free to create their own webpack configuration files in their application. +const path = require('path'); + +/** + * @type {import('webpack').Configuration} + */ +const config = { + mode: 'production', + entry: './esm/dataLakeStoreAccountManagementClient.js', + devtool: 'source-map', + output: { + filename: 'dataLakeStoreAccountManagementClientBundle.js', + path: __dirname, + libraryTarget: 'var', + library: 'dataLakeStoreAccountManagementClient' + }, + // "ms-rest-js" and "ms-rest-azure-js" are dependencies of this library. + // Customer is expected to import/include this library in browser javascript + // (probably using the script tag in their html file). + externals: { + "ms-rest-js": "msRest", + "ms-rest-azure-js": "msRestAzure" + }, + resolve: { + extensions: [".tsx", ".ts", ".js"] + } +}; + +module.exports = config;