/// <summary> /// Gets Time Series model settings synchronously. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>The model settings which includes model display name, Time Series Id properties and default type Id with the http response <see cref="Response{TimeSeriesModelSettings}"/>.</returns> public virtual Response <TimeSeriesModelSettings> GetModelSettings(CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(TimeSeriesInsightsClient)}.{nameof(GetModelSettings)}"); scope.Start(); try { // To do: Generate client session Id Response <ModelSettingsResponse> modelSettings = _modelSettingsRestClient.Get(null, cancellationToken); return(Response.FromValue(modelSettings.Value.ModelSettings, modelSettings.GetRawResponse())); } catch (Exception ex) { scope.Failed(ex); throw; } }
/// <summary> /// Returns the model settings which includes model display name, Time Series ID properties and default type ID. Every Gen2 environment has a model that is automatically created. /// </summary> /// <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 to use. </param> /// <returns>The deserialized application/json model settings digital twin and the http response <see cref="Response{ModelSettingsResponse}"/>.</returns> public virtual Response <ModelSettingsResponse> Get(string clientSessionId = null, CancellationToken cancellationToken = default) { return(_modelSettingsRestClient.Get(clientSessionId, cancellationToken)); }