|  |  | 1 |  | // <auto-generated> | 
|  |  | 2 |  | // Copyright (c) Microsoft Corporation. All rights reserved. | 
|  |  | 3 |  | // Licensed under the MIT License. See License.txt in the project root for | 
|  |  | 4 |  | // license information. | 
|  |  | 5 |  | // | 
|  |  | 6 |  | // Code generated by Microsoft (R) AutoRest Code Generator. | 
|  |  | 7 |  | // Changes may cause incorrect behavior and will be lost if the code is | 
|  |  | 8 |  | // regenerated. | 
|  |  | 9 |  | // </auto-generated> | 
|  |  | 10 |  |  | 
|  |  | 11 |  | namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker | 
|  |  | 12 |  | { | 
|  |  | 13 |  |     using Models; | 
|  |  | 14 |  |     using System.Threading; | 
|  |  | 15 |  |     using System.Threading.Tasks; | 
|  |  | 16 |  |  | 
|  |  | 17 |  |     /// <summary> | 
|  |  | 18 |  |     /// Extension methods for EndpointSettings. | 
|  |  | 19 |  |     /// </summary> | 
|  |  | 20 |  |     public static partial class EndpointSettingsExtensions | 
|  |  | 21 |  |     { | 
|  |  | 22 |  |             /// <summary> | 
|  |  | 23 |  |             /// Gets endpoint settings for an endpoint. | 
|  |  | 24 |  |             /// </summary> | 
|  |  | 25 |  |             /// <param name='operations'> | 
|  |  | 26 |  |             /// The operations group for this extension method. | 
|  |  | 27 |  |             /// </param> | 
|  |  | 28 |  |             /// <param name='cancellationToken'> | 
|  |  | 29 |  |             /// The cancellation token. | 
|  |  | 30 |  |             /// </param> | 
|  |  | 31 |  |             public static async Task<EndpointSettingsDTO> GetSettingsAsync(this IEndpointSettings operations, Cancellati | 
|  |  | 32 |  |             { | 
|  | 0 | 33 |  |                 using (var _result = await operations.GetSettingsWithHttpMessagesAsync(null, cancellationToken).Configur | 
|  |  | 34 |  |                 { | 
|  | 0 | 35 |  |                     return _result.Body; | 
|  |  | 36 |  |                 } | 
|  | 0 | 37 |  |             } | 
|  |  | 38 |  |  | 
|  |  | 39 |  |             /// <summary> | 
|  |  | 40 |  |             /// Updates endpoint settings for an endpoint. | 
|  |  | 41 |  |             /// </summary> | 
|  |  | 42 |  |             /// <param name='operations'> | 
|  |  | 43 |  |             /// The operations group for this extension method. | 
|  |  | 44 |  |             /// </param> | 
|  |  | 45 |  |             /// <param name='endpointSettingsPayload'> | 
|  |  | 46 |  |             /// Post body of the request. | 
|  |  | 47 |  |             /// </param> | 
|  |  | 48 |  |             /// <param name='cancellationToken'> | 
|  |  | 49 |  |             /// The cancellation token. | 
|  |  | 50 |  |             /// </param> | 
|  |  | 51 |  |             public static async Task<string> UpdateSettingsAsync(this IEndpointSettings operations, EndpointSettingsDTO  | 
|  |  | 52 |  |             { | 
|  | 0 | 53 |  |                 using (var _result = await operations.UpdateSettingsWithHttpMessagesAsync(endpointSettingsPayload, null, | 
|  |  | 54 |  |                 { | 
|  | 0 | 55 |  |                     return _result.Body; | 
|  |  | 56 |  |                 } | 
|  | 0 | 57 |  |             } | 
|  |  | 58 |  |  | 
|  |  | 59 |  |     } | 
|  |  | 60 |  | } |