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
88 changes: 76 additions & 12 deletions lib/services/serviceBusManagement2/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,14 @@ export interface Queues {
*
* @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 @@ -2773,7 +2781,7 @@ export interface Queues {
*
* @reject {Error|ServiceError} - The error object.
*/
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBQueueListResult>>;
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBQueueListResult>>;

/**
* Gets the queues within a namespace.
Expand All @@ -2785,6 +2793,14 @@ export interface Queues {
*
* @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 @@ -2810,9 +2826,9 @@ export interface Queues {
*
* {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.SBQueueListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.SBQueueListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, callback: ServiceCallback<models.SBQueueListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBQueueListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBQueueListResult>): void;


/**
Expand Down Expand Up @@ -3697,6 +3713,14 @@ export interface Topics {
*
* @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 @@ -3706,7 +3730,7 @@ export interface Topics {
*
* @reject {Error|ServiceError} - The error object.
*/
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBTopicListResult>>;
listByNamespaceWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBTopicListResult>>;

/**
* Gets all the topics in a namespace.
Expand All @@ -3718,6 +3742,14 @@ export interface Topics {
*
* @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 @@ -3743,9 +3775,9 @@ export interface Topics {
*
* {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.SBTopicListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.SBTopicListResult>;
listByNamespace(resourceGroupName: string, namespaceName: string, callback: ServiceCallback<models.SBTopicListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBTopicListResult>): void;
listByNamespace(resourceGroupName: string, namespaceName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBTopicListResult>): void;


/**
Expand Down Expand Up @@ -4596,6 +4628,14 @@ export interface Subscriptions {
*
* @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 @@ -4605,7 +4645,7 @@ export interface Subscriptions {
*
* @reject {Error|ServiceError} - The error object.
*/
listByTopicWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBSubscriptionListResult>>;
listByTopicWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, topicName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SBSubscriptionListResult>>;

/**
* List all the subscriptions under a specified topic.
Expand All @@ -4619,6 +4659,14 @@ export interface Subscriptions {
*
* @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 @@ -4645,9 +4693,9 @@ export interface Subscriptions {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
listByTopic(resourceGroupName: string, namespaceName: string, topicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.SBSubscriptionListResult>;
listByTopic(resourceGroupName: string, namespaceName: string, topicName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.SBSubscriptionListResult>;
listByTopic(resourceGroupName: string, namespaceName: string, topicName: string, callback: ServiceCallback<models.SBSubscriptionListResult>): void;
listByTopic(resourceGroupName: string, namespaceName: string, topicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBSubscriptionListResult>): void;
listByTopic(resourceGroupName: string, namespaceName: string, topicName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SBSubscriptionListResult>): void;


/**
Expand Down Expand Up @@ -5029,6 +5077,14 @@ export interface Rules {
*
* @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 @@ -5038,7 +5094,7 @@ export interface Rules {
*
* @reject {Error|ServiceError} - The error object.
*/
listBySubscriptionsWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.RuleListResult>>;
listBySubscriptionsWithHttpOperationResponse(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.RuleListResult>>;

/**
* List all the rules within given topic-subscription
Expand All @@ -5054,6 +5110,14 @@ export interface Rules {
*
* @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 @@ -5079,9 +5143,9 @@ export interface Rules {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
listBySubscriptions(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.RuleListResult>;
listBySubscriptions(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options?: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.RuleListResult>;
listBySubscriptions(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, callback: ServiceCallback<models.RuleListResult>): void;
listBySubscriptions(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.RuleListResult>): void;
listBySubscriptions(resourceGroupName: string, namespaceName: string, topicName: string, subscriptionName: string, options: { skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.RuleListResult>): void;


/**
Expand Down
58 changes: 58 additions & 0 deletions lib/services/serviceBusManagement2/lib/operations/queues.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const moment = require('moment');
*
* @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 @@ -51,6 +59,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 @@ -85,6 +95,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 @@ -100,6 +136,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 @@ -2250,6 +2292,14 @@ class Queues {
*
* @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 @@ -2283,6 +2333,14 @@ class Queues {
*
* @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
Loading