/// <summary>
 /// Gets a collection of SubscriberUsageAggregates, which are UsageAggregates
 /// from users.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='reportedStartTime'>
 /// The reported start time (inclusive).
 /// </param>
 /// <param name='reportedEndTime'>
 /// The reported end time (exclusive).
 /// </param>
 /// <param name='aggregationGranularity'>
 /// The aggregation granularity.
 /// </param>
 /// <param name='subscriberId'>
 /// The tenant subscription identifier.
 /// </param>
 /// <param name='continuationToken'>
 /// The continuation token.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <UsageAggregate> > ListAsync(this ISubscriberUsageAggregatesOperations operations, System.DateTime reportedStartTime, System.DateTime reportedEndTime, string aggregationGranularity = default(string), string subscriberId = default(string), string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(reportedStartTime, reportedEndTime, aggregationGranularity, subscriberId, continuationToken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a collection of SubscriberUsageAggregates, which are UsageAggregates
 /// from users.
 /// </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 <UsageAggregate> > ListNextAsync(this ISubscriberUsageAggregatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations = new Operations(this);
     SubscriberUsageAggregates = new SubscriberUsageAggregatesOperations(this);
     BaseUri        = new System.Uri("https://adminmanagement.local.azurestack.external");
     ApiVersion     = "2015-06-01-preview";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Gets a collection of SubscriberUsageAggregates, which are UsageAggregates
 /// from users.
 /// </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 <UsageAggregate> ListNext(this ISubscriberUsageAggregatesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a collection of SubscriberUsageAggregates, which are UsageAggregates
 /// from users.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='reportedStartTime'>
 /// The reported start time (inclusive).
 /// </param>
 /// <param name='reportedEndTime'>
 /// The reported end time (exclusive).
 /// </param>
 /// <param name='aggregationGranularity'>
 /// The aggregation granularity.
 /// </param>
 /// <param name='subscriberId'>
 /// The tenant subscription identifier.
 /// </param>
 /// <param name='continuationToken'>
 /// The continuation token.
 /// </param>
 public static IPage <UsageAggregate> List(this ISubscriberUsageAggregatesOperations operations, System.DateTime reportedStartTime, System.DateTime reportedEndTime, string aggregationGranularity = default(string), string subscriberId = default(string), string continuationToken = default(string))
 {
     return(operations.ListAsync(reportedStartTime, reportedEndTime, aggregationGranularity, subscriberId, continuationToken).GetAwaiter().GetResult());
 }