/// <summary>
 /// Regenerates primary or secondary connection strings for the topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to regenerate the authorization rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AccessKeys> RegenerateKeysAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, RegenerateAccessKeyParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// List topics under an Azure subscription
 /// </summary>
 /// <remarks>
 /// List all the topics under an Azure subscription
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Topic> > ListBySubscriptionAsync(this ITopicsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerate key for a topic.
 /// </summary>
 /// <remarks>
 /// Regenerate a shared access key for a topic.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 /// <param name='keyName'>
 /// Key name to regenerate key1 or key2
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TopicSharedAccessKeys> RegenerateKeyAsync(this ITopicsOperations operations, string resourceGroupName, string topicName, string keyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeyWithHttpMessagesAsync(resourceGroupName, topicName, keyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List topics under a resource group.
 /// </summary>
 /// <remarks>
 /// List all the topics under a resource group.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='filter'>
 /// The query used to filter the search results using OData syntax. Filtering
 /// is permitted on the 'name' property only and with limited number of OData
 /// operations. These operations are: the 'contains' function as well as the
 /// following logical operations: not, and, or, eq (for equal), and ne (for not
 /// equal). No arithmetic operations are supported. The following is a valid
 /// filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'.
 /// The following is not a valid filter example: $filter=location eq 'westus'.
 /// </param>
 /// <param name='top'>
 /// The number of results to return per page for the list operation. Valid
 /// range for top parameter is 1 to 100. If not specified, the default number
 /// of results to be returned is 20 items per page.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Topic> > ListByResourceGroupAsync(this ITopicsOperations operations, string resourceGroupName, string filter = default(string), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, filter, top, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all the topics in a namespace.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <TopicInner> > ListByNamespaceAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByNamespaceWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a topic in the specified namespace.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to create a topic resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TopicInner> CreateOrUpdateAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, TopicInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerates primary or secondary connection strings for the topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorizationrule name.
 /// </param>
 /// <param name='policykey'>
 /// Key that needs to be regenerated. Possible values include: 'PrimaryKey',
 /// 'SecondaryKey'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceListKeysInner> RegenerateKeysAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, Policykey?policykey = default(Policykey?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, policykey, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update a topic.
 /// </summary>
 /// <remarks>
 /// Asynchronously updates a topic with the specified parameters.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 /// <param name='tags'>
 /// Tags of the resource
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Topic> BeginUpdateAsync(this ITopicsOperations operations, string resourceGroupName, string topicName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, topicName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns the specified authorization rule.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SBAuthorizationRule> GetAuthorizationRuleAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all the topics in a namespace.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SBTopic> > ListByNamespaceNextAsync(this ITopicsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByNamespaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List topic event types.
 /// </summary>
 /// <remarks>
 /// List event types for a topic.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='providerNamespace'>
 /// Namespace of the provider of the topic.
 /// </param>
 /// <param name='resourceTypeName'>
 /// Name of the topic type.
 /// </param>
 /// <param name='resourceName'>
 /// Name of the topic.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <EventType> > ListEventTypesAsync(this ITopicsOperations operations, string resourceGroupName, string providerNamespace, string resourceTypeName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListEventTypesWithHttpMessagesAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all the topics in a namespace.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <SBTopic> ListByNamespaceNext(this ITopicsOperations operations, string nextPageLink)
 {
     return(operations.ListByNamespaceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets authorization rules for a topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <SBAuthorizationRule> ListAuthorizationRulesNext(this ITopicsOperations operations, string nextPageLink)
 {
     return(operations.ListAuthorizationRulesNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns a description for the specified topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 public static SBTopic Get(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName)
 {
     return(operations.GetAsync(resourceGroupName, namespaceName, topicName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a topic from the specified namespace and resource group.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 public static void Delete(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName)
 {
     operations.DeleteAsync(resourceGroupName, namespaceName, topicName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets authorization rules for a topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 public static IPage <SBAuthorizationRule> ListAuthorizationRules(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName)
 {
     return(operations.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, topicName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates an authorizatio rule for the specified topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorizationrule name.
 /// </param>
 /// <param name='rights'>
 /// The rights associated with the rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SharedAccessAuthorizationRuleInner> CreateOrUpdateAuthorizationRuleAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, IList <AccessRights?> rights, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, rights, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerates primary or secondary connection strings for the topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to regenerate the authorization rule.
 /// </param>
 public static AccessKeys RegenerateKeys(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, RegenerateAccessKeyParameters parameters)
 {
     return(operations.RegenerateKeysAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the primary and secondary connection strings for the topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 public static AccessKeys ListKeys(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName)
 {
     return(operations.ListKeysAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns the specified authorization rule.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 public static SBAuthorizationRule GetAuthorizationRule(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName)
 {
     return(operations.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a topic.
 /// </summary>
 /// <remarks>
 /// Asynchronously creates a new topic with the specified parameters.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 /// <param name='topicInfo'>
 /// Topic information.
 /// </param>
 public static Topic CreateOrUpdate(this ITopicsOperations operations, string resourceGroupName, string topicName, Topic topicInfo)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, topicName, topicInfo).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List topics under a resource group.
 /// </summary>
 /// <remarks>
 /// List all the topics under a resource group.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Topic> ListByResourceGroupNext(this ITopicsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates an authorization rule for the specified topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The authorization rule name.
 /// </param>
 /// <param name='parameters'>
 /// The shared access authorization rule.
 /// </param>
 public static SBAuthorizationRule CreateOrUpdateAuthorizationRule(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, string authorizationRuleName, SBAuthorizationRule parameters)
 {
     return(operations.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets authorization rules for a topic.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SharedAccessAuthorizationRuleInner> > ListAuthorizationRulesNextAsync(this ITopicsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListAuthorizationRulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerate key for a topic.
 /// </summary>
 /// <remarks>
 /// Regenerate a shared access key for a topic.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 /// <param name='keyName'>
 /// Key name to regenerate key1 or key2
 /// </param>
 public static TopicSharedAccessKeys RegenerateKey(this ITopicsOperations operations, string resourceGroupName, string topicName, string keyName)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, topicName, keyName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a topic.
 /// </summary>
 /// <remarks>
 /// Asynchronously updates a topic with the specified parameters.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 /// <param name='tags'>
 /// Tags of the resource
 /// </param>
 public static Topic BeginUpdate(this ITopicsOperations operations, string resourceGroupName, string topicName, IDictionary <string, string> tags = default(IDictionary <string, string>))
 {
     return(operations.BeginUpdateAsync(resourceGroupName, topicName, tags).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the topics in a namespace.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='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>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N
 /// usageDetails.
 /// </param>
 public static IPage <SBTopic> ListByNamespace(this ITopicsOperations operations, string resourceGroupName, string namespaceName, int?skip = default(int?), int?top = default(int?))
 {
     return(operations.ListByNamespaceAsync(resourceGroupName, namespaceName, skip, top).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List topic event types.
 /// </summary>
 /// <remarks>
 /// List event types for a topic.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='providerNamespace'>
 /// Namespace of the provider of the topic.
 /// </param>
 /// <param name='resourceTypeName'>
 /// Name of the topic type.
 /// </param>
 /// <param name='resourceName'>
 /// Name of the topic.
 /// </param>
 public static IEnumerable <EventType> ListEventTypes(this ITopicsOperations operations, string resourceGroupName, string providerNamespace, string resourceTypeName, string resourceName)
 {
     return(operations.ListEventTypesAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a topic from the specified namespace and resource group.
 /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='topicName'>
 /// The topic name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ITopicsOperations operations, string resourceGroupName, string namespaceName, string topicName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// List keys for a topic.
 /// </summary>
 /// <remarks>
 /// List the two keys used to publish to a topic.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='topicName'>
 /// Name of the topic.
 /// </param>
 public static TopicSharedAccessKeys ListSharedAccessKeys(this ITopicsOperations operations, string resourceGroupName, string topicName)
 {
     return(operations.ListSharedAccessKeysAsync(resourceGroupName, topicName).GetAwaiter().GetResult());
 }