Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR eventhub/resource-manager] Adding Create, Delete and List Namespaces Endpoints for Event Hubs Cluster Resource #2184

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions packages/@azure/arm-eventhub/lib/eventHubManagementClient.ts
Original file line number Diff line number Diff line change
@@ -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";
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
33 changes: 33 additions & 0 deletions packages/@azure/arm-eventhub/lib/models/consumerGroupsMappers.ts
Original file line number Diff line number Diff line change
@@ -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";

Original file line number Diff line number Diff line change
@@ -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";

36 changes: 36 additions & 0 deletions packages/@azure/arm-eventhub/lib/models/eventHubsMappers.ts
Original file line number Diff line number Diff line change
@@ -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";

Loading