diff --git a/lib/services/eventHubManagement/lib/operations/consumerGroups.js b/lib/services/eventHubManagement/lib/operations/consumerGroups.js index 33da902729..a83230ad40 100644 --- a/lib/services/eventHubManagement/lib/operations/consumerGroups.js +++ b/lib/services/eventHubManagement/lib/operations/consumerGroups.js @@ -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 * @@ -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') { @@ -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.'); } @@ -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('&'); } @@ -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 * @@ -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 * diff --git a/lib/services/eventHubManagement/lib/operations/eventHubs.js b/lib/services/eventHubManagement/lib/operations/eventHubs.js index 0aa4c59c2f..e5aff41072 100644 --- a/lib/services/eventHubManagement/lib/operations/eventHubs.js +++ b/lib/services/eventHubManagement/lib/operations/eventHubs.js @@ -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 * @@ -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') { @@ -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.'); } @@ -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('&'); } @@ -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 * @@ -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 * diff --git a/lib/services/eventHubManagement/lib/operations/index.d.ts b/lib/services/eventHubManagement/lib/operations/index.d.ts index d8c475b52a..ac9f86d7ee 100644 --- a/lib/services/eventHubManagement/lib/operations/index.d.ts +++ b/lib/services/eventHubManagement/lib/operations/index.d.ts @@ -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 * @@ -2318,7 +2326,7 @@ export interface EventHubs { * * @reject {Error|ServiceError} - The error object. */ - listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all the Event Hubs in a Namespace. @@ -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 * @@ -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; + listByNamespace(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; listByNamespace(resourceGroupName: string, namespaceName: string, callback: ServiceCallback): void; - listByNamespace(resourceGroupName: string, namespaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByNamespace(resourceGroupName: string, namespaceName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -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 * @@ -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>; + listByEventHubWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all the consumer groups in a Namespace. An empty feed is returned if no @@ -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 * @@ -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; + listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: ServiceCallback): void; - listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByEventHub(resourceGroupName: string, namespaceName: string, eventHubName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /**