/*
 * Warframe.market API
 *
 * ## Documentation is under very slow and heavy development  This document will gradually be supplemented and updated over some extended period of time.  ## Unstable endpoints Endpoint that is not stable and probably will be changed in the future will be marked with exclamation sign -> âš  
 *
 * The version of the OpenAPI document: 1.14.0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Net.Mime;
using WarframeMarket.Client;
using WarframeMarket.Model;

namespace WarframeMarket.Api
{

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface IAuthApiSync : IApiAccessor
    {
        #region Synchronous Operations
        /// <summary>
        /// Registration of new user and their device.
        /// </summary>
        /// <remarks>
        /// There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>CurrentUser</returns>
        CurrentUser AuthRegistrationPost(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0);

        /// <summary>
        /// Registration of new user and their device.
        /// </summary>
        /// <remarks>
        /// There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of CurrentUser</returns>
        ApiResponse<CurrentUser> AuthRegistrationPostWithHttpInfo(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0);
        /// <summary>
        /// Password restoration.
        /// </summary>
        /// <remarks>
        /// You will recieve mail with the new password, short after api call.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>Object</returns>
        Object AuthRestorePost(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0);

        /// <summary>
        /// Password restoration.
        /// </summary>
        /// <remarks>
        /// You will recieve mail with the new password, short after api call.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of Object</returns>
        ApiResponse<Object> AuthRestorePostWithHttpInfo(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0);
        /// <summary>
        /// Simple login.
        /// </summary>
        /// <remarks>
        /// There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>CurrentUser</returns>
        CurrentUser AuthSigninPost(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0);

        /// <summary>
        /// Simple login.
        /// </summary>
        /// <remarks>
        /// There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of CurrentUser</returns>
        ApiResponse<CurrentUser> AuthSigninPostWithHttpInfo(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0);
        #endregion Synchronous Operations
    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface IAuthApiAsync : IApiAccessor
    {
        #region Asynchronous Operations
        /// <summary>
        /// Registration of new user and their device.
        /// </summary>
        /// <remarks>
        /// There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of CurrentUser</returns>
        System.Threading.Tasks.Task<CurrentUser> AuthRegistrationPostAsync(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Registration of new user and their device.
        /// </summary>
        /// <remarks>
        /// There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (CurrentUser)</returns>
        System.Threading.Tasks.Task<ApiResponse<CurrentUser>> AuthRegistrationPostWithHttpInfoAsync(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
        /// <summary>
        /// Password restoration.
        /// </summary>
        /// <remarks>
        /// You will recieve mail with the new password, short after api call.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of Object</returns>
        System.Threading.Tasks.Task<Object> AuthRestorePostAsync(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Password restoration.
        /// </summary>
        /// <remarks>
        /// You will recieve mail with the new password, short after api call.
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (Object)</returns>
        System.Threading.Tasks.Task<ApiResponse<Object>> AuthRestorePostWithHttpInfoAsync(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
        /// <summary>
        /// Simple login.
        /// </summary>
        /// <remarks>
        /// There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of CurrentUser</returns>
        System.Threading.Tasks.Task<CurrentUser> AuthSigninPostAsync(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Simple login.
        /// </summary>
        /// <remarks>
        /// There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (CurrentUser)</returns>
        System.Threading.Tasks.Task<ApiResponse<CurrentUser>> AuthSigninPostWithHttpInfoAsync(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
        #endregion Asynchronous Operations
    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface IAuthApi : IAuthApiSync, IAuthApiAsync
    {

    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public partial class AuthApi : IAuthApi
    {
        private WarframeMarket.Client.ExceptionFactory _exceptionFactory = (name, response) => null;

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthApi"/> class.
        /// </summary>
        /// <returns></returns>
        public AuthApi() : this((string)null)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthApi"/> class.
        /// </summary>
        /// <returns></returns>
        public AuthApi(string basePath)
        {
            this.Configuration = WarframeMarket.Client.Configuration.MergeConfigurations(
                WarframeMarket.Client.GlobalConfiguration.Instance,
                new WarframeMarket.Client.Configuration { BasePath = basePath }
            );
            this.Client = new WarframeMarket.Client.ApiClient(this.Configuration.BasePath);
            this.AsynchronousClient = new WarframeMarket.Client.ApiClient(this.Configuration.BasePath);
            this.ExceptionFactory = WarframeMarket.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public AuthApi(WarframeMarket.Client.Configuration configuration)
        {
            if (configuration == null) throw new ArgumentNullException("configuration");

            this.Configuration = WarframeMarket.Client.Configuration.MergeConfigurations(
                WarframeMarket.Client.GlobalConfiguration.Instance,
                configuration
            );
            this.Client = new WarframeMarket.Client.ApiClient(this.Configuration.BasePath);
            this.AsynchronousClient = new WarframeMarket.Client.ApiClient(this.Configuration.BasePath);
            ExceptionFactory = WarframeMarket.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthApi"/> class
        /// using a Configuration object and client instance.
        /// </summary>
        /// <param name="client">The client interface for synchronous API access.</param>
        /// <param name="asyncClient">The client interface for asynchronous API access.</param>
        /// <param name="configuration">The configuration object.</param>
        public AuthApi(WarframeMarket.Client.ISynchronousClient client, WarframeMarket.Client.IAsynchronousClient asyncClient, WarframeMarket.Client.IReadableConfiguration configuration)
        {
            if (client == null) throw new ArgumentNullException("client");
            if (asyncClient == null) throw new ArgumentNullException("asyncClient");
            if (configuration == null) throw new ArgumentNullException("configuration");

            this.Client = client;
            this.AsynchronousClient = asyncClient;
            this.Configuration = configuration;
            this.ExceptionFactory = WarframeMarket.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// The client for accessing this underlying API asynchronously.
        /// </summary>
        public WarframeMarket.Client.IAsynchronousClient AsynchronousClient { get; set; }

        /// <summary>
        /// The client for accessing this underlying API synchronously.
        /// </summary>
        public WarframeMarket.Client.ISynchronousClient Client { get; set; }

        /// <summary>
        /// Gets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        public string GetBasePath()
        {
            return this.Configuration.BasePath;
        }

        /// <summary>
        /// Gets or sets the configuration object
        /// </summary>
        /// <value>An instance of the Configuration</value>
        public WarframeMarket.Client.IReadableConfiguration Configuration { get; set; }

        /// <summary>
        /// Provides a factory method hook for the creation of exceptions.
        /// </summary>
        public WarframeMarket.Client.ExceptionFactory ExceptionFactory
        {
            get
            {
                if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
                {
                    throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
                }
                return _exceptionFactory;
            }
            set { _exceptionFactory = value; }
        }

        /// <summary>
        /// Registration of new user and their device. There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>CurrentUser</returns>
        public CurrentUser AuthRegistrationPost(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<CurrentUser> localVarResponse = AuthRegistrationPostWithHttpInfo(authRegistrationPostRequest);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Registration of new user and their device. There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of CurrentUser</returns>
        public WarframeMarket.Client.ApiResponse<CurrentUser> AuthRegistrationPostWithHttpInfo(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0)
        {
            // verify the required parameter 'authRegistrationPostRequest' is set
            if (authRegistrationPostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authRegistrationPostRequest' when calling AuthApi->AuthRegistrationPost");
            }

            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authRegistrationPostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthRegistrationPost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Post<CurrentUser>("/auth/registration", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthRegistrationPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Registration of new user and their device. There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of CurrentUser</returns>
        public async System.Threading.Tasks.Task<CurrentUser> AuthRegistrationPostAsync(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<CurrentUser> localVarResponse = await AuthRegistrationPostWithHttpInfoAsync(authRegistrationPostRequest, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Registration of new user and their device. There is 2 types of registration, for web browser and for Android device. Android device could avoid to include reCaptha toke by using secret DeviceKey in the request headers.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRegistrationPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (CurrentUser)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<CurrentUser>> AuthRegistrationPostWithHttpInfoAsync(AuthRegistrationPostRequest authRegistrationPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'authRegistrationPostRequest' is set
            if (authRegistrationPostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authRegistrationPostRequest' when calling AuthApi->AuthRegistrationPost");
            }


            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authRegistrationPostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthRegistrationPost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.PostAsync<CurrentUser>("/auth/registration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthRegistrationPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Password restoration. You will recieve mail with the new password, short after api call.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>Object</returns>
        public Object AuthRestorePost(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<Object> localVarResponse = AuthRestorePostWithHttpInfo(authRestorePostRequest);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Password restoration. You will recieve mail with the new password, short after api call.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of Object</returns>
        public WarframeMarket.Client.ApiResponse<Object> AuthRestorePostWithHttpInfo(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0)
        {
            // verify the required parameter 'authRestorePostRequest' is set
            if (authRestorePostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authRestorePostRequest' when calling AuthApi->AuthRestorePost");
            }

            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authRestorePostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthRestorePost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Post<Object>("/auth/restore", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthRestorePost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Password restoration. You will recieve mail with the new password, short after api call.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of Object</returns>
        public async System.Threading.Tasks.Task<Object> AuthRestorePostAsync(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<Object> localVarResponse = await AuthRestorePostWithHttpInfoAsync(authRestorePostRequest, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Password restoration. You will recieve mail with the new password, short after api call.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authRestorePostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (Object)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<Object>> AuthRestorePostWithHttpInfoAsync(AuthRestorePostRequest authRestorePostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'authRestorePostRequest' is set
            if (authRestorePostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authRestorePostRequest' when calling AuthApi->AuthRestorePost");
            }


            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authRestorePostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthRestorePost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/auth/restore", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthRestorePost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Simple login. There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>CurrentUser</returns>
        public CurrentUser AuthSigninPost(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<CurrentUser> localVarResponse = AuthSigninPostWithHttpInfo(authSigninPostRequest);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Simple login. There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of CurrentUser</returns>
        public WarframeMarket.Client.ApiResponse<CurrentUser> AuthSigninPostWithHttpInfo(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0)
        {
            // verify the required parameter 'authSigninPostRequest' is set
            if (authSigninPostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authSigninPostRequest' when calling AuthApi->AuthSigninPost");
            }

            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authSigninPostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthSigninPost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Post<CurrentUser>("/auth/signin", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthSigninPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Simple login. There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of CurrentUser</returns>
        public async System.Threading.Tasks.Task<CurrentUser> AuthSigninPostAsync(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<CurrentUser> localVarResponse = await AuthSigninPostWithHttpInfoAsync(authSigninPostRequest, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Simple login. There is 2 ways to maintain authorization: - Through Cookie for Web browsers. - Through Header for other devices. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authSigninPostRequest"></param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (CurrentUser)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<CurrentUser>> AuthSigninPostWithHttpInfoAsync(AuthSigninPostRequest authSigninPostRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'authSigninPostRequest' is set
            if (authSigninPostRequest == null)
            {
                throw new WarframeMarket.Client.ApiException(400, "Missing required parameter 'authSigninPostRequest' when calling AuthApi->AuthSigninPost");
            }


            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "application/json"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = WarframeMarket.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = WarframeMarket.Client.ClientUtils.SelectHeaderAccept(_accepts);
            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = authSigninPostRequest;

            localVarRequestOptions.Operation = "AuthApi.AuthSigninPost";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.PostAsync<CurrentUser>("/auth/signin", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AuthSigninPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

    }
}
