1- // Copyright (c) Microsoft Corporation. All rights reserved.
1+ // Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33
44using System ;
@@ -41,6 +41,12 @@ internal ModelSettingsClient(ModelSettingsRestClient modelSettingsRestClient, Cl
4141 /// The model settings which includes model display name, Time Series Id properties and default type Id with the
4242 /// http response <see cref="Response{TimeSeriesModelSettings}"/>.
4343 /// </returns>
44+ /// <example>
45+ /// <code snippet="Snippet:TimeSeriesInsightsSampleGetModelSettings">
46+ /// Response<TimeSeriesModelSettings> getModelSettingsResponse = await client.ModelSettings.GetAsync();
47+ /// Console.WriteLine($"Retrieved Time Series Insights model settings:\n{JsonSerializer.Serialize(getModelSettingsResponse.Value)}");
48+ /// </code>
49+ /// </example>
4450 public virtual async Task < Response < TimeSeriesModelSettings > > GetAsync ( CancellationToken cancellationToken = default )
4551 {
4652 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( Get ) } ") ;
@@ -65,6 +71,9 @@ public virtual async Task<Response<TimeSeriesModelSettings>> GetAsync(Cancellati
6571 /// The model settings which includes model display name, Time Series Id properties and default type Id with the
6672 /// http response <see cref="Response{TimeSeriesModelSettings}"/>.
6773 /// </returns>
74+ /// <seealso cref="GetAsync(CancellationToken)">
75+ /// See the asynchronous version of this method for examples.
76+ /// </seealso>
6877 public virtual Response < TimeSeriesModelSettings > Get ( CancellationToken cancellationToken = default )
6978 {
7079 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( Get ) } ") ;
@@ -87,6 +96,13 @@ public virtual Response<TimeSeriesModelSettings> Get(CancellationToken cancellat
8796 /// <param name="name">Model display name which is mutable by the user. Initial value is "DefaultModel".</param>
8897 /// <param name="cancellationToken">The cancellation token.</param>
8998 /// <returns>The updated model settings with the http response <see cref="Response{TimeSeriesModelSettings}"/>.</returns>
99+ /// <example>
100+ /// <code snippet="Snippet:TimeSeriesInsightsSampleUpdateModelSettingsName">
101+ /// Response<TimeSeriesModelSettings> updateModelSettingsNameResponse = await client.ModelSettings.UpdateNameAsync("NewModelSettingsName");
102+ /// Console.WriteLine($"Updated Time Series Insights model settings name:\n" +
103+ /// $"{JsonSerializer.Serialize(updateModelSettingsNameResponse.Value)}");
104+ /// </code>
105+ /// </example>
90106 public virtual async Task < Response < TimeSeriesModelSettings > > UpdateNameAsync ( string name , CancellationToken cancellationToken = default )
91107 {
92108 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( UpdateName ) } ") ;
@@ -110,6 +126,9 @@ public virtual async Task<Response<TimeSeriesModelSettings>> UpdateNameAsync(str
110126 /// <param name="name">Model display name which is mutable by the user. Initial value is "DefaultModel".</param>
111127 /// <param name="cancellationToken">The cancellation token.</param>
112128 /// <returns>The updated model settings with the http response <see cref="Response{TimeSeriesModelSettings}"/>.</returns>
129+ /// <seealso cref="UpdateNameAsync(string, CancellationToken)">
130+ /// See the asynchronous version of this method for examples.
131+ /// </seealso>
113132 public virtual Response < TimeSeriesModelSettings > UpdateName ( string name , CancellationToken cancellationToken = default )
114133 {
115134 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( UpdateName ) } ") ;
@@ -134,6 +153,13 @@ public virtual Response<TimeSeriesModelSettings> UpdateName(string name, Cancell
134153 /// <param name="defaultTypeId">Default type Id of the model that new instances will automatically belong to.</param>
135154 /// <param name="cancellationToken">The cancellation token.</param>
136155 /// <returns>The updated model settings with the http response <see cref="Response{TimeSeriesModelSettings}"/>.</returns>
156+ /// <example>
157+ /// <code snippet="Snippet:TimeSeriesInsightsSampleUpdateModelSettingsDefaultType">
158+ /// Response<TimeSeriesModelSettings> updateDefaultTypeIdResponse = await client.ModelSettings.UpdateDefaultTypeIdAsync(tsiTypeId);
159+ /// Console.WriteLine($"Updated Time Series Insights model settings default type Id:\n" +
160+ /// $"{JsonSerializer.Serialize(updateDefaultTypeIdResponse.Value)}");
161+ /// </code>
162+ /// </example>
137163 public virtual async Task < Response < TimeSeriesModelSettings > > UpdateDefaultTypeIdAsync ( string defaultTypeId , CancellationToken cancellationToken = default )
138164 {
139165 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( UpdateDefaultTypeId ) } ") ;
@@ -157,6 +183,9 @@ public virtual async Task<Response<TimeSeriesModelSettings>> UpdateDefaultTypeId
157183 /// <param name="defaultTypeId">Default type Id of the model that new instances will automatically belong to.</param>
158184 /// <param name="cancellationToken">The cancellation token.</param>
159185 /// <returns>The updated model settings with the http response <see cref="Response{TimeSeriesModelSettings}"/>.</returns>
186+ /// <seealso cref="UpdateDefaultTypeIdAsync(string, CancellationToken)">
187+ /// See the asynchronous version of this method for examples.
188+ /// </seealso>
160189 public virtual Response < TimeSeriesModelSettings > UpdateDefaultTypeId ( string defaultTypeId , CancellationToken cancellationToken = default )
161190 {
162191 using DiagnosticScope scope = _clientDiagnostics . CreateScope ( $ "{ nameof ( TimeSeriesInsightsClient ) } .{ nameof ( UpdateDefaultTypeId ) } ") ;
0 commit comments