/// <summary>
 /// Retrieves the metrics determined by the given filter for the given
 /// collection, split by partition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// Cosmos DB database account name.
 /// </param>
 /// <param name='databaseRid'>
 /// Cosmos DB database rid.
 /// </param>
 /// <param name='collectionRid'>
 /// Cosmos DB collection rid.
 /// </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 <PartitionMetric> > ListMetricsAsync(this ICollectionPartitionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves the metrics determined by the given filter for the given
 /// collection, split by partition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// Cosmos DB database account name.
 /// </param>
 /// <param name='databaseRid'>
 /// Cosmos DB database rid.
 /// </param>
 /// <param name='collectionRid'>
 /// Cosmos DB collection rid.
 /// </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 <PartitionMetric> ListMetrics(this ICollectionPartitionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter)
 {
     return(operations.ListMetricsAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).GetAwaiter().GetResult());
 }