/// <summary>
 /// Retrieves the metrics determined by the given filter for the given account,
 /// source and target region. This url is only for PBS and Replication Latency
 /// data
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure resource group.
 /// </param>
 /// <param name='accountName'>
 /// Cosmos DB database account name.
 /// </param>
 /// <param name='sourceRegion'>
 /// Source region from which data is written. Cosmos DB region, with spaces
 /// between words and each word capitalized.
 /// </param>
 /// <param name='targetRegion'>
 /// Target region to which data is written. Cosmos DB region, with spaces
 /// between words and each word capitalized.
 /// </param>
 /// <param name='filter'>
 /// An OData filter expression that describes a subset of metrics to return.
 /// The parameters that can be filtered are name.value (name of the metric, can
 /// have an or of multiple names), startTime, endTime, and timeGrain. The
 /// supported operator is eq.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <PercentileMetric> > ListMetricsAsync(this IPercentileSourceTargetOperations operations, string resourceGroupName, string accountName, string sourceRegion, string targetRegion, string filter, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, accountName, sourceRegion, targetRegion, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves the metrics determined by the given filter for the given account,
 /// source and target region. This url is only for PBS and Replication Latency
 /// data
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure resource group.
 /// </param>
 /// <param name='accountName'>
 /// Cosmos DB database account name.
 /// </param>
 /// <param name='sourceRegion'>
 /// Source region from which data is written. Cosmos DB region, with spaces
 /// between words and each word capitalized.
 /// </param>
 /// <param name='targetRegion'>
 /// Target region to which data is written. Cosmos DB region, with spaces
 /// between words and each word capitalized.
 /// </param>
 /// <param name='filter'>
 /// An OData filter expression that describes a subset of metrics to return.
 /// The parameters that can be filtered are name.value (name of the metric, can
 /// have an or of multiple names), startTime, endTime, and timeGrain. The
 /// supported operator is eq.
 /// </param>
 public static IEnumerable <PercentileMetric> ListMetrics(this IPercentileSourceTargetOperations operations, string resourceGroupName, string accountName, string sourceRegion, string targetRegion, string filter)
 {
     return(operations.ListMetricsAsync(resourceGroupName, accountName, sourceRegion, targetRegion, filter).GetAwaiter().GetResult());
 }