/// <summary>
 /// Lists all of the existing delivery rules within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Rule> > ListByRuleSetAsync(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByRuleSetWithHttpMessagesAsync(resourceGroupName, profileName, ruleSetName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves the description for the specified rule.
 /// </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='subscriptionName'>
 /// The subscription name.
 /// </param>
 /// <param name='ruleName'>
 /// The rule name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Rule> GetAsync(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the existing delivery rules within a rule set.
 /// </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 <Rule> > ListByRuleSetNextAsync(this IRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByRuleSetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates an existing delivery rule within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='ruleName'>
 /// Name of the delivery rule which is unique within the endpoint.
 /// </param>
 /// <param name='ruleUpdateProperties'>
 /// Delivery rule properties
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Rule> BeginUpdateAsync(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, string ruleName, RuleUpdateParameters ruleUpdateProperties, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, profileName, ruleSetName, ruleName, ruleUpdateProperties, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List all the rules within given topic-subscription
 /// </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='subscriptionName'>
 /// The subscription 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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Rule> > ListBySubscriptionsAsync(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, int?skip = default(int?), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionsWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, subscriptionName, skip, top, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets an existing delivery rule within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='ruleName'>
 /// Name of the delivery rule which is unique within the endpoint.
 /// </param>
 public static Rule Get(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, string ruleName)
 {
     return(operations.GetAsync(resourceGroupName, profileName, ruleSetName, ruleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the existing delivery rules within a rule set.
 /// </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 <Rule> ListByRuleSetNext(this IRulesOperations operations, string nextPageLink)
 {
     return(operations.ListByRuleSetNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes an existing delivery rule within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='ruleName'>
 /// Name of the delivery rule which is unique within the endpoint.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, string ruleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, profileName, ruleSetName, ruleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes an existing delivery rule within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='ruleName'>
 /// Name of the delivery rule which is unique within the endpoint.
 /// </param>
 public static void BeginDelete(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, string ruleName)
 {
     operations.BeginDeleteAsync(resourceGroupName, profileName, ruleSetName, ruleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Updates an existing delivery rule within a rule set.
 /// </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='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='ruleSetName'>
 /// Name of the rule set under the profile.
 /// </param>
 /// <param name='ruleName'>
 /// Name of the delivery rule which is unique within the endpoint.
 /// </param>
 /// <param name='ruleUpdateProperties'>
 /// Delivery rule properties
 /// </param>
 public static Rule BeginUpdate(this IRulesOperations operations, string resourceGroupName, string profileName, string ruleSetName, string ruleName, RuleUpdateParameters ruleUpdateProperties)
 {
     return(operations.BeginUpdateAsync(resourceGroupName, profileName, ruleSetName, ruleName, ruleUpdateProperties).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all the rules within given topic-subscription
 /// </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='subscriptionName'>
 /// The subscription 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 <Rule> ListBySubscriptions(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, int?skip = default(int?), int?top = default(int?))
 {
     return(operations.ListBySubscriptionsAsync(resourceGroupName, namespaceName, topicName, subscriptionName, skip, top).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves the description for the specified rule.
 /// </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='subscriptionName'>
 /// The subscription name.
 /// </param>
 /// <param name='ruleName'>
 /// The rule name.
 /// </param>
 public static Rule Get(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName)
 {
     return(operations.GetAsync(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes an existing rule.
 /// </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='subscriptionName'>
 /// The subscription name.
 /// </param>
 /// <param name='ruleName'>
 /// The rule name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes an existing rule.
 /// </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='subscriptionName'>
 /// The subscription name.
 /// </param>
 /// <param name='ruleName'>
 /// The rule name.
 /// </param>
 public static void Delete(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName)
 {
     operations.DeleteAsync(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Creates a new rule and updates an existing rule
 /// </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='subscriptionName'>
 /// The subscription name.
 /// </param>
 /// <param name='ruleName'>
 /// The rule name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to create a rule.
 /// </param>
 public static Rule CreateOrUpdate(this IRulesOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, string ruleName, Rule parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName, parameters).GetAwaiter().GetResult());
 }