/// <summary>
 /// The Update Border Gateway Protocol Peering operation updates an
 /// existing border gateway protocol peering or creates a new one if
 /// one doesn't exist.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='accessType'>
 /// Required. Whether the peering is private or public.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Border Gateway Protocol
 /// Peering operation.
 /// </param>
 /// <returns>
 /// The Get Border Gateway Protocol Peering Operation Response.
 /// </returns>
 public static Task<BorderGatewayProtocolPeeringGetResponse> UpdateAsync(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BorderGatewayProtocolPeeringUpdateParameters parameters)
 {
     return operations.UpdateAsync(serviceKey, accessType, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Update Border Gateway Protocol Peering operation updates an
 /// existing border gateway protocol peering or creates a new one if
 /// one doesn't exist.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='accessType'>
 /// Required. Whether the peering is private or public.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Border Gateway Protocol
 /// Peering operation.
 /// </param>
 /// <returns>
 /// The Get Border Gateway Protocol Peering Operation Response.
 /// </returns>
 public static BorderGatewayProtocolPeeringGetResponse Update(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BorderGatewayProtocolPeeringUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IBorderGatewayProtocolPeeringOperations)s).UpdateAsync(serviceKey, accessType, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }