diff --git a/sdk/eventhub/arm-eventhub/LICENSE.txt b/sdk/eventhub/arm-eventhub/LICENSE.txt
new file mode 100644
index 000000000000..b73b4a1293c3
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 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/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md
new file mode 100644
index 000000000000..cfa78a7c863a
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/README.md
@@ -0,0 +1,96 @@
+## Azure EventHubManagementClient SDK for JavaScript
+
+This package contains an isomorphic SDK for EventHubManagementClient.
+
+### Currently supported environments
+
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+### How to Install
+
+```bash
+npm install @azure/arm-eventhub
+```
+
+### How to use
+
+#### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
+
+##### Install @azure/ms-rest-nodeauth
+
+```bash
+npm install @azure/ms-rest-nodeauth
+```
+
+##### Sample code
+
+```typescript
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
+import { EventHubManagementClient, EventHubManagementModels, EventHubManagementMappers } from "@azure/arm-eventhub";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new EventHubManagementClient(creds, subscriptionId);
+ client.operations.list().then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+#### browser - Authentication, client creation and list operations as an example written in JavaScript.
+
+##### Install @azure/ms-rest-browserauth
+
+```bash
+npm install @azure/ms-rest-browserauth
+```
+
+##### Sample code
+
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-eventhub sample
+
+
+
+
+
+
+
+
+```
+
+## Related projects
+
+- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/sdk/eventhub/arm-eventhub/lib/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/lib/eventHubManagementClient.ts
new file mode 100644
index 000000000000..259d5c8b7d79
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/eventHubManagementClient.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 "@azure/ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { EventHubManagementClientContext } from "./eventHubManagementClientContext";
+
+
+class EventHubManagementClient extends EventHubManagementClientContext {
+ // Operation groups
+ operations: operations.Operations;
+ namespaces: operations.Namespaces;
+ disasterRecoveryConfigs: operations.DisasterRecoveryConfigs;
+ eventHubs: operations.EventHubs;
+ consumerGroups: operations.ConsumerGroups;
+ regions: operations.Regions;
+
+ /**
+ * Initializes a new instance of the EventHubManagementClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Subscription credentials that uniquely identify a 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.EventHubManagementClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.operations = new operations.Operations(this);
+ this.namespaces = new operations.Namespaces(this);
+ this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this);
+ this.eventHubs = new operations.EventHubs(this);
+ this.consumerGroups = new operations.ConsumerGroups(this);
+ this.regions = new operations.Regions(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ EventHubManagementClient,
+ EventHubManagementClientContext,
+ Models as EventHubManagementModels,
+ Mappers as EventHubManagementMappers
+};
+export * from "./operations";
diff --git a/sdk/eventhub/arm-eventhub/lib/eventHubManagementClientContext.ts b/sdk/eventhub/arm-eventhub/lib/eventHubManagementClientContext.ts
new file mode 100644
index 000000000000..c88d00f4595d
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/eventHubManagementClientContext.ts
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+
+const packageName = "@azure/arm-eventhub";
+const packageVersion = "3.2.0";
+
+export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient {
+ credentials: msRest.ServiceClientCredentials;
+ subscriptionId: string;
+ apiVersion?: string;
+
+ /**
+ * Initializes a new instance of the EventHubManagementClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Subscription credentials that uniquely identify a 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.EventHubManagementClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ if(!options.userAgent) {
+ const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
+ options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
+ }
+
+ super(credentials, options);
+
+ this.apiVersion = '2017-04-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;
+
+ 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/sdk/eventhub/arm-eventhub/lib/models/consumerGroupsMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/consumerGroupsMappers.ts
new file mode 100644
index 000000000000..af386b01b841
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/consumerGroupsMappers.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 {
+ ConsumerGroup,
+ Resource,
+ BaseResource,
+ ErrorResponse,
+ ConsumerGroupListResult,
+ TrackedResource,
+ EHNamespace,
+ Sku,
+ AuthorizationRule,
+ Eventhub,
+ CaptureDescription,
+ Destination,
+ ArmDisasterRecovery,
+ MessagingRegions,
+ MessagingRegionsProperties,
+ MessagingPlan,
+ NetworkRuleSet,
+ NWRuleSetVirtualNetworkRules,
+ Subnet,
+ NWRuleSetIpRules
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/models/disasterRecoveryConfigsMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/disasterRecoveryConfigsMappers.ts
new file mode 100644
index 000000000000..2213d9c9796e
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/disasterRecoveryConfigsMappers.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 {
+ CheckNameAvailabilityParameter,
+ CheckNameAvailabilityResult,
+ ErrorResponse,
+ ArmDisasterRecoveryListResult,
+ ArmDisasterRecovery,
+ Resource,
+ BaseResource,
+ AuthorizationRuleListResult,
+ AuthorizationRule,
+ AccessKeys,
+ TrackedResource,
+ EHNamespace,
+ Sku,
+ Eventhub,
+ CaptureDescription,
+ Destination,
+ ConsumerGroup,
+ MessagingRegions,
+ MessagingRegionsProperties,
+ MessagingPlan,
+ NetworkRuleSet,
+ NWRuleSetVirtualNetworkRules,
+ Subnet,
+ NWRuleSetIpRules
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/models/eventHubsMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/eventHubsMappers.ts
new file mode 100644
index 000000000000..5218bebe06ee
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/eventHubsMappers.ts
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 {
+ EventHubListResult,
+ Eventhub,
+ Resource,
+ BaseResource,
+ CaptureDescription,
+ Destination,
+ ErrorResponse,
+ AuthorizationRuleListResult,
+ AuthorizationRule,
+ AccessKeys,
+ RegenerateAccessKeyParameters,
+ TrackedResource,
+ EHNamespace,
+ Sku,
+ ConsumerGroup,
+ ArmDisasterRecovery,
+ MessagingRegions,
+ MessagingRegionsProperties,
+ MessagingPlan,
+ NetworkRuleSet,
+ NWRuleSetVirtualNetworkRules,
+ Subnet,
+ NWRuleSetIpRules
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/models/index.ts b/sdk/eventhub/arm-eventhub/lib/models/index.ts
new file mode 100644
index 000000000000..3b09b1ee1afa
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/index.ts
@@ -0,0 +1,1796 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/ms-rest-js";
+
+export { BaseResource, CloudError };
+
+
+/**
+ * @interface
+ * An interface representing Resource.
+ * The Resource definition
+ *
+ * @extends BaseResource
+ */
+export interface Resource extends BaseResource {
+ /**
+ * @member {string} [id] Resource Id
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [name] Resource name
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [type] Resource type
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly type?: string;
+}
+
+/**
+ * @interface
+ * An interface representing TrackedResource.
+ * Definition of Resource
+ *
+ * @extends Resource
+ */
+export interface TrackedResource extends Resource {
+ /**
+ * @member {string} [location] Resource location
+ */
+ location?: string;
+ /**
+ * @member {{ [propertyName: string]: string }} [tags] Resource tags
+ */
+ tags?: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing Sku.
+ * SKU parameters supplied to the create namespace operation
+ *
+ */
+export interface Sku {
+ /**
+ * @member {SkuName} name Name of this SKU. Possible values include: 'Basic',
+ * 'Standard'
+ */
+ name: SkuName;
+ /**
+ * @member {SkuTier} [tier] The billing tier of this particular SKU. Possible
+ * values include: 'Basic', 'Standard'
+ */
+ tier?: SkuTier;
+ /**
+ * @member {number} [capacity] The Event Hubs throughput units, value should
+ * be 0 to 20 throughput units.
+ */
+ capacity?: number;
+}
+
+/**
+ * @interface
+ * An interface representing EHNamespace.
+ * Single Namespace item in List or Get Operation
+ *
+ * @extends TrackedResource
+ */
+export interface EHNamespace extends TrackedResource {
+ /**
+ * @member {Sku} [sku] Properties of sku resource
+ */
+ sku?: Sku;
+ /**
+ * @member {string} [provisioningState] Provisioning state of the Namespace.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provisioningState?: string;
+ /**
+ * @member {Date} [createdAt] The time the Namespace was created.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly createdAt?: Date;
+ /**
+ * @member {Date} [updatedAt] The time the Namespace was updated.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly updatedAt?: Date;
+ /**
+ * @member {string} [serviceBusEndpoint] Endpoint you can use to perform
+ * Service Bus operations.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly serviceBusEndpoint?: string;
+ /**
+ * @member {string} [metricId] Identifier for Azure Insights metrics.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly metricId?: string;
+ /**
+ * @member {boolean} [isAutoInflateEnabled] Value that indicates whether
+ * AutoInflate is enabled for eventhub namespace.
+ */
+ isAutoInflateEnabled?: boolean;
+ /**
+ * @member {number} [maximumThroughputUnits] Upper limit of throughput units
+ * when AutoInflate is enabled, value should be within 0 to 20 throughput
+ * units. ( '0' if AutoInflateEnabled = true)
+ */
+ maximumThroughputUnits?: number;
+ /**
+ * @member {boolean} [kafkaEnabled] Value that indicates whether Kafka is
+ * enabled for eventhub namespace.
+ */
+ kafkaEnabled?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing AuthorizationRule.
+ * Single item in a List or Get AuthorizationRule operation
+ *
+ * @extends Resource
+ */
+export interface AuthorizationRule extends Resource {
+ /**
+ * @member {AccessRights[]} rights The rights associated with the rule.
+ */
+ rights: AccessRights[];
+}
+
+/**
+ * @interface
+ * An interface representing AccessKeys.
+ * Namespace/EventHub Connection String
+ *
+ */
+export interface AccessKeys {
+ /**
+ * @member {string} [primaryConnectionString] Primary connection string of
+ * the created namespace AuthorizationRule.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryConnectionString?: string;
+ /**
+ * @member {string} [secondaryConnectionString] Secondary connection string
+ * of the created namespace AuthorizationRule.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly secondaryConnectionString?: string;
+ /**
+ * @member {string} [aliasPrimaryConnectionString] Primary connection string
+ * of the alias if GEO DR is enabled
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly aliasPrimaryConnectionString?: string;
+ /**
+ * @member {string} [aliasSecondaryConnectionString] Secondary connection
+ * string of the alias if GEO DR is enabled
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly aliasSecondaryConnectionString?: string;
+ /**
+ * @member {string} [primaryKey] A base64-encoded 256-bit primary key for
+ * signing and validating the SAS token.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryKey?: string;
+ /**
+ * @member {string} [secondaryKey] A base64-encoded 256-bit primary key for
+ * signing and validating the SAS token.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly secondaryKey?: string;
+ /**
+ * @member {string} [keyName] A string that describes the AuthorizationRule.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly keyName?: string;
+}
+
+/**
+ * @interface
+ * An interface representing RegenerateAccessKeyParameters.
+ * Parameters supplied to the Regenerate Authorization Rule operation,
+ * specifies which key needs to be reset.
+ *
+ */
+export interface RegenerateAccessKeyParameters {
+ /**
+ * @member {KeyType} keyType The access key to regenerate. Possible values
+ * include: 'PrimaryKey', 'SecondaryKey'
+ */
+ keyType: KeyType;
+ /**
+ * @member {string} [key] Optional, if the key value provided, is set for
+ * KeyType or autogenerated Key value set for keyType
+ */
+ key?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Destination.
+ * Capture storage details for capture description
+ *
+ */
+export interface Destination {
+ /**
+ * @member {string} [name] Name for capture destination
+ */
+ name?: string;
+ /**
+ * @member {string} [storageAccountResourceId] Resource id of the storage
+ * account to be used to create the blobs
+ */
+ storageAccountResourceId?: string;
+ /**
+ * @member {string} [blobContainer] Blob container Name
+ */
+ blobContainer?: string;
+ /**
+ * @member {string} [archiveNameFormat] Blob naming convention for archive,
+ * e.g.
+ * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}.
+ * Here all the parameters (Namespace,EventHub .. etc) are mandatory
+ * irrespective of order
+ */
+ archiveNameFormat?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CaptureDescription.
+ * Properties to configure capture description for eventhub
+ *
+ */
+export interface CaptureDescription {
+ /**
+ * @member {boolean} [enabled] A value that indicates whether capture
+ * description is enabled.
+ */
+ enabled?: boolean;
+ /**
+ * @member {EncodingCaptureDescription} [encoding] Enumerates the possible
+ * values for the encoding format of capture description. Note: 'AvroDeflate'
+ * will be deprecated in New API Version. Possible values include: 'Avro',
+ * 'AvroDeflate'
+ */
+ encoding?: EncodingCaptureDescription;
+ /**
+ * @member {number} [intervalInSeconds] The time window allows you to set the
+ * frequency with which the capture to Azure Blobs will happen, value should
+ * between 60 to 900 seconds
+ */
+ intervalInSeconds?: number;
+ /**
+ * @member {number} [sizeLimitInBytes] The size window defines the amount of
+ * data built up in your Event Hub before an capture operation, value should
+ * be between 10485760 to 524288000 bytes
+ */
+ sizeLimitInBytes?: number;
+ /**
+ * @member {Destination} [destination] Properties of Destination where
+ * capture will be stored. (Storage Account, Blob Names)
+ */
+ destination?: Destination;
+ /**
+ * @member {boolean} [skipEmptyArchives] A value that indicates whether to
+ * Skip Empty Archives
+ */
+ skipEmptyArchives?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing Eventhub.
+ * Single item in List or Get Event Hub operation
+ *
+ * @extends Resource
+ */
+export interface Eventhub extends Resource {
+ /**
+ * @member {string[]} [partitionIds] Current number of shards on the Event
+ * Hub.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly partitionIds?: string[];
+ /**
+ * @member {Date} [createdAt] Exact time the Event Hub was created.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly createdAt?: Date;
+ /**
+ * @member {Date} [updatedAt] The exact time the message was updated.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly updatedAt?: Date;
+ /**
+ * @member {number} [messageRetentionInDays] Number of days to retain the
+ * events for this Event Hub, value should be 1 to 7 days
+ */
+ messageRetentionInDays?: number;
+ /**
+ * @member {number} [partitionCount] Number of partitions created for the
+ * Event Hub, allowed values are from 1 to 32 partitions.
+ */
+ partitionCount?: number;
+ /**
+ * @member {EntityStatus} [status] Enumerates the possible values for the
+ * status of the Event Hub. Possible values include: 'Active', 'Disabled',
+ * 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting',
+ * 'Renaming', 'Unknown'
+ */
+ status?: EntityStatus;
+ /**
+ * @member {CaptureDescription} [captureDescription] Properties of capture
+ * description
+ */
+ captureDescription?: CaptureDescription;
+}
+
+/**
+ * @interface
+ * An interface representing ConsumerGroup.
+ * Single item in List or Get Consumer group operation
+ *
+ * @extends Resource
+ */
+export interface ConsumerGroup extends Resource {
+ /**
+ * @member {Date} [createdAt] Exact time the message was created.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly createdAt?: Date;
+ /**
+ * @member {Date} [updatedAt] The exact time the message was updated.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly updatedAt?: Date;
+ /**
+ * @member {string} [userMetadata] User Metadata is a placeholder to store
+ * user-defined string data with maximum length 1024. e.g. it can be used to
+ * store descriptive data, such as list of teams and their contact
+ * information also user-defined configuration settings can be stored.
+ */
+ userMetadata?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CheckNameAvailabilityParameter.
+ * Parameter supplied to check Namespace name availability operation
+ *
+ */
+export interface CheckNameAvailabilityParameter {
+ /**
+ * @member {string} name Name to check the namespace name availability
+ */
+ name: string;
+}
+
+/**
+ * @interface
+ * An interface representing CheckNameAvailabilityResult.
+ * The Result of the CheckNameAvailability operation
+ *
+ */
+export interface CheckNameAvailabilityResult {
+ /**
+ * @member {string} [message] The detailed info regarding the reason
+ * associated with the Namespace.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly message?: string;
+ /**
+ * @member {boolean} [nameAvailable] Value indicating Namespace is
+ * availability, true if the Namespace is available; otherwise, false.
+ */
+ nameAvailable?: boolean;
+ /**
+ * @member {UnavailableReason} [reason] The reason for unavailability of a
+ * Namespace. Possible values include: 'None', 'InvalidName',
+ * 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown',
+ * 'TooManyNamespaceInCurrentSubscription'
+ */
+ reason?: UnavailableReason;
+}
+
+/**
+ * @interface
+ * An interface representing OperationDisplay.
+ * The object that represents the operation.
+ *
+ */
+export interface OperationDisplay {
+ /**
+ * @member {string} [provider] Service provider: Microsoft.EventHub
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: string;
+ /**
+ * @member {string} [resource] Resource on which the operation is performed:
+ * Invoice, etc.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly resource?: string;
+ /**
+ * @member {string} [operation] Operation type: Read, write, delete, etc.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly operation?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Operation.
+ * A Event Hub REST API operation
+ *
+ */
+export interface Operation {
+ /**
+ * @member {string} [name] Operation name: {provider}/{resource}/{operation}
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {OperationDisplay} [display] The object that represents the
+ * operation.
+ */
+ display?: OperationDisplay;
+}
+
+/**
+ * @interface
+ * An interface representing ErrorResponse.
+ * Error response indicates EventHub service is not able to process the
+ * incoming request. The reason is provided in the error message.
+ *
+ */
+export interface ErrorResponse {
+ /**
+ * @member {string} [code] Error code.
+ */
+ code?: string;
+ /**
+ * @member {string} [message] Error message indicating why the operation
+ * failed.
+ */
+ message?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ArmDisasterRecovery.
+ * Single item in List or Get Alias(Disaster Recovery configuration) operation
+ *
+ * @extends Resource
+ */
+export interface ArmDisasterRecovery extends Resource {
+ /**
+ * @member {ProvisioningStateDR} [provisioningState] Provisioning state of
+ * the Alias(Disaster Recovery configuration) - possible values 'Accepted' or
+ * 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded',
+ * 'Failed'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provisioningState?: ProvisioningStateDR;
+ /**
+ * @member {string} [partnerNamespace] ARM Id of the Primary/Secondary
+ * eventhub namespace name, which is part of GEO DR pairing
+ */
+ partnerNamespace?: string;
+ /**
+ * @member {string} [alternateName] Alternate name specified when alias and
+ * namespace names are same.
+ */
+ alternateName?: string;
+ /**
+ * @member {RoleDisasterRecovery} [role] role of namespace in GEO DR -
+ * possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'.
+ * Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly role?: RoleDisasterRecovery;
+ /**
+ * @member {number} [pendingReplicationOperationsCount] Number of entities
+ * pending to be replicated.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly pendingReplicationOperationsCount?: number;
+}
+
+/**
+ * @interface
+ * An interface representing MessagingRegionsProperties.
+ */
+export interface MessagingRegionsProperties {
+ /**
+ * @member {string} [code] Region code
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly code?: string;
+ /**
+ * @member {string} [fullName] Full name of the region
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly fullName?: string;
+}
+
+/**
+ * @interface
+ * An interface representing MessagingRegions.
+ * Messaging Region
+ *
+ * @extends TrackedResource
+ */
+export interface MessagingRegions extends TrackedResource {
+ /**
+ * @member {MessagingRegionsProperties} [properties]
+ */
+ properties?: MessagingRegionsProperties;
+}
+
+/**
+ * @interface
+ * An interface representing MessagingPlan.
+ * Messaging Plan for the namespace
+ *
+ * @extends TrackedResource
+ */
+export interface MessagingPlan extends TrackedResource {
+ /**
+ * @member {number} [sku] Sku type
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly sku?: number;
+ /**
+ * @member {number} [selectedEventHubUnit] Selected event hub unit
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly selectedEventHubUnit?: number;
+ /**
+ * @member {Date} [updatedAt] The exact time the messaging plan was updated.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly updatedAt?: Date;
+ /**
+ * @member {number} [revision] revision number
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly revision?: number;
+}
+
+/**
+ * @interface
+ * An interface representing Subnet.
+ * Properties supplied for Subnet
+ *
+ */
+export interface Subnet {
+ /**
+ * @member {string} id Resource ID of Virtual Network Subnet
+ */
+ id: string;
+}
+
+/**
+ * @interface
+ * An interface representing NWRuleSetIpRules.
+ * Description of NetWorkRuleSet - IpRules resource.
+ *
+ */
+export interface NWRuleSetIpRules {
+ /**
+ * @member {string} [ipMask] IP Mask
+ */
+ ipMask?: string;
+ /**
+ * @member {NetworkRuleIPAction} [action] The IP Filter Action. Possible
+ * values include: 'Allow'. Default value: 'Allow' .
+ */
+ action?: NetworkRuleIPAction;
+}
+
+/**
+ * @interface
+ * An interface representing NWRuleSetVirtualNetworkRules.
+ * Description of VirtualNetworkRules - NetworkRules resource.
+ *
+ */
+export interface NWRuleSetVirtualNetworkRules {
+ /**
+ * @member {Subnet} [subnet] Subnet properties
+ */
+ subnet?: Subnet;
+ /**
+ * @member {boolean} [ignoreMissingVnetServiceEndpoint] Value that indicates
+ * whether to ignore missing VNet Service Endpoint
+ */
+ ignoreMissingVnetServiceEndpoint?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing NetworkRuleSet.
+ * Description of NetworkRuleSet resource.
+ *
+ * @extends Resource
+ */
+export interface NetworkRuleSet extends Resource {
+ /**
+ * @member {DefaultAction} [defaultAction] Default Action for Network Rule
+ * Set. Possible values include: 'Allow', 'Deny'
+ */
+ defaultAction?: DefaultAction;
+ /**
+ * @member {NWRuleSetVirtualNetworkRules[]} [virtualNetworkRules] List
+ * VirtualNetwork Rules
+ */
+ virtualNetworkRules?: NWRuleSetVirtualNetworkRules[];
+ /**
+ * @member {NWRuleSetIpRules[]} [ipRules] List of IpRules
+ */
+ ipRules?: NWRuleSetIpRules[];
+}
+
+/**
+ * @interface
+ * An interface representing EventHubsListByNamespaceOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface EventHubsListByNamespaceOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {number} [skip] Skip is only used if a previous operation returned
+ * a partial result. If a previous response contains a nextLink element, the
+ * value of the nextLink element will include a skip parameter that specifies
+ * a starting point to use for subsequent calls.
+ */
+ skip?: number;
+ /**
+ * @member {number} [top] May be used to limit the number of results to the
+ * most recent N usageDetails.
+ */
+ top?: number;
+}
+
+/**
+ * @interface
+ * An interface representing ConsumerGroupsListByEventHubOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ConsumerGroupsListByEventHubOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {number} [skip] Skip is only used if a previous operation returned
+ * a partial result. If a previous response contains a nextLink element, the
+ * value of the nextLink element will include a skip parameter that specifies
+ * a starting point to use for subsequent calls.
+ */
+ skip?: number;
+ /**
+ * @member {number} [top] May be used to limit the number of results to the
+ * most recent N usageDetails.
+ */
+ top?: number;
+}
+
+/**
+ * @interface
+ * An interface representing EventHubManagementClientOptions.
+ * @extends AzureServiceClientOptions
+ */
+export interface EventHubManagementClientOptions extends AzureServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * Result of the request to list Event Hub operations. It contains a list of
+ * operations and a URL link to get the next set of results.
+ *
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ /**
+ * @member {string} [nextLink] URL to get the next set of operation list
+ * results if there are any.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the EHNamespaceListResult.
+ * The response of the List Namespace operation
+ *
+ * @extends Array
+ */
+export interface EHNamespaceListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains incomplete list of namespaces.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the AuthorizationRuleListResult.
+ * The response from the List namespace operation.
+ *
+ * @extends Array
+ */
+export interface AuthorizationRuleListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains an incomplete list of Authorization Rules
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the ArmDisasterRecoveryListResult.
+ * The result of the List Alias(Disaster Recovery configuration) operation.
+ *
+ * @extends Array
+ */
+export interface ArmDisasterRecoveryListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains incomplete list of Alias(Disaster Recovery configuration)
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the EventHubListResult.
+ * The result of the List EventHubs operation.
+ *
+ * @extends Array
+ */
+export interface EventHubListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains incomplete list of EventHubs.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the ConsumerGroupListResult.
+ * The result to the List Consumer Group operation.
+ *
+ * @extends Array
+ */
+export interface ConsumerGroupListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains incomplete list of Consumer Group
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the MessagingRegionsListResult.
+ * The response of the List MessagingRegions operation.
+ *
+ * @extends Array
+ */
+export interface MessagingRegionsListResult extends Array {
+ /**
+ * @member {string} [nextLink] Link to the next set of results. Not empty if
+ * Value contains incomplete list of MessagingRegions.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly nextLink?: string;
+}
+
+/**
+ * Defines values for SkuName.
+ * Possible values include: 'Basic', 'Standard'
+ * @readonly
+ * @enum {string}
+ */
+export type SkuName = 'Basic' | 'Standard';
+
+/**
+ * Defines values for SkuTier.
+ * Possible values include: 'Basic', 'Standard'
+ * @readonly
+ * @enum {string}
+ */
+export type SkuTier = 'Basic' | 'Standard';
+
+/**
+ * Defines values for AccessRights.
+ * Possible values include: 'Manage', 'Send', 'Listen'
+ * @readonly
+ * @enum {string}
+ */
+export type AccessRights = 'Manage' | 'Send' | 'Listen';
+
+/**
+ * Defines values for KeyType.
+ * Possible values include: 'PrimaryKey', 'SecondaryKey'
+ * @readonly
+ * @enum {string}
+ */
+export type KeyType = 'PrimaryKey' | 'SecondaryKey';
+
+/**
+ * Defines values for EntityStatus.
+ * Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled',
+ * 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @readonly
+ * @enum {string}
+ */
+export type EntityStatus = 'Active' | 'Disabled' | 'Restoring' | 'SendDisabled' | 'ReceiveDisabled' | 'Creating' | 'Deleting' | 'Renaming' | 'Unknown';
+
+/**
+ * Defines values for EncodingCaptureDescription.
+ * Possible values include: 'Avro', 'AvroDeflate'
+ * @readonly
+ * @enum {string}
+ */
+export type EncodingCaptureDescription = 'Avro' | 'AvroDeflate';
+
+/**
+ * Defines values for UnavailableReason.
+ * Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse',
+ * 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'
+ * @readonly
+ * @enum {string}
+ */
+export type UnavailableReason = 'None' | 'InvalidName' | 'SubscriptionIsDisabled' | 'NameInUse' | 'NameInLockdown' | 'TooManyNamespaceInCurrentSubscription';
+
+/**
+ * Defines values for ProvisioningStateDR.
+ * Possible values include: 'Accepted', 'Succeeded', 'Failed'
+ * @readonly
+ * @enum {string}
+ */
+export type ProvisioningStateDR = 'Accepted' | 'Succeeded' | 'Failed';
+
+/**
+ * Defines values for RoleDisasterRecovery.
+ * Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary'
+ * @readonly
+ * @enum {string}
+ */
+export type RoleDisasterRecovery = 'Primary' | 'PrimaryNotReplicating' | 'Secondary';
+
+/**
+ * Defines values for NetworkRuleIPAction.
+ * Possible values include: 'Allow'
+ * @readonly
+ * @enum {string}
+ */
+export type NetworkRuleIPAction = 'Allow';
+
+/**
+ * Defines values for DefaultAction.
+ * Possible values include: 'Allow', 'Deny'
+ * @readonly
+ * @enum {string}
+ */
+export type DefaultAction = 'Allow' | 'Deny';
+
+/**
+ * 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 listNext operation.
+ */
+export type OperationsListNextResponse = 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 checkNameAvailability operation.
+ */
+export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & {
+ /**
+ * 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: CheckNameAvailabilityResult;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type NamespacesListResponse = EHNamespaceListResult & {
+ /**
+ * 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: EHNamespaceListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByResourceGroup operation.
+ */
+export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & {
+ /**
+ * 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: EHNamespaceListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type NamespacesCreateOrUpdateResponse = EHNamespace & {
+ /**
+ * 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: EHNamespace;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type NamespacesGetResponse = EHNamespace & {
+ /**
+ * 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: EHNamespace;
+ };
+};
+
+/**
+ * Contains response data for the update operation.
+ */
+export type NamespacesUpdateResponse = EHNamespace & {
+ /**
+ * 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: EHNamespace;
+ };
+};
+
+/**
+ * Contains response data for the getMessagingPlan operation.
+ */
+export type NamespacesGetMessagingPlanResponse = MessagingPlan & {
+ /**
+ * 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: MessagingPlan;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRules operation.
+ */
+export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateAuthorizationRule operation.
+ */
+export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & {
+ /**
+ * 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: AuthorizationRule;
+ };
+};
+
+/**
+ * Contains response data for the getAuthorizationRule operation.
+ */
+export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & {
+ /**
+ * 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: AuthorizationRule;
+ };
+};
+
+/**
+ * Contains response data for the listKeys operation.
+ */
+export type NamespacesListKeysResponse = AccessKeys & {
+ /**
+ * 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: AccessKeys;
+ };
+};
+
+/**
+ * Contains response data for the regenerateKeys operation.
+ */
+export type NamespacesRegenerateKeysResponse = AccessKeys & {
+ /**
+ * 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: AccessKeys;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateNetworkRuleSet operation.
+ */
+export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & {
+ /**
+ * 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: NetworkRuleSet;
+ };
+};
+
+/**
+ * Contains response data for the getNetworkRuleSet operation.
+ */
+export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & {
+ /**
+ * 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: NetworkRuleSet;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateOrUpdate operation.
+ */
+export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & {
+ /**
+ * 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: EHNamespace;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type NamespacesListNextResponse = EHNamespaceListResult & {
+ /**
+ * 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: EHNamespaceListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByResourceGroupNext operation.
+ */
+export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & {
+ /**
+ * 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: EHNamespaceListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRulesNext operation.
+ */
+export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the checkNameAvailability operation.
+ */
+export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & {
+ /**
+ * 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: CheckNameAvailabilityResult;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult & {
+ /**
+ * 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: ArmDisasterRecoveryListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery & {
+ /**
+ * 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: ArmDisasterRecovery;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & {
+ /**
+ * 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: ArmDisasterRecovery;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRules operation.
+ */
+export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the getAuthorizationRule operation.
+ */
+export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule & {
+ /**
+ * 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: AuthorizationRule;
+ };
+};
+
+/**
+ * Contains response data for the listKeys operation.
+ */
+export type DisasterRecoveryConfigsListKeysResponse = AccessKeys & {
+ /**
+ * 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: AccessKeys;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult & {
+ /**
+ * 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: ArmDisasterRecoveryListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRulesNext operation.
+ */
+export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByNamespace operation.
+ */
+export type EventHubsListByNamespaceResponse = EventHubListResult & {
+ /**
+ * 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: EventHubListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type EventHubsCreateOrUpdateResponse = Eventhub & {
+ /**
+ * 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: Eventhub;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type EventHubsGetResponse = Eventhub & {
+ /**
+ * 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: Eventhub;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRules operation.
+ */
+export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateAuthorizationRule operation.
+ */
+export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & {
+ /**
+ * 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: AuthorizationRule;
+ };
+};
+
+/**
+ * Contains response data for the getAuthorizationRule operation.
+ */
+export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule & {
+ /**
+ * 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: AuthorizationRule;
+ };
+};
+
+/**
+ * Contains response data for the listKeys operation.
+ */
+export type EventHubsListKeysResponse = AccessKeys & {
+ /**
+ * 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: AccessKeys;
+ };
+};
+
+/**
+ * Contains response data for the regenerateKeys operation.
+ */
+export type EventHubsRegenerateKeysResponse = AccessKeys & {
+ /**
+ * 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: AccessKeys;
+ };
+};
+
+/**
+ * Contains response data for the listByNamespaceNext operation.
+ */
+export type EventHubsListByNamespaceNextResponse = EventHubListResult & {
+ /**
+ * 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: EventHubListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAuthorizationRulesNext operation.
+ */
+export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & {
+ /**
+ * 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: AuthorizationRuleListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type ConsumerGroupsCreateOrUpdateResponse = ConsumerGroup & {
+ /**
+ * 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: ConsumerGroup;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type ConsumerGroupsGetResponse = ConsumerGroup & {
+ /**
+ * 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: ConsumerGroup;
+ };
+};
+
+/**
+ * Contains response data for the listByEventHub operation.
+ */
+export type ConsumerGroupsListByEventHubResponse = ConsumerGroupListResult & {
+ /**
+ * 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: ConsumerGroupListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByEventHubNext operation.
+ */
+export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult & {
+ /**
+ * 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: ConsumerGroupListResult;
+ };
+};
+
+/**
+ * Contains response data for the listBySku operation.
+ */
+export type RegionsListBySkuResponse = MessagingRegionsListResult & {
+ /**
+ * 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: MessagingRegionsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listBySkuNext operation.
+ */
+export type RegionsListBySkuNextResponse = MessagingRegionsListResult & {
+ /**
+ * 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: MessagingRegionsListResult;
+ };
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/models/mappers.ts b/sdk/eventhub/arm-eventhub/lib/models/mappers.ts
new file mode 100644
index 000000000000..0c88ff6e9f04
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/mappers.ts
@@ -0,0 +1,1064 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/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"
+ }
+ }
+ }
+ }
+};
+
+export const TrackedResource: msRest.CompositeMapper = {
+ serializedName: "TrackedResource",
+ type: {
+ name: "Composite",
+ className: "TrackedResource",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ location: {
+ serializedName: "location",
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Sku: msRest.CompositeMapper = {
+ serializedName: "Sku",
+ type: {
+ name: "Composite",
+ className: "Sku",
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ tier: {
+ serializedName: "tier",
+ type: {
+ name: "String"
+ }
+ },
+ capacity: {
+ serializedName: "capacity",
+ constraints: {
+ InclusiveMaximum: 20,
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const EHNamespace: msRest.CompositeMapper = {
+ serializedName: "EHNamespace",
+ type: {
+ name: "Composite",
+ className: "EHNamespace",
+ modelProperties: {
+ ...TrackedResource.type.modelProperties,
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "Composite",
+ className: "Sku"
+ }
+ },
+ provisioningState: {
+ readOnly: true,
+ serializedName: "properties.provisioningState",
+ type: {
+ name: "String"
+ }
+ },
+ createdAt: {
+ readOnly: true,
+ serializedName: "properties.createdAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ updatedAt: {
+ readOnly: true,
+ serializedName: "properties.updatedAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ serviceBusEndpoint: {
+ readOnly: true,
+ serializedName: "properties.serviceBusEndpoint",
+ type: {
+ name: "String"
+ }
+ },
+ metricId: {
+ readOnly: true,
+ serializedName: "properties.metricId",
+ type: {
+ name: "String"
+ }
+ },
+ isAutoInflateEnabled: {
+ serializedName: "properties.isAutoInflateEnabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ maximumThroughputUnits: {
+ serializedName: "properties.maximumThroughputUnits",
+ constraints: {
+ InclusiveMaximum: 20,
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ kafkaEnabled: {
+ serializedName: "properties.kafkaEnabled",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const AuthorizationRule: msRest.CompositeMapper = {
+ serializedName: "AuthorizationRule",
+ type: {
+ name: "Composite",
+ className: "AuthorizationRule",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ rights: {
+ required: true,
+ serializedName: "properties.rights",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const AccessKeys: msRest.CompositeMapper = {
+ serializedName: "AccessKeys",
+ type: {
+ name: "Composite",
+ className: "AccessKeys",
+ modelProperties: {
+ primaryConnectionString: {
+ readOnly: true,
+ serializedName: "primaryConnectionString",
+ type: {
+ name: "String"
+ }
+ },
+ secondaryConnectionString: {
+ readOnly: true,
+ serializedName: "secondaryConnectionString",
+ type: {
+ name: "String"
+ }
+ },
+ aliasPrimaryConnectionString: {
+ readOnly: true,
+ serializedName: "aliasPrimaryConnectionString",
+ type: {
+ name: "String"
+ }
+ },
+ aliasSecondaryConnectionString: {
+ readOnly: true,
+ serializedName: "aliasSecondaryConnectionString",
+ type: {
+ name: "String"
+ }
+ },
+ primaryKey: {
+ readOnly: true,
+ serializedName: "primaryKey",
+ type: {
+ name: "String"
+ }
+ },
+ secondaryKey: {
+ readOnly: true,
+ serializedName: "secondaryKey",
+ type: {
+ name: "String"
+ }
+ },
+ keyName: {
+ readOnly: true,
+ serializedName: "keyName",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const RegenerateAccessKeyParameters: msRest.CompositeMapper = {
+ serializedName: "RegenerateAccessKeyParameters",
+ type: {
+ name: "Composite",
+ className: "RegenerateAccessKeyParameters",
+ modelProperties: {
+ keyType: {
+ required: true,
+ serializedName: "keyType",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "PrimaryKey",
+ "SecondaryKey"
+ ]
+ }
+ },
+ key: {
+ serializedName: "key",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Destination: msRest.CompositeMapper = {
+ serializedName: "Destination",
+ type: {
+ name: "Composite",
+ className: "Destination",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ storageAccountResourceId: {
+ serializedName: "properties.storageAccountResourceId",
+ type: {
+ name: "String"
+ }
+ },
+ blobContainer: {
+ serializedName: "properties.blobContainer",
+ type: {
+ name: "String"
+ }
+ },
+ archiveNameFormat: {
+ serializedName: "properties.archiveNameFormat",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CaptureDescription: msRest.CompositeMapper = {
+ serializedName: "CaptureDescription",
+ type: {
+ name: "Composite",
+ className: "CaptureDescription",
+ modelProperties: {
+ enabled: {
+ serializedName: "enabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ encoding: {
+ serializedName: "encoding",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Avro",
+ "AvroDeflate"
+ ]
+ }
+ },
+ intervalInSeconds: {
+ serializedName: "intervalInSeconds",
+ constraints: {
+ InclusiveMaximum: 900,
+ InclusiveMinimum: 60
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ sizeLimitInBytes: {
+ serializedName: "sizeLimitInBytes",
+ constraints: {
+ InclusiveMaximum: 524288000,
+ InclusiveMinimum: 10485760
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ destination: {
+ serializedName: "destination",
+ type: {
+ name: "Composite",
+ className: "Destination"
+ }
+ },
+ skipEmptyArchives: {
+ serializedName: "skipEmptyArchives",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const Eventhub: msRest.CompositeMapper = {
+ serializedName: "Eventhub",
+ type: {
+ name: "Composite",
+ className: "Eventhub",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ partitionIds: {
+ readOnly: true,
+ serializedName: "properties.partitionIds",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ createdAt: {
+ readOnly: true,
+ serializedName: "properties.createdAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ updatedAt: {
+ readOnly: true,
+ serializedName: "properties.updatedAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ messageRetentionInDays: {
+ serializedName: "properties.messageRetentionInDays",
+ constraints: {
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ partitionCount: {
+ serializedName: "properties.partitionCount",
+ constraints: {
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ status: {
+ serializedName: "properties.status",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Active",
+ "Disabled",
+ "Restoring",
+ "SendDisabled",
+ "ReceiveDisabled",
+ "Creating",
+ "Deleting",
+ "Renaming",
+ "Unknown"
+ ]
+ }
+ },
+ captureDescription: {
+ serializedName: "properties.captureDescription",
+ type: {
+ name: "Composite",
+ className: "CaptureDescription"
+ }
+ }
+ }
+ }
+};
+
+export const ConsumerGroup: msRest.CompositeMapper = {
+ serializedName: "ConsumerGroup",
+ type: {
+ name: "Composite",
+ className: "ConsumerGroup",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ createdAt: {
+ readOnly: true,
+ serializedName: "properties.createdAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ updatedAt: {
+ readOnly: true,
+ serializedName: "properties.updatedAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ userMetadata: {
+ serializedName: "properties.userMetadata",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CheckNameAvailabilityParameter: msRest.CompositeMapper = {
+ serializedName: "CheckNameAvailabilityParameter",
+ type: {
+ name: "Composite",
+ className: "CheckNameAvailabilityParameter",
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CheckNameAvailabilityResult: msRest.CompositeMapper = {
+ serializedName: "CheckNameAvailabilityResult",
+ type: {
+ name: "Composite",
+ className: "CheckNameAvailabilityResult",
+ modelProperties: {
+ message: {
+ readOnly: true,
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ },
+ nameAvailable: {
+ serializedName: "nameAvailable",
+ type: {
+ name: "Boolean"
+ }
+ },
+ reason: {
+ serializedName: "reason",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "None",
+ "InvalidName",
+ "SubscriptionIsDisabled",
+ "NameInUse",
+ "NameInLockdown",
+ "TooManyNamespaceInCurrentSubscription"
+ ]
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ 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"
+ }
+ }
+ }
+ }
+};
+
+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"
+ }
+ }
+ }
+ }
+};
+
+export const ErrorResponse: msRest.CompositeMapper = {
+ serializedName: "ErrorResponse",
+ type: {
+ name: "Composite",
+ className: "ErrorResponse",
+ modelProperties: {
+ code: {
+ serializedName: "code",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ArmDisasterRecovery: msRest.CompositeMapper = {
+ serializedName: "ArmDisasterRecovery",
+ type: {
+ name: "Composite",
+ className: "ArmDisasterRecovery",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ provisioningState: {
+ readOnly: true,
+ serializedName: "properties.provisioningState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Accepted",
+ "Succeeded",
+ "Failed"
+ ]
+ }
+ },
+ partnerNamespace: {
+ serializedName: "properties.partnerNamespace",
+ type: {
+ name: "String"
+ }
+ },
+ alternateName: {
+ serializedName: "properties.alternateName",
+ type: {
+ name: "String"
+ }
+ },
+ role: {
+ readOnly: true,
+ serializedName: "properties.role",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Primary",
+ "PrimaryNotReplicating",
+ "Secondary"
+ ]
+ }
+ },
+ pendingReplicationOperationsCount: {
+ readOnly: true,
+ serializedName: "properties.pendingReplicationOperationsCount",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const MessagingRegionsProperties: msRest.CompositeMapper = {
+ serializedName: "MessagingRegions_properties",
+ type: {
+ name: "Composite",
+ className: "MessagingRegionsProperties",
+ modelProperties: {
+ code: {
+ readOnly: true,
+ serializedName: "code",
+ type: {
+ name: "String"
+ }
+ },
+ fullName: {
+ readOnly: true,
+ serializedName: "fullName",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MessagingRegions: msRest.CompositeMapper = {
+ serializedName: "MessagingRegions",
+ type: {
+ name: "Composite",
+ className: "MessagingRegions",
+ modelProperties: {
+ ...TrackedResource.type.modelProperties,
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Composite",
+ className: "MessagingRegionsProperties"
+ }
+ }
+ }
+ }
+};
+
+export const MessagingPlan: msRest.CompositeMapper = {
+ serializedName: "MessagingPlan",
+ type: {
+ name: "Composite",
+ className: "MessagingPlan",
+ modelProperties: {
+ ...TrackedResource.type.modelProperties,
+ sku: {
+ readOnly: true,
+ serializedName: "properties.sku",
+ type: {
+ name: "Number"
+ }
+ },
+ selectedEventHubUnit: {
+ readOnly: true,
+ serializedName: "properties.selectedEventHubUnit",
+ type: {
+ name: "Number"
+ }
+ },
+ updatedAt: {
+ readOnly: true,
+ serializedName: "properties.updatedAt",
+ type: {
+ name: "DateTime"
+ }
+ },
+ revision: {
+ readOnly: true,
+ serializedName: "properties.revision",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const Subnet: msRest.CompositeMapper = {
+ serializedName: "Subnet",
+ type: {
+ name: "Composite",
+ className: "Subnet",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const NWRuleSetIpRules: msRest.CompositeMapper = {
+ serializedName: "NWRuleSetIpRules",
+ type: {
+ name: "Composite",
+ className: "NWRuleSetIpRules",
+ modelProperties: {
+ ipMask: {
+ serializedName: "ipMask",
+ type: {
+ name: "String"
+ }
+ },
+ action: {
+ serializedName: "action",
+ defaultValue: 'Allow',
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const NWRuleSetVirtualNetworkRules: msRest.CompositeMapper = {
+ serializedName: "NWRuleSetVirtualNetworkRules",
+ type: {
+ name: "Composite",
+ className: "NWRuleSetVirtualNetworkRules",
+ modelProperties: {
+ subnet: {
+ serializedName: "subnet",
+ type: {
+ name: "Composite",
+ className: "Subnet"
+ }
+ },
+ ignoreMissingVnetServiceEndpoint: {
+ serializedName: "ignoreMissingVnetServiceEndpoint",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const NetworkRuleSet: msRest.CompositeMapper = {
+ serializedName: "NetworkRuleSet",
+ type: {
+ name: "Composite",
+ className: "NetworkRuleSet",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ defaultAction: {
+ serializedName: "properties.defaultAction",
+ type: {
+ name: "String"
+ }
+ },
+ virtualNetworkRules: {
+ serializedName: "properties.virtualNetworkRules",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "NWRuleSetVirtualNetworkRules"
+ }
+ }
+ }
+ },
+ ipRules: {
+ serializedName: "properties.ipRules",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "NWRuleSetIpRules"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ readOnly: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const EHNamespaceListResult: msRest.CompositeMapper = {
+ serializedName: "EHNamespaceListResult",
+ type: {
+ name: "Composite",
+ className: "EHNamespaceListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "EHNamespace"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const AuthorizationRuleListResult: msRest.CompositeMapper = {
+ serializedName: "AuthorizationRuleListResult",
+ type: {
+ name: "Composite",
+ className: "AuthorizationRuleListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "AuthorizationRule"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ArmDisasterRecoveryListResult: msRest.CompositeMapper = {
+ serializedName: "ArmDisasterRecoveryListResult",
+ type: {
+ name: "Composite",
+ className: "ArmDisasterRecoveryListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ArmDisasterRecovery"
+ }
+ }
+ }
+ },
+ nextLink: {
+ readOnly: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const EventHubListResult: msRest.CompositeMapper = {
+ serializedName: "EventHubListResult",
+ type: {
+ name: "Composite",
+ className: "EventHubListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Eventhub"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ConsumerGroupListResult: msRest.CompositeMapper = {
+ serializedName: "ConsumerGroupListResult",
+ type: {
+ name: "Composite",
+ className: "ConsumerGroupListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ConsumerGroup"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MessagingRegionsListResult: msRest.CompositeMapper = {
+ serializedName: "MessagingRegionsListResult",
+ type: {
+ name: "Composite",
+ className: "MessagingRegionsListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MessagingRegions"
+ }
+ }
+ }
+ },
+ nextLink: {
+ readOnly: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/models/namespacesMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/namespacesMappers.ts
new file mode 100644
index 000000000000..daec776520e6
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/namespacesMappers.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 {
+ CheckNameAvailabilityParameter,
+ CheckNameAvailabilityResult,
+ ErrorResponse,
+ EHNamespaceListResult,
+ EHNamespace,
+ TrackedResource,
+ Resource,
+ BaseResource,
+ Sku,
+ MessagingPlan,
+ AuthorizationRuleListResult,
+ AuthorizationRule,
+ AccessKeys,
+ RegenerateAccessKeyParameters,
+ NetworkRuleSet,
+ NWRuleSetVirtualNetworkRules,
+ Subnet,
+ NWRuleSetIpRules,
+ Eventhub,
+ CaptureDescription,
+ Destination,
+ ConsumerGroup,
+ ArmDisasterRecovery,
+ MessagingRegions,
+ MessagingRegionsProperties
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/models/operationsMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/operationsMappers.ts
new file mode 100644
index 000000000000..715467ec9522
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/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,
+ ErrorResponse
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/models/parameters.ts b/sdk/eventhub/arm-eventhub/lib/models/parameters.ts
new file mode 100644
index 000000000000..f3cc023b3e66
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/parameters.ts
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const alias: msRest.OperationURLParameter = {
+ parameterPath: "alias",
+ mapper: {
+ required: true,
+ serializedName: "alias",
+ constraints: {
+ MaxLength: 50,
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const authorizationRuleName: msRest.OperationURLParameter = {
+ parameterPath: "authorizationRuleName",
+ mapper: {
+ required: true,
+ serializedName: "authorizationRuleName",
+ constraints: {
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const consumerGroupName: msRest.OperationURLParameter = {
+ parameterPath: "consumerGroupName",
+ mapper: {
+ required: true,
+ serializedName: "consumerGroupName",
+ constraints: {
+ MaxLength: 50,
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const eventHubName: msRest.OperationURLParameter = {
+ parameterPath: "eventHubName",
+ mapper: {
+ required: true,
+ serializedName: "eventHubName",
+ constraints: {
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const namespaceName: msRest.OperationURLParameter = {
+ parameterPath: "namespaceName",
+ mapper: {
+ required: true,
+ serializedName: "namespaceName",
+ constraints: {
+ MaxLength: 50,
+ MinLength: 6
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const resourceGroupName: msRest.OperationURLParameter = {
+ parameterPath: "resourceGroupName",
+ mapper: {
+ required: true,
+ serializedName: "resourceGroupName",
+ constraints: {
+ MaxLength: 90,
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const skip: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "skip"
+ ],
+ mapper: {
+ serializedName: "$skip",
+ constraints: {
+ InclusiveMaximum: 1000,
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const sku: msRest.OperationURLParameter = {
+ parameterPath: "sku",
+ mapper: {
+ required: true,
+ serializedName: "sku",
+ constraints: {
+ MaxLength: 50,
+ MinLength: 1
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+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: {
+ InclusiveMaximum: 1000,
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: "Number"
+ }
+ }
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/models/regionsMappers.ts b/sdk/eventhub/arm-eventhub/lib/models/regionsMappers.ts
new file mode 100644
index 000000000000..3e9a9657fb00
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/models/regionsMappers.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 {
+ MessagingRegionsListResult,
+ MessagingRegions,
+ TrackedResource,
+ Resource,
+ BaseResource,
+ MessagingRegionsProperties,
+ ErrorResponse,
+ EHNamespace,
+ Sku,
+ AuthorizationRule,
+ Eventhub,
+ CaptureDescription,
+ Destination,
+ ConsumerGroup,
+ ArmDisasterRecovery,
+ MessagingPlan,
+ NetworkRuleSet,
+ NWRuleSetVirtualNetworkRules,
+ Subnet,
+ NWRuleSetIpRules
+} from "../models/mappers";
+
diff --git a/sdk/eventhub/arm-eventhub/lib/operations/consumerGroups.ts b/sdk/eventhub/arm-eventhub/lib/operations/consumerGroups.ts
new file mode 100644
index 000000000000..fe20df49c3b8
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/operations/consumerGroups.ts
@@ -0,0 +1,356 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/consumerGroupsMappers";
+import * as Parameters from "../models/parameters";
+import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
+
+/** Class representing a ConsumerGroups. */
+export class ConsumerGroups {
+ private readonly client: EventHubManagementClientContext;
+
+ /**
+ * Create a ConsumerGroups.
+ * @param {EventHubManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: EventHubManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, parameters: Models.ConsumerGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ consumerGroupName,
+ parameters,
+ options
+ },
+ createOrUpdateOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ consumerGroupName,
+ options
+ },
+ deleteMethodOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets a description for the specified consumer group.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, consumerGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ consumerGroupName,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group
+ * exists in the Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: Models.ConsumerGroupsListByEventHubOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param callback The callback
+ */
+ listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: Models.ConsumerGroupsListByEventHubOptionalParams, callback: msRest.ServiceCallback): void;
+ listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: Models.ConsumerGroupsListByEventHubOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ options
+ },
+ listByEventHubOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group
+ * exists in the Namespace.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listByEventHubNext(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
+ */
+ listByEventHubNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listByEventHubNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const createOrUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.consumerGroupName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.ConsumerGroup,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ConsumerGroup
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const deleteMethodOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.consumerGroupName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.consumerGroupName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ConsumerGroup
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listByEventHubOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.skip,
+ Parameters.top
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ConsumerGroupListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listByEventHubNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ConsumerGroupListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/lib/operations/disasterRecoveryConfigs.ts
new file mode 100644
index 000000000000..1e51ac33ae15
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/operations/disasterRecoveryConfigs.ts
@@ -0,0 +1,766 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/disasterRecoveryConfigsMappers";
+import * as Parameters from "../models/parameters";
+import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
+
+/** Class representing a DisasterRecoveryConfigs. */
+export class DisasterRecoveryConfigs {
+ private readonly client: EventHubManagementClientContext;
+
+ /**
+ * Create a DisasterRecoveryConfigs.
+ * @param {EventHubManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: EventHubManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Check the give Namespace name availability.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param parameters Parameters to check availability of the given Alias name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param parameters Parameters to check availability of the given Alias name
+ * @param callback The callback
+ */
+ checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param parameters Parameters to check availability of the given Alias name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ parameters,
+ options
+ },
+ checkNameAvailabilityOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations)
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param callback The callback
+ */
+ list(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Creates or updates a new Alias(Disaster Recovery configuration)
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param parameters Parameters required to create an Alias(Disaster Recovery configuration)
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param parameters Parameters required to create an Alias(Disaster Recovery configuration)
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param parameters Parameters required to create an Alias(Disaster Recovery configuration)
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ parameters,
+ options
+ },
+ createOrUpdateOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Deletes an Alias(Disaster Recovery configuration)
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ options
+ },
+ deleteMethodOperationSpec,
+ callback);
+ }
+
+ /**
+ * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * This operation disables the Disaster Recovery and stops replicating changes from primary to
+ * secondary namespaces
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param callback The callback
+ */
+ breakPairing(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ options
+ },
+ breakPairingOperationSpec,
+ callback);
+ }
+
+ /**
+ * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param callback The callback
+ */
+ failOver(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ failOver(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ options
+ },
+ failOverOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets a list of authorization rules for a Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param callback The callback
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ options
+ },
+ listAuthorizationRulesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets an AuthorizationRule for a Namespace by rule name.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param callback The callback
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ authorizationRuleName,
+ options
+ },
+ getAuthorizationRuleOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets the primary and secondary connection strings for the Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @param authorizationRuleName The authorization rule name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ alias,
+ authorizationRuleName,
+ options
+ },
+ listKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations)
+ * @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 | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets a list of authorization rules for a Namespace.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAuthorizationRulesNext(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
+ */
+ listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAuthorizationRulesNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.namespaceName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.CheckNameAvailabilityParameter,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.CheckNameAvailabilityResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ArmDisasterRecoveryListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const createOrUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.ArmDisasterRecovery,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ArmDisasterRecovery
+ },
+ 201: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const deleteMethodOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ArmDisasterRecovery
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const breakPairingOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const failOverOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listAuthorizationRulesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRuleListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const getAuthorizationRuleOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRule
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listKeysOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.alias,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AccessKeys
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ArmDisasterRecoveryListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRuleListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/operations/eventHubs.ts b/sdk/eventhub/arm-eventhub/lib/operations/eventHubs.ts
new file mode 100644
index 000000000000..ffd4672511f1
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/operations/eventHubs.ts
@@ -0,0 +1,804 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/eventHubsMappers";
+import * as Parameters from "../models/parameters";
+import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
+
+/** Class representing a EventHubs. */
+export class EventHubs {
+ private readonly client: EventHubManagementClientContext;
+
+ /**
+ * Create a EventHubs.
+ * @param {EventHubManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: EventHubManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Gets all the Event Hubs in a Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param callback The callback
+ */
+ listByNamespace(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listByNamespace(resourceGroupName: string, namespaceName: string, options: Models.EventHubsListByNamespaceOptionalParams, callback: msRest.ServiceCallback): void;
+ listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ options
+ },
+ listByNamespaceOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Creates or updates a new Event Hub as a nested resource within a Namespace.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param parameters Parameters supplied to create an Event Hub resource.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param parameters Parameters supplied to create an Event Hub resource.
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param parameters Parameters supplied to create an Event Hub resource.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ parameters,
+ options
+ },
+ createOrUpdateOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Deletes an Event Hub from the specified Namespace and resource group.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ options
+ },
+ deleteMethodOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets an Event Hubs description for the specified Event Hub.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets the authorization rules for an Event Hub.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param callback The callback
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ options
+ },
+ listAuthorizationRulesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Creates or updates an AuthorizationRule for the specified Event Hub.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters The shared access AuthorizationRule.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters The shared access AuthorizationRule.
+ * @param callback The callback
+ */
+ createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters The shared access AuthorizationRule.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ authorizationRuleName,
+ parameters,
+ options
+ },
+ createOrUpdateAuthorizationRuleOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets an AuthorizationRule for an Event Hub by rule name.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param callback The callback
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ authorizationRuleName,
+ options
+ },
+ getAuthorizationRuleOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Deletes an Event Hub AuthorizationRule.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param callback The callback
+ */
+ deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ authorizationRuleName,
+ options
+ },
+ deleteAuthorizationRuleOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets the ACS and SAS connection strings for the Event Hub.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ authorizationRuleName,
+ options
+ },
+ listKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Regenerates the ACS and SAS connection strings for the Event Hub.
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys
+ * (PrimaryKey/SecondaryKey).
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys
+ * (PrimaryKey/SecondaryKey).
+ * @param callback The callback
+ */
+ regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys
+ * (PrimaryKey/SecondaryKey).
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ namespaceName,
+ eventHubName,
+ authorizationRuleName,
+ parameters,
+ options
+ },
+ regenerateKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the Event Hubs in a Namespace.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listByNamespaceNext(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
+ */
+ listByNamespaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listByNamespaceNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets the authorization rules for an Event Hub.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAuthorizationRulesNext(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
+ */
+ listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAuthorizationRulesNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listByNamespaceOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.skip,
+ Parameters.top
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.EventHubListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const createOrUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.Eventhub,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.Eventhub
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const deleteMethodOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.Eventhub
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listAuthorizationRulesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRuleListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.AuthorizationRule,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRule
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const getAuthorizationRuleOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRule
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listKeysOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/ListKeys",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AccessKeys
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const regenerateKeysOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.namespaceName,
+ Parameters.eventHubName,
+ Parameters.authorizationRuleName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.RegenerateAccessKeyParameters,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AccessKeys
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listByNamespaceNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.EventHubListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AuthorizationRuleListResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
diff --git a/sdk/eventhub/arm-eventhub/lib/operations/index.ts b/sdk/eventhub/arm-eventhub/lib/operations/index.ts
new file mode 100644
index 000000000000..8c9523f44191
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/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 "./operations";
+export * from "./namespaces";
+export * from "./disasterRecoveryConfigs";
+export * from "./eventHubs";
+export * from "./consumerGroups";
+export * from "./regions";
diff --git a/sdk/eventhub/arm-eventhub/lib/operations/namespaces.ts b/sdk/eventhub/arm-eventhub/lib/operations/namespaces.ts
new file mode 100644
index 000000000000..99a8372ff15f
--- /dev/null
+++ b/sdk/eventhub/arm-eventhub/lib/operations/namespaces.ts
@@ -0,0 +1,1166 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * 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 "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as Models from "../models";
+import * as Mappers from "../models/namespacesMappers";
+import * as Parameters from "../models/parameters";
+import { EventHubManagementClientContext } from "../eventHubManagementClientContext";
+
+/** Class representing a Namespaces. */
+export class Namespaces {
+ private readonly client: EventHubManagementClientContext;
+
+ /**
+ * Create a Namespaces.
+ * @param {EventHubManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: EventHubManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Check the give Namespace name availability.
+ * @param parameters Parameters to check availability of the given Namespace name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param parameters Parameters to check availability of the given Namespace name
+ * @param callback The callback
+ */
+ checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void;
+ /**
+ * @param parameters Parameters to check availability of the given Namespace name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ parameters,
+ options
+ },
+ checkNameAvailabilityOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists all the available Namespaces within a subscription, irrespective of the resource groups.
+ * @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 | msRest.ServiceCallback, callback?: msRest.ServiceCallback