Skip to content

Commit

Permalink
[Service Bus] Description -> Properties (#10114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a authored Jul 17, 2020
1 parent 74de8fe commit dfa8283
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 135 deletions.
2 changes: 1 addition & 1 deletion sdk/servicebus/service-bus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- `userProperties` attribute under the `ServiceBusMessage`(and `ReceivedMessage`, `ReceivedMessageWithLock`) has been renamed to `properties`. Same change has been made to the `userProperties` attribute in the correlation-rule filter.
[PR 10003](https://github.com/Azure/azure-sdk-for-js/pull/10003)

- The term `RuntimeInfo` is replaced with `RuntimeProperties` to better align with guidelines around the kind of suffixes we use for naming methods and interfaces.
- The terms `RuntimeInfo` and `Description` are replaced with `RuntimeProperties` and `Properties` to better align with guidelines around the kind of suffixes we use for naming methods and interfaces.

## 7.0.0-preview.4 (2020-07-07)

Expand Down
40 changes: 20 additions & 20 deletions sdk/servicebus/service-bus/review/service-bus.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export interface PeekMessagesOptions extends OperationOptionsBase {
}

// @public
export interface QueueDescription {
export interface QueueProperties {
authorizationRules?: AuthorizationRule[];
autoDeleteOnIdle?: string;
deadLetteringOnMessageExpiration?: boolean;
Expand All @@ -153,7 +153,7 @@ export interface QueueDescription {
}

// @public
export interface QueueResponse extends QueueDescription, Response {
export interface QueueResponse extends QueueProperties, Response {
}

// @public
Expand Down Expand Up @@ -228,14 +228,14 @@ export interface Response {
export { RetryOptions }

// @public
export interface RuleDescription {
export interface RuleProperties {
action?: SqlRuleAction;
filter?: SqlRuleFilter | CorrelationRuleFilter;
name: string;
}

// @public
export interface RuleResponse extends RuleDescription, Response {
export interface RuleResponse extends RuleProperties, Response {
}

// @public
Expand Down Expand Up @@ -287,38 +287,38 @@ export class ServiceBusManagementClient extends ServiceClient {
constructor(connectionString: string, options?: ServiceBusManagementClientOptions);
constructor(fullyQualifiedNamespace: string, credential: TokenCredential, options?: ServiceBusManagementClientOptions);
createQueue(queueName: string, operationOptions?: OperationOptions): Promise<QueueResponse>;
createQueue(queue: QueueDescription, operationOptions?: OperationOptions): Promise<QueueResponse>;
createRule(topicName: string, subscriptionName: string, rule: RuleDescription, operationOptions?: OperationOptions): Promise<RuleResponse>;
createQueue(queue: QueueProperties, operationOptions?: OperationOptions): Promise<QueueResponse>;
createRule(topicName: string, subscriptionName: string, rule: RuleProperties, operationOptions?: OperationOptions): Promise<RuleResponse>;
createSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
createSubscription(subscription: SubscriptionDescription, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
createSubscription(subscription: SubscriptionProperties, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
createTopic(topicName: string, operationOptions?: OperationOptions): Promise<TopicResponse>;
createTopic(topic: TopicDescription, operationOptions?: OperationOptions): Promise<TopicResponse>;
createTopic(topic: TopicProperties, operationOptions?: OperationOptions): Promise<TopicResponse>;
deleteQueue(queueName: string, operationOptions?: OperationOptions): Promise<Response>;
deleteRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<Response>;
deleteSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<Response>;
deleteTopic(topicName: string, operationOptions?: OperationOptions): Promise<Response>;
getNamespaceProperties(operationOptions?: OperationOptions): Promise<NamespacePropertiesResponse>;
getQueue(queueName: string, operationOptions?: OperationOptions): Promise<QueueResponse>;
getQueueRuntimeProperties(queueName: string, operationOptions?: OperationOptions): Promise<QueueRuntimePropertiesResponse>;
getQueues(options?: OperationOptions): PagedAsyncIterableIterator<QueueDescription, EntitiesResponse<QueueDescription>>;
getQueues(options?: OperationOptions): PagedAsyncIterableIterator<QueueProperties, EntitiesResponse<QueueProperties>>;
getQueuesRuntimeProperties(options?: OperationOptions): PagedAsyncIterableIterator<QueueRuntimeProperties, EntitiesResponse<QueueRuntimeProperties>>;
getRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<RuleResponse>;
getRules(topicName: string, subscriptionName: string, options?: OperationOptions): PagedAsyncIterableIterator<RuleDescription, EntitiesResponse<RuleDescription>>;
getRules(topicName: string, subscriptionName: string, options?: OperationOptions): PagedAsyncIterableIterator<RuleProperties, EntitiesResponse<RuleProperties>>;
getSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
getSubscriptionRuntimeProperties(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<SubscriptionRuntimePropertiesResponse>;
getSubscriptions(topicName: string, options?: OperationOptions): PagedAsyncIterableIterator<SubscriptionDescription, EntitiesResponse<SubscriptionDescription>>;
getSubscriptions(topicName: string, options?: OperationOptions): PagedAsyncIterableIterator<SubscriptionProperties, EntitiesResponse<SubscriptionProperties>>;
getSubscriptionsRuntimeProperties(topicName: string, options?: OperationOptions): PagedAsyncIterableIterator<SubscriptionRuntimeProperties, EntitiesResponse<SubscriptionRuntimeProperties>>;
getTopic(topicName: string, operationOptions?: OperationOptions): Promise<TopicResponse>;
getTopicRuntimeProperties(topicName: string, operationOptions?: OperationOptions): Promise<TopicRuntimePropertiesResponse>;
getTopics(options?: OperationOptions): PagedAsyncIterableIterator<TopicDescription, EntitiesResponse<TopicDescription>>;
getTopics(options?: OperationOptions): PagedAsyncIterableIterator<TopicProperties, EntitiesResponse<TopicProperties>>;
getTopicsRuntimeProperties(options?: OperationOptions): PagedAsyncIterableIterator<TopicRuntimeProperties, EntitiesResponse<TopicRuntimeProperties>>;
queueExists(queueName: string, operationOptions?: OperationOptions): Promise<boolean>;
subscriptionExists(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<boolean>;
topicExists(topicName: string, operationOptions?: OperationOptions): Promise<boolean>;
updateQueue(queue: QueueDescription, operationOptions?: OperationOptions): Promise<QueueResponse>;
updateRule(topicName: string, subscriptionName: string, rule: RuleDescription, operationOptions?: OperationOptions): Promise<RuleResponse>;
updateSubscription(subscription: SubscriptionDescription, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
updateTopic(topic: TopicDescription, operationOptions?: OperationOptions): Promise<TopicResponse>;
updateQueue(queue: QueueProperties, operationOptions?: OperationOptions): Promise<QueueResponse>;
updateRule(topicName: string, subscriptionName: string, rule: RuleProperties, operationOptions?: OperationOptions): Promise<RuleResponse>;
updateSubscription(subscription: SubscriptionProperties, operationOptions?: OperationOptions): Promise<SubscriptionResponse>;
updateTopic(topic: TopicProperties, operationOptions?: OperationOptions): Promise<TopicResponse>;
}

// @public
Expand Down Expand Up @@ -400,7 +400,7 @@ export interface SubscribeOptions extends OperationOptionsBase, MessageHandlerOp
}

// @public
export interface SubscriptionDescription {
export interface SubscriptionProperties {
autoDeleteOnIdle?: string;
deadLetteringOnFilterEvaluationExceptions?: boolean;
deadLetteringOnMessageExpiration?: boolean;
Expand All @@ -418,7 +418,7 @@ export interface SubscriptionDescription {
}

// @public
export interface SubscriptionResponse extends SubscriptionDescription, Response {
export interface SubscriptionResponse extends SubscriptionProperties, Response {
}

// @public
Expand All @@ -441,7 +441,7 @@ export { TokenCredential }
export { TokenType }

// @public
export interface TopicDescription {
export interface TopicProperties {
authorizationRules?: AuthorizationRule[];
autoDeleteOnIdle?: string;
defaultMessageTtl?: string;
Expand All @@ -457,7 +457,7 @@ export interface TopicDescription {
}

// @public
export interface TopicResponse extends TopicDescription, Response {
export interface TopicResponse extends TopicProperties, Response {
}

// @public
Expand Down
8 changes: 4 additions & 4 deletions sdk/servicebus/service-bus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ export { Receiver } from "./receivers/receiver";
export { SessionReceiver } from "./receivers/sessionReceiver";
export { Sender } from "./sender";
export { NamespaceProperties } from "./serializers/namespaceResourceSerializer";
export { QueueDescription, QueueRuntimeProperties } from "./serializers/queueResourceSerializer";
export { QueueProperties, QueueRuntimeProperties } from "./serializers/queueResourceSerializer";
export {
RuleDescription,
RuleProperties,
SqlParameter,
SqlRuleAction,
SqlRuleFilter
} from "./serializers/ruleResourceSerializer";
export {
SubscriptionDescription,
SubscriptionProperties,
SubscriptionRuntimeProperties
} from "./serializers/subscriptionResourceSerializer";
export { TopicDescription, TopicRuntimeProperties } from "./serializers/topicResourceSerializer";
export { TopicProperties, TopicRuntimeProperties } from "./serializers/topicResourceSerializer";
export {
EntitiesResponse,
ListRequestOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
* converts values to string and ensures the right order as expected by the service
* @param queue
*/
export function buildQueueOptions(queue: QueueDescription): InternalQueueOptions {
export function buildQueueOptions(queue: QueueProperties): InternalQueueOptions {
return {
LockDuration: queue.lockDuration,
MaxSizeInMegabytes: getStringOrUndefined(queue.maxSizeInMegabytes),
Expand Down Expand Up @@ -59,7 +59,7 @@ export function buildQueueOptions(queue: QueueDescription): InternalQueueOptions
* response from the service
* @param rawQueue
*/
export function buildQueue(rawQueue: any): QueueDescription {
export function buildQueue(rawQueue: any): QueueProperties {
return {
name: getString(rawQueue[Constants.QUEUE_NAME], "queueName"),

Expand Down Expand Up @@ -128,7 +128,7 @@ export function buildQueueRuntimeProperties(rawQueue: any): QueueRuntimeProperti
/**
* Represents settable options on a queue
*/
export interface QueueDescription {
export interface QueueProperties {
/**
* Name of the queue
*/
Expand Down Expand Up @@ -226,7 +226,7 @@ export interface QueueDescription {
forwardTo?: string;

/**
* The user provided metadata information associated with the queue description.
* The user provided metadata information associated with the queue.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down Expand Up @@ -354,7 +354,7 @@ export interface InternalQueueOptions {
ForwardTo?: string;

/**
* The user provided metadata information associated with the queue description.
* The user provided metadata information associated with the queue.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
* response from the service
* @param rawRule
*/
export function buildRule(rawRule: any): RuleDescription {
export function buildRule(rawRule: any): RuleProperties {
return {
name: getString(rawRule["RuleName"], "ruleName"),
filter: getTopicFilter(rawRule["Filter"]),
Expand Down Expand Up @@ -88,7 +88,7 @@ function getRuleActionOrUndefined(value: any): SqlRuleAction | undefined {
/**
* Represents all attributes of a rule entity
*/
export interface RuleDescription {
export interface RuleProperties {
/**
* Name of the rule
*/
Expand Down Expand Up @@ -146,7 +146,7 @@ export interface SqlRuleFilter {
* RuleResourceSerializer for serializing / deserializing Rule entities
*/
export class RuleResourceSerializer implements AtomXmlSerializer {
serialize(rule: RuleDescription): object {
serialize(rule: RuleProperties): object {
const resource: { Name: any; Filter: any; Action: any } = {
Filter: {},
Action: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
* @param subscription
*/
export function buildSubscriptionOptions(
subscription: SubscriptionDescription
subscription: SubscriptionProperties
): InternalSubscriptionOptions {
return {
LockDuration: subscription.lockDuration,
Expand Down Expand Up @@ -57,7 +57,7 @@ export function buildSubscriptionOptions(
* the response from the service
* @param rawSubscription
*/
export function buildSubscription(rawSubscription: any): SubscriptionDescription {
export function buildSubscription(rawSubscription: any): SubscriptionProperties {
return {
subscriptionName: getString(rawSubscription[Constants.SUBSCRIPTION_NAME], "subscriptionName"),
topicName: getString(rawSubscription[Constants.TOPIC_NAME], "topicName"),
Expand Down Expand Up @@ -103,7 +103,9 @@ export function buildSubscription(rawSubscription: any): SubscriptionDescription
* the response from the service
* @param rawSubscription
*/
export function buildSubscriptionRuntimeProperties(rawSubscription: any): SubscriptionRuntimeProperties {
export function buildSubscriptionRuntimeProperties(
rawSubscription: any
): SubscriptionRuntimeProperties {
return {
subscriptionName: getString(rawSubscription[Constants.SUBSCRIPTION_NAME], "subscriptionName"),
topicName: getString(rawSubscription[Constants.TOPIC_NAME], "topicName"),
Expand All @@ -118,7 +120,7 @@ export function buildSubscriptionRuntimeProperties(rawSubscription: any): Subscr
/**
* Represents settable options on a subscription
*/
export interface SubscriptionDescription {
export interface SubscriptionProperties {
/**
* Name of the subscription
*/
Expand Down Expand Up @@ -202,7 +204,7 @@ export interface SubscriptionDescription {
forwardTo?: string;

/**
* The user provided metadata information associated with the subscription description.
* The user provided metadata information associated with the subscription.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down Expand Up @@ -305,7 +307,7 @@ export interface InternalSubscriptionOptions {
ForwardTo?: string;

/**
* The user provided metadata information associated with the subscription description.
* The user provided metadata information associated with the subscription.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
* converts values to string and ensures the right order as expected by the service
* @param topic
*/
export function buildTopicOptions(topic: TopicDescription): InternalTopicOptions {
export function buildTopicOptions(topic: TopicProperties): InternalTopicOptions {
return {
DefaultMessageTimeToLive: topic.defaultMessageTtl,
MaxSizeInMegabytes: getStringOrUndefined(topic.maxSizeInMegabytes),
Expand All @@ -52,7 +52,7 @@ export function buildTopicOptions(topic: TopicDescription): InternalTopicOptions
* response from the service
* @param rawTopic
*/
export function buildTopic(rawTopic: any): TopicDescription {
export function buildTopic(rawTopic: any): TopicProperties {
return {
name: getString(rawTopic[Constants.TOPIC_NAME], "topicName"),
maxSizeInMegabytes: getInteger(rawTopic[Constants.MAX_SIZE_IN_MEGABYTES], "maxSizeInMegabytes"),
Expand Down Expand Up @@ -107,7 +107,7 @@ export function buildTopicRuntimeProperties(rawTopic: any): TopicRuntimeProperti
/**
* Represents settable options on a topic
*/
export interface TopicDescription {
export interface TopicProperties {
/**
* Name of the topic
*/
Expand Down Expand Up @@ -168,7 +168,7 @@ export interface TopicDescription {
status?: EntityStatus;

/**
* The user provided metadata information associated with the topic description.
* The user provided metadata information associated with the topic.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down Expand Up @@ -256,7 +256,7 @@ export interface InternalTopicOptions {
Status?: string;

/**
* The user provided metadata information associated with the topic description.
* The user provided metadata information associated with the topic.
* Used to specify textual content such as tags, labels, etc.
* Value must not exceed 1024 bytes encoded in utf-8.
*/
Expand Down
Loading

0 comments on commit dfa8283

Please sign in to comment.