Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
58 changes: 58 additions & 0 deletions lib/services/eventHubManagement/lib/operations/consumerGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,14 @@ function _get(resourceGroupName, namespaceName, eventHubName, consumerGroupName,
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down Expand Up @@ -647,6 +655,8 @@ function _listByEventHub(resourceGroupName, namespaceName, eventHubName, options
if (!callback) {
throw new Error('callback cannot be null.');
}
let skip = (options && options.skip !== undefined) ? options.skip : undefined;
let top = (options && options.top !== undefined) ? options.top : undefined;
// Validate
try {
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
Expand Down Expand Up @@ -690,6 +700,32 @@ function _listByEventHub(resourceGroupName, namespaceName, eventHubName, options
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
}
if (skip !== null && skip !== undefined && typeof skip !== 'number') {
throw new Error('skip must be of type number.');
}
if (skip !== null && skip !== undefined) {
if (skip > 1000)
{
throw new Error('"skip" should satisfy the constraint - "InclusiveMaximum": 1000');
}
if (skip < 0)
{
throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 0');
}
}
if (top !== null && top !== undefined && typeof top !== 'number') {
throw new Error('top must be of type number.');
}
if (top !== null && top !== undefined) {
if (top > 1000)
{
throw new Error('"top" should satisfy the constraint - "InclusiveMaximum": 1000');
}
if (top < 1)
{
throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1');
}
}
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
throw new Error('this.client.acceptLanguage must be of type string.');
}
Expand All @@ -706,6 +742,12 @@ function _listByEventHub(resourceGroupName, namespaceName, eventHubName, options
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
let queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (skip !== null && skip !== undefined) {
queryParameters.push('$skip=' + encodeURIComponent(skip.toString()));
}
if (top !== null && top !== undefined) {
queryParameters.push('$top=' + encodeURIComponent(top.toString()));
}
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
Expand Down Expand Up @@ -1251,6 +1293,14 @@ class ConsumerGroups {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down Expand Up @@ -1287,6 +1337,14 @@ class ConsumerGroups {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down
58 changes: 58 additions & 0 deletions lib/services/eventHubManagement/lib/operations/eventHubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ const WebResource = msRest.WebResource;
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -50,6 +58,8 @@ function _listByNamespace(resourceGroupName, namespaceName, options, callback) {
if (!callback) {
throw new Error('callback cannot be null.');
}
let skip = (options && options.skip !== undefined) ? options.skip : undefined;
let top = (options && options.top !== undefined) ? options.top : undefined;
// Validate
try {
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
Expand Down Expand Up @@ -84,6 +94,32 @@ function _listByNamespace(resourceGroupName, namespaceName, options, callback) {
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
}
if (skip !== null && skip !== undefined && typeof skip !== 'number') {
throw new Error('skip must be of type number.');
}
if (skip !== null && skip !== undefined) {
if (skip > 1000)
{
throw new Error('"skip" should satisfy the constraint - "InclusiveMaximum": 1000');
}
if (skip < 0)
{
throw new Error('"skip" should satisfy the constraint - "InclusiveMinimum": 0');
}
}
if (top !== null && top !== undefined && typeof top !== 'number') {
throw new Error('top must be of type number.');
}
if (top !== null && top !== undefined) {
if (top > 1000)
{
throw new Error('"top" should satisfy the constraint - "InclusiveMaximum": 1000');
}
if (top < 1)
{
throw new Error('"top" should satisfy the constraint - "InclusiveMinimum": 1');
}
}
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
throw new Error('this.client.acceptLanguage must be of type string.');
}
Expand All @@ -99,6 +135,12 @@ function _listByNamespace(resourceGroupName, namespaceName, options, callback) {
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
let queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (skip !== null && skip !== undefined) {
queryParameters.push('$skip=' + encodeURIComponent(skip.toString()));
}
if (top !== null && top !== undefined) {
queryParameters.push('$top=' + encodeURIComponent(top.toString()));
}
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
Expand Down Expand Up @@ -2223,6 +2265,14 @@ class EventHubs {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down Expand Up @@ -2256,6 +2306,14 @@ class EventHubs {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down
44 changes: 38 additions & 6 deletions lib/services/eventHubManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2309,6 +2309,14 @@ export interface EventHubs {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -2318,7 +2326,7 @@ export interface EventHubs {
*
* @reject {Error|ServiceError} - The error object.
*/
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.EventHubListResult>>;
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.EventHubListResult>>;

/**
* Gets all the Event Hubs in a Namespace.
Expand All @@ -2330,6 +2338,14 @@ export interface EventHubs {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -2355,9 +2371,9 @@ export interface EventHubs {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
listByNamespace(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.EventHubListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.EventHubListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, callback: ServiceCallback<models.EventHubListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.EventHubListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.EventHubListResult>): void;


/**
Expand Down Expand Up @@ -3457,6 +3473,14 @@ export interface ConsumerGroups {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -3466,7 +3490,7 @@ export interface ConsumerGroups {
*
* @reject {Error|ServiceError} - The error object.
*/
listByEventHubWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ConsumerGroupListResult>>;
listByEventHubWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ConsumerGroupListResult>>;

/**
* Gets all the consumer groups in a Namespace. An empty feed is returned if no
Expand All @@ -3481,6 +3505,14 @@ export interface ConsumerGroups {
*
* @param {object} [options] Optional Parameters.
*
* @param {number} [options.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.
*
* @param {number} [options.top] May be used to limit the number of results to
* the most recent N usageDetails.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -3507,9 +3539,9 @@ export interface ConsumerGroups {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ConsumerGroupListResult>;
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.ConsumerGroupListResult>;
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: ServiceCallback<models.ConsumerGroupListResult>): void;
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ConsumerGroupListResult>): void;
listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ConsumerGroupListResult>): void;


/**
Expand Down