/* 
 * TSE Cloud - CO
 *
 * This is Swagger Docs for Document WebApi Teamsystemn Enterprise Cloud, more detail at [https://swagger.io](https://swagger.io).
 *
 * OpenAPI spec version: v2025.3000
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace IO.Swagger.Api
{
    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
        public interface IHypermediaApi : IApiAccessor
    {
        #region Synchronous Operations
        /// <summary>
        /// Retrieve all media related to a media id
        /// </summary>
        /// <remarks>
        /// Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>FileResourceDTO</returns>
        FileResourceDTO ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Retrieve all media related to a media id
        /// </summary>
        /// <remarks>
        /// Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of FileResourceDTO</returns>
        ApiResponse<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Paths of all media
        /// </summary>
        /// <remarks>
        /// Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>string</returns>
        string ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Paths of all media
        /// </summary>
        /// <remarks>
        /// Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of string</returns>
        ApiResponse<string> ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Default average
        /// </summary>
        /// <remarks>
        /// Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>FileResourceDTO</returns>
        FileResourceDTO ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Default average
        /// </summary>
        /// <remarks>
        /// Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of FileResourceDTO</returns>
        ApiResponse<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Default media path
        /// </summary>
        /// <remarks>
        /// Given a media id, get the default media path.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>string</returns>
        string ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Default media path
        /// </summary>
        /// <remarks>
        /// Given a media id, get the default media path.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of string</returns>
        ApiResponse<string> ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        #endregion Synchronous Operations
        #region Asynchronous Operations
        /// <summary>
        /// Retrieve all media related to a media id
        /// </summary>
        /// <remarks>
        /// Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of FileResourceDTO</returns>
        System.Threading.Tasks.Task<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Retrieve all media related to a media id
        /// </summary>
        /// <remarks>
        /// Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (FileResourceDTO)</returns>
        System.Threading.Tasks.Task<ApiResponse<FileResourceDTO>> ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Paths of all media
        /// </summary>
        /// <remarks>
        /// Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of string</returns>
        System.Threading.Tasks.Task<string> ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Paths of all media
        /// </summary>
        /// <remarks>
        /// Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (string)</returns>
        System.Threading.Tasks.Task<ApiResponse<string>> ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Default average
        /// </summary>
        /// <remarks>
        /// Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of FileResourceDTO</returns>
        System.Threading.Tasks.Task<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Default average
        /// </summary>
        /// <remarks>
        /// Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (FileResourceDTO)</returns>
        System.Threading.Tasks.Task<ApiResponse<FileResourceDTO>> ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        /// <summary>
        /// Default media path
        /// </summary>
        /// <remarks>
        /// Given a media id, get the default media path.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of string</returns>
        System.Threading.Tasks.Task<string> ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);

        /// <summary>
        /// Default media path
        /// </summary>
        /// <remarks>
        /// Given a media id, get the default media path.
        /// </remarks>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (string)</returns>
        System.Threading.Tasks.Task<ApiResponse<string>> ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null);
        #endregion Asynchronous Operations
    }

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

        /// <summary>
        /// Initializes a new instance of the <see cref="HypermediaApi"/> class.
        /// </summary>
        /// <returns></returns>
        public HypermediaApi(String basePath)
        {
            this.Configuration = new IO.Swagger.Client.Configuration { BasePath = basePath };

            ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HypermediaApi"/> class
        /// </summary>
        /// <returns></returns>
        public HypermediaApi()
        {
            this.Configuration = IO.Swagger.Client.Configuration.Default;

            ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HypermediaApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public HypermediaApi(IO.Swagger.Client.Configuration configuration = null)
        {
            if (configuration == null) // use the default one in Configuration
                this.Configuration = IO.Swagger.Client.Configuration.Default;
            else
                this.Configuration = configuration;

            ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
        }

        /// <summary>
        /// Gets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        public String GetBasePath()
        {
            return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
        }

        /// <summary>
        /// Sets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
        public void SetBasePath(String basePath)
        {
            // do nothing
        }

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

        /// <summary>
        /// Provides a factory method hook for the creation of exceptions.
        /// </summary>
        public IO.Swagger.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>
        /// Gets the default header.
        /// </summary>
        /// <returns>Dictionary of HTTP header</returns>
        [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
        public IDictionary<String, String> DefaultHeader()
        {
            return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
        }

        /// <summary>
        /// Add default header.
        /// </summary>
        /// <param name="key">Header field name.</param>
        /// <param name="value">Header field value.</param>
        /// <returns></returns>
        [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
        public void AddDefaultHeader(string key, string value)
        {
            this.Configuration.AddDefaultHeader(key, value);
        }

        /// <summary>
        /// Retrieve all media related to a media id Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>FileResourceDTO</returns>
        public FileResourceDTO ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<FileResourceDTO> localVarResponse = ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;
        }

        /// <summary>
        /// Retrieve all media related to a media id Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of FileResourceDTO</returns>
        public ApiResponse< FileResourceDTO > ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/allmedias";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("IdMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<FileResourceDTO>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (FileResourceDTO) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FileResourceDTO)));
        }

        /// <summary>
        /// Retrieve all media related to a media id Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of FileResourceDTO</returns>
        public async System.Threading.Tasks.Task<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<FileResourceDTO> localVarResponse = await ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostAsyncWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;

        }

        /// <summary>
        /// Retrieve all media related to a media id Return the data stream, if there is only one media associated with the id. Return a zip with all media if there are more than one. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (FileResourceDTO)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<FileResourceDTO>> ApiV1EnvironmentCOHypermediaIdMediaAllmediasPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/allmedias";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("IdMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaAllmediasPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<FileResourceDTO>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (FileResourceDTO) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FileResourceDTO)));
        }

        /// <summary>
        /// Paths of all media Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>string</returns>
        public string ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<string> localVarResponse = ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;
        }

        /// <summary>
        /// Paths of all media Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of string</returns>
        public ApiResponse< string > ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/allpaths";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<string>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
        }

        /// <summary>
        /// Paths of all media Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of string</returns>
        public async System.Threading.Tasks.Task<string> ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<string> localVarResponse = await ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostAsyncWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;

        }

        /// <summary>
        /// Paths of all media Paths of all media (separated by the &#x27;$&#x27; character) related to the indicated media id
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id of which you want all paths</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (string)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<string>> ApiV1EnvironmentCOHypermediaIdMediaAllpathsPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/allpaths";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaAllpathsPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<string>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
        }

        /// <summary>
        /// Default average Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>FileResourceDTO</returns>
        public FileResourceDTO ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<FileResourceDTO> localVarResponse = ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;
        }

        /// <summary>
        /// Default average Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of FileResourceDTO</returns>
        public ApiResponse< FileResourceDTO > ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/defaultmedia";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<FileResourceDTO>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (FileResourceDTO) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FileResourceDTO)));
        }

        /// <summary>
        /// Default average Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of FileResourceDTO</returns>
        public async System.Threading.Tasks.Task<FileResourceDTO> ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<FileResourceDTO> localVarResponse = await ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostAsyncWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;

        }

        /// <summary>
        /// Default average Given a media id, it retrieves its data stream. In the event of a return with base 64 encoding, the relative DTO returns.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Mandatory parameter</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (FileResourceDTO)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<FileResourceDTO>> ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/defaultmedia";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaDefaultmediaPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<FileResourceDTO>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (FileResourceDTO) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FileResourceDTO)));
        }

        /// <summary>
        /// Default media path Given a media id, get the default media path.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>string</returns>
        public string ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<string> localVarResponse = ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;
        }

        /// <summary>
        /// Default media path Given a media id, get the default media path.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>ApiResponse of string</returns>
        public ApiResponse< string > ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/defaultpath";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<string>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
        }

        /// <summary>
        /// Default media path Given a media id, get the default media path.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of string</returns>
        public async System.Threading.Tasks.Task<string> ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostAsync (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
             ApiResponse<string> localVarResponse = await ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostAsyncWithHttpInfo(idMedia, environment, authorizationScope, company, user, acceptLanguage, acceptTerritory);
             return localVarResponse.Data;

        }

        /// <summary>
        /// Default media path Given a media id, get the default media path.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="idMedia">Media id whose path you want</param>
        /// <param name="environment"></param>
        /// <param name="authorizationScope">The environment where this operation will be executed. This must match with the environment in the url.</param>
        /// <param name="company">Company code (optional)</param>
        /// <param name="user">Application user (mandatory if the WebApi user does not have any mapped application user) (optional)</param>
        /// <param name="acceptLanguage">Specifies the UI culture to be used for localization of messages. (optional, default to it-IT)</param>
        /// <param name="acceptTerritory">Specifies the culture to be used for data formatting (numbers, dates, currencies). Default: Accept-Language or &#x27;IT&#x27; (optional, default to it-IT)</param>
        /// <returns>Task of ApiResponse (string)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<string>> ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPostAsyncWithHttpInfo (string idMedia, string environment, string authorizationScope, string company = null, string user = null, string acceptLanguage = null, string acceptTerritory = null)
        {
            // verify the required parameter 'idMedia' is set
            if (idMedia == null)
                throw new ApiException(400, "Missing required parameter 'idMedia' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");
            // verify the required parameter 'environment' is set
            if (environment == null)
                throw new ApiException(400, "Missing required parameter 'environment' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");
            // verify the required parameter 'authorizationScope' is set
            if (authorizationScope == null)
                throw new ApiException(400, "Missing required parameter 'authorizationScope' when calling HypermediaApi->ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost");

            var localVarPath = "/api/v1/{environment}/CO/Hypermedia/{IdMedia}/defaultpath";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (idMedia != null) localVarPathParams.Add("idMedia", this.Configuration.ApiClient.ParameterToString(idMedia)); // path parameter
            if (environment != null) localVarPathParams.Add("environment", this.Configuration.ApiClient.ParameterToString(environment)); // path parameter
            if (company != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "company", company)); // query parameter
            if (user != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
            if (authorizationScope != null) localVarHeaderParams.Add("authorization-scope", this.Configuration.ApiClient.ParameterToString(authorizationScope)); // header parameter
            if (acceptLanguage != null) localVarHeaderParams.Add("Accept-Language", this.Configuration.ApiClient.ParameterToString(acceptLanguage)); // header parameter
            if (acceptTerritory != null) localVarHeaderParams.Add("Accept-Territory", this.Configuration.ApiClient.ParameterToString(acceptTerritory)); // header parameter
            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }
            // authentication (Bearer) required
            // bearer required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ApiV1EnvironmentCOHypermediaIdMediaDefaultpathPost", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<string>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
        }

    }
}
