/// <summary>
        ///     Download file
        /// </summary>
        /// <param name="request">Request. <see cref="DownloadFileRequest" /></param>
        /// <returns>
        ///     <see cref="System.IO.Stream" />
        /// </returns>
        public System.IO.Stream DownloadFile(DownloadFileRequest request)
        {
            // verify the required parameter 'path' is set
            if (request.path == null)
            {
                throw new ApiException(400, "Missing required parameter 'path' when calling DownloadFile");
            }
            // create path and map variables
            string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/file/{path}";

            resourcePath = Regex
                           .Replace(resourcePath, "\\*", string.Empty)
                           .Replace("&amp;", "&")
                           .Replace("/?", "?");
            resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId);


            return(_apiInvoker.InvokeBinaryApi(
                       resourcePath,
                       "GET",
                       null,
                       null,
                       null));
        }
        /// <summary>
        ///     Generate barcode.
        /// </summary>
        /// <param name="request">Request. <see cref="GetBarcodeGenerateRequest" /></param>
        /// <returns>
        ///     <see cref="System.IO.Stream" />
        /// </returns>
        public System.IO.Stream GetBarcodeGenerate(GetBarcodeGenerateRequest request)
        {
            // verify the required parameter 'type' is set
            if (request.Type == null)
            {
                throw new ApiException(400, "Missing required parameter 'type' when calling GetBarcodeGenerate");
            }
            // verify the required parameter 'text' is set
            if (request.Text == null)
            {
                throw new ApiException(400, "Missing required parameter 'text' when calling GetBarcodeGenerate");
            }
            // create path and map variables
            string resourcePath = _configuration.GetApiRootUrl() + "/barcode/generate";

            resourcePath = Regex
                           .Replace(resourcePath, "\\*", string.Empty)
                           .Replace("&amp;", "&")
                           .Replace("/?", "?");
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "type", request.Type);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "text", request.Text);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "twoDDisplayText", request.TwoDDisplayText);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "textLocation", request.TextLocation);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "textAlignment", request.TextAlignment);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "textColor", request.TextColor);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fontSizeMode", request.FontSizeMode);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "noWrap", request.NoWrap);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "resolution", request.Resolution);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "resolutionX", request.ResolutionX);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "resolutionY", request.ResolutionY);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "dimensionX", request.DimensionX);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "textSpace", request.TextSpace);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "units", request.Units);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "sizeMode", request.SizeMode);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "barHeight", request.BarHeight);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "imageHeight", request.ImageHeight);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "imageWidth", request.ImageWidth);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rotationAngle", request.RotationAngle);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "backColor", request.BackColor);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "barColor", request.BarColor);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "borderColor", request.BorderColor);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "borderWidth", request.BorderWidth);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "borderDashStyle", request.BorderDashStyle);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "borderVisible", request.BorderVisible);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "enableChecksum", request.EnableChecksum);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "enableEscape", request.EnableEscape);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "filledBars", request.FilledBars);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "alwaysShowChecksum", request.AlwaysShowChecksum);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "wideNarrowRatio", request.WideNarrowRatio);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "validateText", request.ValidateText);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "supplementData", request.SupplementData);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "supplementSpace", request.SupplementSpace);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "barWidthReduction", request.BarWidthReduction);
            resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format);


            return(_apiInvoker.InvokeBinaryApi(
                       resourcePath,
                       "GET",
                       null,
                       null,
                       null));
        }