/// <summary>
 /// Returns time series hierarchies definitions in pages.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='continuationToken'>
 /// Continuation token from previous page of results to retrieve the next page
 /// of the results in calls that support pagination. To get the first page
 /// results, specify null continuation token as parameter value. Returned
 /// continuation token is null if all results have been returned, and there is
 /// no next page of results.
 /// </param>
 /// <param name='clientRequestId'>
 /// Optional client request ID. Service records this value. Allows the service
 /// to trace operation across services, and allows the customer to contact
 /// support regarding a particular request.
 /// </param>
 /// <param name='clientSessionId'>
 /// Optional client session ID. Service records this value. Allows the service
 /// to trace a group of related operations across services, and allows the
 /// customer to contact support regarding a particular group of requests.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GetHierarchiesPage> GetAsync(this ITimeSeriesHierarchies operations, string continuationToken = default(string), string clientRequestId = default(string), string clientSessionId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(continuationToken, clientRequestId, clientSessionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Executes a batch get, create, update, delete operation on multiple time
 /// series hierarchy definitions.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Time series hierarchies batch request body.
 /// </param>
 /// <param name='clientRequestId'>
 /// Optional client request ID. Service records this value. Allows the service
 /// to trace operation across services, and allows the customer to contact
 /// support regarding a particular request.
 /// </param>
 /// <param name='clientSessionId'>
 /// Optional client session ID. Service records this value. Allows the service
 /// to trace a group of related operations across services, and allows the
 /// customer to contact support regarding a particular group of requests.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <HierarchiesBatchResponse> ExecuteBatchAsync(this ITimeSeriesHierarchies operations, HierarchiesBatchRequest parameters, string clientRequestId = default(string), string clientSessionId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ExecuteBatchWithHttpMessagesAsync(parameters, clientRequestId, clientSessionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Query                 = new Query(this);
     ModelSettings         = new ModelSettings(this);
     TimeSeriesInstances   = new TimeSeriesInstances(this);
     TimeSeriesTypes       = new TimeSeriesTypes(this);
     TimeSeriesHierarchies = new TimeSeriesHierarchies(this);
     BaseUri               = "https://{environmentFqdn}";
     ApiVersion            = "2020-07-31";
     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()
         }
     };
     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()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Variable>("kind"));
     DeserializationSettings.Converters.Add(new  PolymorphicDeserializeJsonConverter <Variable>("kind"));
     CustomInitialize();
 }