/// <summary>
 /// Gets an existing prefix with the specified name under the given
 /// subscription, resource group and peering service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='prefixName'>
 /// The name of the prefix.
 /// </param>
 /// <param name='expand'>
 /// The properties to be expanded.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PeeringServicePrefix> GetAsync(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, peeringServiceName, prefixName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a new prefix with the specified name under the given subscription,
 /// resource group and peering service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='prefixName'>
 /// The name of the prefix.
 /// </param>
 /// <param name='prefix'>
 /// The prefix from which your traffic originates.
 /// </param>
 public static PeeringServicePrefix CreateOrUpdate(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, string prefix = default(string))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, peeringServiceName, prefixName, prefix).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all prefixes under the given subscription, resource group and peering
 /// service.
 /// </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 <PeeringServicePrefix> > ListByPeeringServiceNextAsync(this IPrefixesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByPeeringServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets an existing prefix with the specified name under the given
 /// subscription, resource group and peering service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='prefixName'>
 /// The name of the prefix.
 /// </param>
 /// <param name='expand'>
 /// The properties to be expanded.
 /// </param>
 public static PeeringServicePrefix Get(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, peeringServiceName, prefixName, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all prefixes under the given subscription, resource group and peering
 /// service.
 /// </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 <PeeringServicePrefix> ListByPeeringServiceNext(this IPrefixesOperations operations, string nextPageLink)
 {
     return(operations.ListByPeeringServiceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all prefixes under the given subscription, resource group and peering
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='expand'>
 /// The properties to be expanded.
 /// </param>
 public static IPage <PeeringServicePrefix> ListByPeeringService(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string expand = default(string))
 {
     return(operations.ListByPeeringServiceAsync(resourceGroupName, peeringServiceName, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes an existing prefix with the specified name under the given
 /// subscription, resource group and peering service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='prefixName'>
 /// The name of the prefix.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, peeringServiceName, prefixName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes an existing prefix with the specified name under the given
 /// subscription, resource group and peering service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The name of the peering service.
 /// </param>
 /// <param name='prefixName'>
 /// The name of the prefix.
 /// </param>
 public static void Delete(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName)
 {
     operations.DeleteAsync(resourceGroupName, peeringServiceName, prefixName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists the peerings prefix in the resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='peeringServiceName'>
 /// The peering service name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <PeeringServicePrefix> > ListByPeeringServiceAsync(this IPrefixesOperations operations, string resourceGroupName, string peeringServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByPeeringServiceWithHttpMessagesAsync(resourceGroupName, peeringServiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }