/*
 * 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 IMiscApiSync : IApiAccessor
    {
        #region Synchronous Operations
        /// <summary>
        /// Get a list of known game locations.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>LocationsGet200Response</returns>
        LocationsGet200Response LocationsGet(string? language = default(string?), int operationIndex = 0);

        /// <summary>
        /// Get a list of known game locations.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of LocationsGet200Response</returns>
        ApiResponse<LocationsGet200Response> LocationsGetWithHttpInfo(string? language = default(string?), int operationIndex = 0);
        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>MissionsGet200Response</returns>
        MissionsGet200Response MissionsGet(string? language = default(string?), int operationIndex = 0);

        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of MissionsGet200Response</returns>
        ApiResponse<MissionsGet200Response> MissionsGetWithHttpInfo(string? language = default(string?), int operationIndex = 0);
        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>NpcGet200Response</returns>
        NpcGet200Response NpcGet(string? language = default(string?), int operationIndex = 0);

        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of NpcGet200Response</returns>
        ApiResponse<NpcGet200Response> NpcGetWithHttpInfo(string? language = default(string?), int operationIndex = 0);
        #endregion Synchronous Operations
    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface IMiscApiAsync : IApiAccessor
    {
        #region Asynchronous Operations
        /// <summary>
        /// Get a list of known game locations.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of LocationsGet200Response</returns>
        System.Threading.Tasks.Task<LocationsGet200Response> LocationsGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Get a list of known game locations.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (LocationsGet200Response)</returns>
        System.Threading.Tasks.Task<ApiResponse<LocationsGet200Response>> LocationsGetWithHttpInfoAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of MissionsGet200Response</returns>
        System.Threading.Tasks.Task<MissionsGet200Response> MissionsGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (MissionsGet200Response)</returns>
        System.Threading.Tasks.Task<ApiResponse<MissionsGet200Response>> MissionsGetWithHttpInfoAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of NpcGet200Response</returns>
        System.Threading.Tasks.Task<NpcGet200Response> NpcGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

        /// <summary>
        /// Get a list of known NPCs.
        /// </summary>
        /// <remarks>
        /// 
        /// </remarks>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (NpcGet200Response)</returns>
        System.Threading.Tasks.Task<ApiResponse<NpcGet200Response>> NpcGetWithHttpInfoAsync(string? language = default(string?), 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 IMiscApi : IMiscApiSync, IMiscApiAsync
    {

    }

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

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

        /// <summary>
        /// Initializes a new instance of the <see cref="MiscApi"/> class.
        /// </summary>
        /// <returns></returns>
        public MiscApi(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="MiscApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public MiscApi(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="MiscApi"/> 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 MiscApi(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>
        /// Get a list of known game locations. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>LocationsGet200Response</returns>
        public LocationsGet200Response LocationsGet(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<LocationsGet200Response> localVarResponse = LocationsGetWithHttpInfo(language);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known game locations. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of LocationsGet200Response</returns>
        public WarframeMarket.Client.ApiResponse<LocationsGet200Response> LocationsGetWithHttpInfo(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.LocationsGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Get<LocationsGet200Response>("/locations", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("LocationsGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Get a list of known game locations. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of LocationsGet200Response</returns>
        public async System.Threading.Tasks.Task<LocationsGet200Response> LocationsGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<LocationsGet200Response> localVarResponse = await LocationsGetWithHttpInfoAsync(language, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known game locations. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (LocationsGet200Response)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<LocationsGet200Response>> LocationsGetWithHttpInfoAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {

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

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.LocationsGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.GetAsync<LocationsGet200Response>("/locations", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return localVarResponse;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>MissionsGet200Response</returns>
        public MissionsGet200Response MissionsGet(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<MissionsGet200Response> localVarResponse = MissionsGetWithHttpInfo(language);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of MissionsGet200Response</returns>
        public WarframeMarket.Client.ApiResponse<MissionsGet200Response> MissionsGetWithHttpInfo(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.MissionsGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Get<MissionsGet200Response>("/missions", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("MissionsGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of MissionsGet200Response</returns>
        public async System.Threading.Tasks.Task<MissionsGet200Response> MissionsGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<MissionsGet200Response> localVarResponse = await MissionsGetWithHttpInfoAsync(language, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (MissionsGet200Response)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<MissionsGet200Response>> MissionsGetWithHttpInfoAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {

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

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.MissionsGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.GetAsync<MissionsGet200Response>("/missions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return localVarResponse;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>NpcGet200Response</returns>
        public NpcGet200Response NpcGet(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.ApiResponse<NpcGet200Response> localVarResponse = NpcGetWithHttpInfo(language);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of NpcGet200Response</returns>
        public WarframeMarket.Client.ApiResponse<NpcGet200Response> NpcGetWithHttpInfo(string? language = default(string?), int operationIndex = 0)
        {
            WarframeMarket.Client.RequestOptions localVarRequestOptions = new WarframeMarket.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.NpcGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Get<NpcGet200Response>("/npc", localVarRequestOptions, this.Configuration);
            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("NpcGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return localVarResponse;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of NpcGet200Response</returns>
        public async System.Threading.Tasks.Task<NpcGet200Response> NpcGetAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            WarframeMarket.Client.ApiResponse<NpcGet200Response> localVarResponse = await NpcGetWithHttpInfoAsync(language, operationIndex, cancellationToken).ConfigureAwait(false);
            return localVarResponse.Data;
        }

        /// <summary>
        /// Get a list of known NPCs. 
        /// </summary>
        /// <exception cref="WarframeMarket.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="language">Asks the server to return content translated into the specified language, default: &#x60;en&#x60;.  (optional)</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (NpcGet200Response)</returns>
        public async System.Threading.Tasks.Task<WarframeMarket.Client.ApiResponse<NpcGet200Response>> NpcGetWithHttpInfoAsync(string? language = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {

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

            string[] _contentTypes = new string[] {
            };

            // 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);
            }

            if (language != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Language", WarframeMarket.Client.ClientUtils.ParameterToString(language)); // header parameter
            }

            localVarRequestOptions.Operation = "MiscApi.NpcGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.GetAsync<NpcGet200Response>("/npc", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return localVarResponse;
        }

    }
}
