Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR eventhub/resource-manager] EventHub: Revert removing of messaging plan and updated with examples #2717

Merged
Merged
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
18 changes: 18 additions & 0 deletions lib/services/eventHubManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,24 @@ export interface MessagingRegions extends TrackedResource {
properties?: MessagingRegionsProperties;
}

/**
* @class
* Initializes a new instance of the MessagingPlan class.
* @constructor
* Messaging Plan for the namespace
*
* @member {number} [sku] Sku type
* @member {number} [selectedEventHubUnit] Selected event hub unit
* @member {date} [updatedAt] The exact time the messaging plan was updated.
* @member {number} [revision] revision number
*/
export interface MessagingPlan extends TrackedResource {
readonly sku?: number;
readonly selectedEventHubUnit?: number;
readonly updatedAt?: Date;
readonly revision?: number;
}


/**
* @class
Expand Down
1 change: 1 addition & 0 deletions lib/services/eventHubManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports.ErrorResponse = require('./errorResponse');
exports.ArmDisasterRecovery = require('./armDisasterRecovery');
exports.MessagingRegionsProperties = require('./messagingRegionsProperties');
exports.MessagingRegions = require('./messagingRegions');
exports.MessagingPlan = require('./messagingPlan');
exports.OperationListResult = require('./operationListResult');
exports.EHNamespaceListResult = require('./eHNamespaceListResult');
exports.AuthorizationRuleListResult = require('./authorizationRuleListResult');
Expand Down
129 changes: 129 additions & 0 deletions lib/services/eventHubManagement/lib/models/messagingPlan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Messaging Plan for the namespace
*
* @extends models['TrackedResource']
*/
class MessagingPlan extends models['TrackedResource'] {
/**
* Create a MessagingPlan.
* @member {number} [sku] Sku type
* @member {number} [selectedEventHubUnit] Selected event hub unit
* @member {date} [updatedAt] The exact time the messaging plan was updated.
* @member {number} [revision] revision number
*/
constructor() {
super();
}

/**
* Defines the metadata of MessagingPlan
*
* @returns {object} metadata of MessagingPlan
*
*/
mapper() {
return {
required: false,
serializedName: 'MessagingPlan',
type: {
name: 'Composite',
className: 'MessagingPlan',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: false,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
sku: {
required: false,
readOnly: true,
serializedName: 'properties.sku',
type: {
name: 'Number'
}
},
selectedEventHubUnit: {
required: false,
readOnly: true,
serializedName: 'properties.selectedEventHubUnit',
type: {
name: 'Number'
}
},
updatedAt: {
required: false,
readOnly: true,
serializedName: 'properties.updatedAt',
type: {
name: 'DateTime'
}
},
revision: {
required: false,
readOnly: true,
serializedName: 'properties.revision',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = MessagingPlan;
61 changes: 61 additions & 0 deletions lib/services/eventHubManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,67 @@ export interface Namespaces {
update(resourceGroupName: string, namespaceName: string, parameters: models.EHNamespace, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.EHNamespace>): void;


/**
* Gets messaging plan for specified namespace.
*
* @param {string} resourceGroupName Name of the resource group within the
* azure subscription.
*
* @param {string} namespaceName The Namespace name
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<MessagingPlan>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
getMessagingPlanWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.MessagingPlan>>;

/**
* Gets messaging plan for specified namespace.
*
* @param {string} resourceGroupName Name of the resource group within the
* azure subscription.
*
* @param {string} namespaceName The Namespace name
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {MessagingPlan} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {MessagingPlan} [result] - The deserialized result object if an error did not occur.
* See {@link MessagingPlan} for more information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
getMessagingPlan(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.MessagingPlan>;
getMessagingPlan(resourceGroupName: string, namespaceName: string, callback: ServiceCallback<models.MessagingPlan>): void;
getMessagingPlan(resourceGroupName: string, namespaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.MessagingPlan>): void;


/**
* Gets a list of authorization rules for a Namespace.
*
Expand Down
Loading