/// <summary>
 /// Logs user into the system
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='username'>
 /// The user name for login
 /// </param>
 /// <param name='password'>
 /// The password for login in clear text
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> LoginUserAsync(this ISwaggerPetstoreV2 operations, string username, string password, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.LoginUserWithHttpMessagesAsync(username, password, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Logs user into the system
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='username'>
 /// The user name for login
 /// </param>
 /// <param name='password'>
 /// The password for login in clear text
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <string, LoginUserHeaders> LoginUserWithHttpMessages(this ISwaggerPetstoreV2 operations, string username, string password, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.LoginUserWithHttpMessagesAsync(username, password, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }