public static void AreEqual(MetricAlertStatusCollection exp, MetricAlertStatusCollection act)
 {
     if (exp != null)
     {
         for (int i = 0; i < exp.Value.Count; i++)
         {
             AreEqual(exp.Value[i], act.Value[i]);
         }
     }
     else
     {
         Assert.Null(act);
     }
 }
        public async Task <Response <MetricAlertStatusCollection> > ListAsync(string subscriptionId, string resourceGroupName, string ruleName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
            Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
            Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));

            using var message = CreateListRequest(subscriptionId, resourceGroupName, ruleName);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                MetricAlertStatusCollection value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = MetricAlertStatusCollection.DeserializeMetricAlertStatusCollection(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }