diff --git a/.github/workflows/net-framework.yml b/.github/workflows/net-framework.yml index c740ff1..a42c1c1 100644 --- a/.github/workflows/net-framework.yml +++ b/.github/workflows/net-framework.yml @@ -41,7 +41,7 @@ jobs: run: | $ErrorActionPreference = "Stop" VSTest.Console.exe /Framework:".NETFramework,Version=${{ matrix.net-version }}" /ResultsDirectory:Tests\Results /Logger:"trx;LogFileName=test.log" Tests\bin\Release\${{ matrix.framework }}\Aspose.BarCode.Cloud.Sdk.Tests.dll - if( ([xml](Get-Content Tests\Results\test.log)).TestRun.ResultSummary.Counters.total -ne 29 ){ throw "Not all tests were explored or added new tests" } + if( ([xml](Get-Content Tests\Results\test.log)).TestRun.ResultSummary.Counters.total -ne 25 ){ throw "Not all tests were explored or added new tests" } env: TEST_CONFIGURATION_JWT_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} diff --git a/.github/workflows/build-examples.yml b/.github/workflows/test-examples-and-snippets.yml similarity index 53% rename from .github/workflows/build-examples.yml rename to .github/workflows/test-examples-and-snippets.yml index 095ce2a..a4d24dd 100644 --- a/.github/workflows/build-examples.yml +++ b/.github/workflows/test-examples-and-snippets.yml @@ -1,4 +1,4 @@ -name: Build examples +name: Build examples and run snippets on: push: @@ -15,6 +15,14 @@ jobs: - name: Setup latest version of dotnet uses: actions/setup-dotnet@v4 - name: Build nuget with latest version - run: ./scripts/pack-nuget.bash "examples/nuget-packages" + run: | + ./scripts/pack-nuget.bash + cp *.nupkg examples/nuget-packages - name: Build examples with new nuget run: dotnet build --warnaserror "examples/examples.sln" + - name: Run documentation code snippets + run: | + chmod +x scripts/* + ./scripts/run_snippets.sh + env: + TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} diff --git a/.gitignore b/.gitignore index 1511b7b..71d9dce 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ obj Tests/Configuration*.json *.DotSettings *.binlog +snippets_test/ +*.nupkg diff --git a/Makefile b/Makefile index 2a4b398..e952296 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,11 @@ init: format: dotnet restore ./Aspose.BarCode.Cloud.Sdk.sln dotnet format ./Aspose.BarCode.Cloud.Sdk.sln --no-restore + dotnet format --include ./snippets/ # Trim white space in comments find . -iname "*.cs" -exec sed -i -e 's_[[:space:]]*$$__' {} \; + .PHONY: format-doc format-doc: # Remove trailing white space @@ -22,6 +24,7 @@ format-doc: .PHONY: test test: dotnet test -v normal --framework=net$(LATEST_SDK_VERSION) + ./scripts/run_snippests.sh .PHONY: build build: diff --git a/README.md b/README.md index d25ec57..c1db8da 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,13 @@ [![.NET Framework Windows](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml) [![Nuget](https://img.shields.io/nuget/v/Aspose.BarCode-Cloud)](https://www.nuget.org/packages/Aspose.BarCode-Cloud/) -- API version: 3.0 -- SDK version: 24.12.0 +- API version: 4.0 +- SDK version: 25.1.0 + +## SDK and API Version Compatibility: + +- SDK Version 25.1 and Later: Starting from SDK version 25.1, all subsequent versions are compatible with API Version v4.0. +- SDK Version 24.12 and Earlier: These versions are compatible with API Version v3.0. ## Demo applications @@ -67,7 +72,7 @@ The examples below show how you can recognize QR code from image: using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using System; using System.Collections.Generic; using System.IO; @@ -96,13 +101,16 @@ internal static class Program return config; } - private static async Task ReadQR(IBarcodeApi api, string fileName) + private static async Task ReadQR(IRecognizeApi api, string fileName) { - await using FileStream imageStream = File.OpenRead(fileName); - BarcodeResponseList recognized = await api.ScanBarcodeAsync( - new ScanBarcodeRequest(imageStream) + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + BarcodeResponseList recognized = await api.RecognizeBase64Async( + new RecognizeBase64Request() { - decodeTypes = new List { DecodeBarcodeType.QR } + BarcodeTypes = new List { DecodeBarcodeType.QR }, + FileBase64 = imageBase64 } ); @@ -117,7 +125,7 @@ internal static class Program "qr.png" )); - var api = new BarcodeApi(MakeConfiguration()); + var api = new RecognizeApi(MakeConfiguration()); string result = await ReadQR(api, fileName); Console.WriteLine($"File '{fileName}' recognized, result: '{result}'"); @@ -134,7 +142,7 @@ The examples below show how you can generate QR code and save it into local file using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using System; using System.IO; using System.Reflection; @@ -162,16 +170,14 @@ internal static class Program return config; } - private static async Task GenerateQR(IBarcodeApi api, string fileName) + private static async Task GenerateQR(IGenerateApi api, string fileName) { - await using Stream generated = await api.GetBarcodeGenerateAsync( - new GetBarcodeGenerateRequest( - EncodeBarcodeType.QR.ToString(), - "QR code text") - { - TextLocation = CodeLocation.None.ToString(), - format = "png" - }); + await using Stream generated = await api.GenerateAsync( + EncodeBarcodeType.QR, + "QR code text", + textLocation: CodeLocation.None, + imageFormat: BarcodeImageFormat.Png + ); await using FileStream stream = File.Create(fileName); await generated.CopyToAsync(stream); } @@ -184,7 +190,7 @@ internal static class Program "qr.png" )); - BarcodeApi api = new BarcodeApi(MakeConfiguration()); + GenerateApi api = new GenerateApi(MakeConfiguration()); await GenerateQR(api, fileName); Console.WriteLine($"File '{fileName}' generated."); @@ -212,112 +218,38 @@ All Aspose.BarCode for Cloud SDKs, helper scripts and templates are licensed und ## Documentation for API Endpoints -All URIs are relative to ** +All URIs are relative to ** Class | Method | HTTP request | Description ----- | ------ | ------------ | ----------- -*BarcodeApi* | [**GetBarcodeGenerate**](docs/BarcodeApi.md#getbarcodegenerate) | **GET** /barcode/generate | Generate barcode. -*BarcodeApi* | [**GetBarcodeRecognize**](docs/BarcodeApi.md#getbarcoderecognize) | **GET** /barcode/{name}/recognize | Recognize barcode from a file on server. -*BarcodeApi* | [**PostBarcodeRecognizeFromUrlOrContent**](docs/BarcodeApi.md#postbarcoderecognizefromurlorcontent) | **POST** /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field. -*BarcodeApi* | [**PostGenerateMultiple**](docs/BarcodeApi.md#postgeneratemultiple) | **POST** /barcode/generateMultiple | Generate multiple barcodes and return in response stream -*BarcodeApi* | [**PutBarcodeGenerateFile**](docs/BarcodeApi.md#putbarcodegeneratefile) | **PUT** /barcode/{name}/generate | Generate barcode and save on server (from query params or from file with json or xml content) -*BarcodeApi* | [**PutBarcodeRecognizeFromBody**](docs/BarcodeApi.md#putbarcoderecognizefrombody) | **PUT** /barcode/{name}/recognize | Recognition of a barcode from file on server with parameters in body. -*BarcodeApi* | [**PutGenerateMultiple**](docs/BarcodeApi.md#putgeneratemultiple) | **PUT** /barcode/{name}/generateMultiple | Generate image with multiple barcodes and put new file on server -*BarcodeApi* | [**ScanBarcode**](docs/BarcodeApi.md#scanbarcode) | **POST** /barcode/scan | Quickly scan a barcode from an image. -*FileApi* | [**CopyFile**](docs/FileApi.md#copyfile) | **PUT** /barcode/storage/file/copy/{srcPath} | Copy file -*FileApi* | [**DeleteFile**](docs/FileApi.md#deletefile) | **DELETE** /barcode/storage/file/{path} | Delete file -*FileApi* | [**DownloadFile**](docs/FileApi.md#downloadfile) | **GET** /barcode/storage/file/{path} | Download file -*FileApi* | [**MoveFile**](docs/FileApi.md#movefile) | **PUT** /barcode/storage/file/move/{srcPath} | Move file -*FileApi* | [**UploadFile**](docs/FileApi.md#uploadfile) | **PUT** /barcode/storage/file/{path} | Upload file -*FolderApi* | [**CopyFolder**](docs/FolderApi.md#copyfolder) | **PUT** /barcode/storage/folder/copy/{srcPath} | Copy folder -*FolderApi* | [**CreateFolder**](docs/FolderApi.md#createfolder) | **PUT** /barcode/storage/folder/{path} | Create the folder -*FolderApi* | [**DeleteFolder**](docs/FolderApi.md#deletefolder) | **DELETE** /barcode/storage/folder/{path} | Delete folder -*FolderApi* | [**GetFilesList**](docs/FolderApi.md#getfileslist) | **GET** /barcode/storage/folder/{path} | Get all files and folders within a folder -*FolderApi* | [**MoveFolder**](docs/FolderApi.md#movefolder) | **PUT** /barcode/storage/folder/move/{srcPath} | Move folder -*StorageApi* | [**GetDiscUsage**](docs/StorageApi.md#getdiscusage) | **GET** /barcode/storage/disc | Get disc usage -*StorageApi* | [**GetFileVersions**](docs/StorageApi.md#getfileversions) | **GET** /barcode/storage/version/{path} | Get file versions -*StorageApi* | [**ObjectExists**](docs/StorageApi.md#objectexists) | **GET** /barcode/storage/exist/{path} | Check if file or folder exists -*StorageApi* | [**StorageExists**](docs/StorageApi.md#storageexists) | **GET** /barcode/storage/{storageName}/exist | Check if storage exists +*GenerateApi* | [**Generate**](docs/GenerateApi.md#generate) | **GET** /barcode/generate/{barcodeType} | Generate barcode using GET request with parameters in route and query string. +*GenerateApi* | [**GenerateBody**](docs/GenerateApi.md#generatebody) | **POST** /barcode/generate-body | Generate barcode using POST request with parameters in body in json or xml format. +*GenerateApi* | [**GenerateMultipart**](docs/GenerateApi.md#generatemultipart) | **POST** /barcode/generate-multipart | Generate barcode using POST request with parameters in multipart form. +*RecognizeApi* | [**Recognize**](docs/RecognizeApi.md#recognize) | **GET** /barcode/recognize | Recognize barcode from file on server using GET requests with parameters in route and query string. +*RecognizeApi* | [**RecognizeBase64**](docs/RecognizeApi.md#recognizebase64) | **POST** /barcode/recognize-body | Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. +*RecognizeApi* | [**RecognizeMultipart**](docs/RecognizeApi.md#recognizemultipart) | **POST** /barcode/recognize-multipart | Recognize barcode from file in request body using POST requests with parameters in multipart form. +*ScanApi* | [**Scan**](docs/ScanApi.md#scan) | **GET** /barcode/scan | Scan barcode from file on server using GET requests with parameter in query string. +*ScanApi* | [**ScanBase64**](docs/ScanApi.md#scanbase64) | **POST** /barcode/scan-body | Scan barcode from file in request body using POST requests with parameter in body in json or xml format. +*ScanApi* | [**ScanMultipart**](docs/ScanApi.md#scanmultipart) | **POST** /barcode/scan-multipart | Scan barcode from file in request body using POST requests with parameter in multipart form. ## Documentation for Models - [Model.ApiError](docs/ApiError.md) - [Model.ApiErrorResponse](docs/ApiErrorResponse.md) -- [Model.AustralianPostParams](docs/AustralianPostParams.md) -- [Model.AutoSizeMode](docs/AutoSizeMode.md) -- [Model.AvailableGraphicsUnit](docs/AvailableGraphicsUnit.md) -- [Model.AztecEncodeMode](docs/AztecEncodeMode.md) -- [Model.AztecParams](docs/AztecParams.md) -- [Model.AztecSymbolMode](docs/AztecSymbolMode.md) +- [Model.BarcodeImageFormat](docs/BarcodeImageFormat.md) +- [Model.BarcodeImageParams](docs/BarcodeImageParams.md) - [Model.BarcodeResponse](docs/BarcodeResponse.md) - [Model.BarcodeResponseList](docs/BarcodeResponseList.md) -- [Model.BorderDashStyle](docs/BorderDashStyle.md) -- [Model.CaptionParams](docs/CaptionParams.md) -- [Model.ChecksumValidation](docs/ChecksumValidation.md) -- [Model.CodabarChecksumMode](docs/CodabarChecksumMode.md) -- [Model.CodabarParams](docs/CodabarParams.md) -- [Model.CodabarSymbol](docs/CodabarSymbol.md) -- [Model.CodablockParams](docs/CodablockParams.md) -- [Model.Code128Emulation](docs/Code128Emulation.md) -- [Model.Code128EncodeMode](docs/Code128EncodeMode.md) -- [Model.Code128Params](docs/Code128Params.md) -- [Model.Code16KParams](docs/Code16KParams.md) - [Model.CodeLocation](docs/CodeLocation.md) -- [Model.CouponParams](docs/CouponParams.md) -- [Model.CustomerInformationInterpretingType](docs/CustomerInformationInterpretingType.md) -- [Model.DataBarParams](docs/DataBarParams.md) -- [Model.DataMatrixEccType](docs/DataMatrixEccType.md) -- [Model.DataMatrixEncodeMode](docs/DataMatrixEncodeMode.md) -- [Model.DataMatrixParams](docs/DataMatrixParams.md) -- [Model.DataMatrixVersion](docs/DataMatrixVersion.md) - [Model.DecodeBarcodeType](docs/DecodeBarcodeType.md) -- [Model.DiscUsage](docs/DiscUsage.md) -- [Model.DotCodeEncodeMode](docs/DotCodeEncodeMode.md) -- [Model.DotCodeParams](docs/DotCodeParams.md) -- [Model.ECIEncodings](docs/ECIEncodings.md) -- [Model.EnableChecksum](docs/EnableChecksum.md) - [Model.EncodeBarcodeType](docs/EncodeBarcodeType.md) -- [Model.Error](docs/Error.md) -- [Model.ErrorDetails](docs/ErrorDetails.md) -- [Model.FileVersions](docs/FileVersions.md) -- [Model.FilesList](docs/FilesList.md) -- [Model.FilesUploadResult](docs/FilesUploadResult.md) -- [Model.FontMode](docs/FontMode.md) -- [Model.FontParams](docs/FontParams.md) -- [Model.FontStyle](docs/FontStyle.md) -- [Model.GeneratorParams](docs/GeneratorParams.md) -- [Model.GeneratorParamsList](docs/GeneratorParamsList.md) -- [Model.HanXinEncodeMode](docs/HanXinEncodeMode.md) -- [Model.HanXinErrorLevel](docs/HanXinErrorLevel.md) -- [Model.HanXinParams](docs/HanXinParams.md) -- [Model.HanXinVersion](docs/HanXinVersion.md) -- [Model.ITF14BorderType](docs/ITF14BorderType.md) -- [Model.ITFParams](docs/ITFParams.md) -- [Model.MacroCharacter](docs/MacroCharacter.md) -- [Model.MaxiCodeEncodeMode](docs/MaxiCodeEncodeMode.md) -- [Model.MaxiCodeMode](docs/MaxiCodeMode.md) -- [Model.MaxiCodeParams](docs/MaxiCodeParams.md) -- [Model.ObjectExist](docs/ObjectExist.md) -- [Model.Padding](docs/Padding.md) -- [Model.PatchCodeParams](docs/PatchCodeParams.md) -- [Model.PatchFormat](docs/PatchFormat.md) -- [Model.Pdf417CompactionMode](docs/Pdf417CompactionMode.md) -- [Model.Pdf417ErrorLevel](docs/Pdf417ErrorLevel.md) -- [Model.Pdf417MacroTerminator](docs/Pdf417MacroTerminator.md) -- [Model.Pdf417Params](docs/Pdf417Params.md) -- [Model.PostalParams](docs/PostalParams.md) -- [Model.PresetType](docs/PresetType.md) -- [Model.QREncodeMode](docs/QREncodeMode.md) -- [Model.QREncodeType](docs/QREncodeType.md) -- [Model.QRErrorLevel](docs/QRErrorLevel.md) -- [Model.QRVersion](docs/QRVersion.md) -- [Model.QrParams](docs/QrParams.md) -- [Model.ReaderParams](docs/ReaderParams.md) +- [Model.EncodeData](docs/EncodeData.md) +- [Model.EncodeDataType](docs/EncodeDataType.md) +- [Model.GenerateParams](docs/GenerateParams.md) +- [Model.GraphicsUnit](docs/GraphicsUnit.md) +- [Model.RecognitionImageKind](docs/RecognitionImageKind.md) +- [Model.RecognitionMode](docs/RecognitionMode.md) +- [Model.RecognizeBase64Request](docs/RecognizeBase64Request.md) - [Model.RegionPoint](docs/RegionPoint.md) -- [Model.ResultImageInfo](docs/ResultImageInfo.md) -- [Model.StorageExist](docs/StorageExist.md) -- [Model.StorageFile](docs/StorageFile.md) -- [Model.StructuredAppend](docs/StructuredAppend.md) -- [Model.TextAlignment](docs/TextAlignment.md) -- [Model.FileVersion](docs/FileVersion.md) +- [Model.ScanBase64Request](docs/ScanBase64Request.md) diff --git a/Tests/ApiExceptionTests.cs b/Tests/ApiExceptionTests.cs index aa4bfbe..157eaa7 100644 --- a/Tests/ApiExceptionTests.cs +++ b/Tests/ApiExceptionTests.cs @@ -1,6 +1,6 @@ using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using NUnit.Framework; namespace Aspose.BarCode.Cloud.Sdk.Tests @@ -14,21 +14,18 @@ public class ApiExceptionTests : TestsBase public void GetBarcodeGenerateAsyncTestThrows() { // Arrange - var api = new BarcodeApi(clientId: "client id", clientSecret: "client secret"); - var request = new GetBarcodeGenerateRequest( - text: "Very sample text", - type: EncodeBarcodeType.Code128.ToString() - ) - { - format = "png" - }; + GenerateApi api = new GenerateApi(clientId: "client id", clientSecret: "client secret"); // Acts - var ex = Assert.ThrowsAsync( - async () => { await api.GetBarcodeGenerateAsync(request); }); + ApiException ex = Assert.ThrowsAsync( + async () => + { + await api.GenerateAsync(data: "Very sample text", + barcodeType: EncodeBarcodeType.Code128, imageFormat: BarcodeImageFormat.Png); + }); Assert.AreEqual(400, ex!.ErrorCode); - Assert.AreEqual("Bad Request", ex.Message); + Assert.AreEqual("{\"error\":\"invalid_client\"}: ", ex.Message); } } } diff --git a/Tests/BarcodeApiTests.cs b/Tests/BarcodeApiTests.cs deleted file mode 100644 index e813c55..0000000 --- a/Tests/BarcodeApiTests.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Api; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; -using NUnit.Framework; - -namespace Aspose.BarCode.Cloud.Sdk.Tests -{ - /// - /// Class for testing BarcodeApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class BarcodeApiTests : TestsBase - { - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - _api = new BarcodeApi(TestConfiguration); - _fileApi = new FileApi(TestConfiguration); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - } - - private IBarcodeApi _api; - private IFileApi _fileApi; - - private async Task PutTestFileAsync(string fileName) - { - using FileStream fileToUpload = File.Open(TestFilePath(fileName), FileMode.Open, FileAccess.Read); - FilesUploadResult uploaded = await _fileApi.UploadFileAsync( - new UploadFileRequest( - $"{TempFolderPath}/{fileName}", - fileToUpload - ) - ); - Assert.IsNotEmpty(uploaded.Uploaded); - - return TempFolderPath; - } - - - /// - /// Test an instance of BarcodeApi - /// - [Test] - public void InstanceTest() - { - Assert.IsInstanceOf(typeof(IBarcodeApi), _api, "instance is a IBarcodeApi"); - } - - /// - /// Test GetBarcodeGenerateAsync - /// - [Test] - [Category("AsyncTests")] - public async Task GetBarcodeGenerateAsyncTest() - { - // Arrange - var request = new GetBarcodeGenerateRequest( - text: "Very sample text", - type: EncodeBarcodeType.Code128.ToString() - ) - { - format = "png" - }; - - // Act - using Stream response = await _api.GetBarcodeGenerateAsync(request); - // Assert - Assert.IsTrue(response.Length > 0); - using FileStream savedFileStream = File.Create(TestFilePath("Test_GetBarcodeGenerate.png")); - await response.CopyToAsync(savedFileStream); - } - - - /// - /// Test GetBarcodeRecognizeAsync - /// - [Test] - [Category("AsyncTests")] - public async Task GetBarcodeRecognizeAsyncTest() - { - // Arrange - const string fileName = "Test_PostGenerateMultiple.png"; - - var expectedBarcodes = new List - { - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.QR, - Text = "Hello world!" - }, - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.Code128, - Text = "Hello world!" - } - }; - - string folder = await PutTestFileAsync(fileName); - - // Act - BarcodeResponseList response = await _api.GetBarcodeRecognizeAsync( - new GetBarcodeRecognizeRequest( - fileName - ) - { - folder = folder, - Preset = PresetType.HighPerformance.ToString(), - Types = new List { DecodeBarcodeType.QR, DecodeBarcodeType.Code128 } - } - ); - - // Assert - Assert.AreEqual(expectedBarcodes.Count, response.Barcodes.Count); - - foreach ((GeneratorParams generated, BarcodeResponse recognized) in - expectedBarcodes.Zip(response.Barcodes, - (generated, recognized) => (generated, recognized))) - { - Assert.AreEqual(generated.TypeOfBarcode.ToString(), recognized.Type); - Assert.AreEqual(generated.Text, recognized.BarcodeValue); - } - } - - - /// - /// Test PostBarcodeRecognizeFromUrlOrContentAsync - /// - [Test] - [Category("AsyncTests")] - public async Task PostBarcodeRecognizeFromUrlOrContentAsyncTest() - { - // Arrange - using Stream image = GetTestImage("1.png"); - - // Act - BarcodeResponseList response = await _api.PostBarcodeRecognizeFromUrlOrContentAsync( - new PostBarcodeRecognizeFromUrlOrContentRequest(image) - { - ChecksumValidation = ChecksumValidation.Off.ToString(), - Preset = PresetType.HighPerformance.ToString(), - Types = new List { DecodeBarcodeType.Code11 } - } - ); - - // Assert - Assert.AreEqual(1, response.Barcodes.Count); - Assert.IsFalse(string.IsNullOrWhiteSpace(response.Barcodes[0].ToString()), - message: $"Empty BarcodeResponse.ToString()"); - Assert.AreEqual(DecodeBarcodeType.Code11.ToString(), response.Barcodes[0].Type); - Assert.AreEqual("1234567812", response.Barcodes[0].BarcodeValue); - } - - - /// - /// Test PostGenerateMultipleAsync - /// - [Test] - [Category("AsyncTests")] - public async Task PostGenerateMultipleAsyncTest() - { - // Arrange - var request = new PostGenerateMultipleRequest( - new GeneratorParamsList - { - BarcodeBuilders = new List - { - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.QR, - Text = "Hello world!" - }, - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.Code128, - Text = "Hello world!" - } - } - } - ); - - // Act - using Stream response = await _api.PostGenerateMultipleAsync(request); - - // Assert - Assert.IsTrue(response.Length > 0); - using FileStream savedFileStream = File.Create(TestFilePath("Test_PostGenerateMultiple.png")); - await response.CopyToAsync(savedFileStream); - } - - - /// - /// Test PutBarcodeGenerateFile - /// - [Test] - [Category("AsyncTests")] - public async Task PutBarcodeGenerateFileAsyncTest() - { - // Arrange - var request = new PutBarcodeGenerateFileRequest( - "Test_PutBarcodeGenerateFile.png", - type: EncodeBarcodeType.Code128.ToString(), - text: "Hello!" - ) - { - folder = TempFolderPath - }; - - // Act - ResultImageInfo response = await _api.PutBarcodeGenerateFileAsync(request); - - // Assert - Assert.True(response.FileSize > 0); - Assert.True(response.ImageWidth > 0); - Assert.True(response.ImageHeight > 0); - } - - - /// - /// Test PutBarcodeRecognizeFromBodyAsync - /// - [Test] - [Category("AsyncTests")] - public async Task PutBarcodeRecognizeFromBodyAsyncTest() - { - // Arrange - var barcodesToRecognize = new List - { - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.Code128, - Text = "Very sample text" - } - }; - - const string fileName = "Test_GetBarcodeGenerate.png"; - string folder = await PutTestFileAsync(fileName); - - // Act - BarcodeResponseList response = await _api.PutBarcodeRecognizeFromBodyAsync( - new PutBarcodeRecognizeFromBodyRequest( - fileName, - readerParams: new ReaderParams - { - Preset = PresetType.HighPerformance, - Types = new List { DecodeBarcodeType.Code128 } - } - ) - { - folder = folder - } - ); - - // Assert - Assert.AreEqual(barcodesToRecognize.Count, response.Barcodes.Count); - - foreach ((GeneratorParams generated, BarcodeResponse recognized) in - barcodesToRecognize.Zip(response.Barcodes, - (generated, recognized) => (generated, recognized))) - { - Assert.AreEqual(generated.TypeOfBarcode.ToString(), recognized.Type); - Assert.AreEqual(generated.Text, recognized.BarcodeValue); - } - } - - - /// - /// Test PutGenerateMultipleAsync - /// - [Test] - [Category("AsyncTests")] - public async Task PutGenerateMultipleAsyncTest() - { - // Arrange - var generatorParamsList = new GeneratorParamsList - { - BarcodeBuilders = new List - { - new GeneratorParams - { - TypeOfBarcode = EncodeBarcodeType.Code128, - Text = "Hello world!" - } - } - }; - - var request = new PutGenerateMultipleRequest( - "Test_PutGenerateMultiple.png", - generatorParamsList - ) - { - folder = TempFolderPath - }; - - // Act - ResultImageInfo response = await _api.PutGenerateMultipleAsync(request); - - // Assert - Assert.True(response.FileSize > 0); - Assert.True(response.ImageWidth > 0); - Assert.True(response.ImageHeight > 0); - } - } -} diff --git a/Tests/ConfigurationTests.cs b/Tests/ConfigurationTests.cs index 79366e2..3acfb52 100644 --- a/Tests/ConfigurationTests.cs +++ b/Tests/ConfigurationTests.cs @@ -18,12 +18,12 @@ public class ConfigurationTests [Test] public void CanChangeApiBaseUrl() { - var config = new Configuration + Configuration config = new Configuration { ApiBaseUrl = "http://localhost:47972" }; - Assert.AreEqual("http://localhost:47972/v3.0", config.GetApiRootUrl()); + Assert.AreEqual("http://localhost:47972/v4.0", config.GetApiRootUrl()); } @@ -31,7 +31,7 @@ public void CanChangeApiBaseUrl() public void CanChangeDefaultHeaders() { // ReSharper disable once UseObjectOrCollectionInitializer - var config = new Configuration(); + Configuration config = new Configuration(); config.DefaultHeaders["User-Agent"] = "Awesome SDK"; Assert.AreEqual("Awesome SDK", config.DefaultHeaders["User-Agent"]); @@ -41,7 +41,7 @@ public void CanChangeDefaultHeaders() [Test] public void CanSetAuthTypeAndTokenTest() { - var config = new Configuration + Configuration config = new Configuration { JwtToken = "Test JWT token" }; @@ -54,7 +54,7 @@ public void CanSetAuthTypeAndTokenTest() [Test] public void CanSetDebugMode() { - var config = new Configuration + Configuration config = new Configuration { DebugMode = true }; @@ -66,7 +66,7 @@ public void CanSetDebugMode() [Test] public void CanSetDefaultHeaders() { - var config = new Configuration + Configuration config = new Configuration { DefaultHeaders = _headers }; @@ -78,11 +78,11 @@ public void CanSetDefaultHeaders() [Test] public void DefaultParamsTest() { - var config = new Configuration(); + Configuration config = new Configuration(); Assert.AreEqual("https://api.aspose.cloud", config.ApiBaseUrl); - Assert.AreEqual("https://api.aspose.cloud/v3.0", config.GetApiRootUrl()); - Assert.AreEqual("https://api.aspose.cloud/connect/token", config.TokenUrl); + Assert.AreEqual("https://api.aspose.cloud/v4.0", config.GetApiRootUrl()); + Assert.AreEqual("https://id.aspose.cloud/connect/token", config.TokenUrl); Assert.AreEqual(false, config.DebugMode); } @@ -94,9 +94,9 @@ public void DeserializeTest() TestContext.CurrentContext.TestDirectory, "..", "..", "..", "Configuration.template.json")); - var serializer = new JsonSerializer(); - using var reader = new JsonTextReader(file); - var config = serializer.Deserialize(reader); + JsonSerializer serializer = new JsonSerializer(); + using JsonTextReader reader = new JsonTextReader(file); + Configuration config = serializer.Deserialize(reader); Assert.IsNotNull(config); Assert.AreEqual("Client Secret from https://dashboard.aspose.cloud/applications", config.ClientSecret); @@ -108,27 +108,27 @@ public void DeserializeTest() [Test] public void GetApiVersionTest() { - var config = new Configuration(); + Configuration config = new Configuration(); - Assert.AreEqual("3.0", config.ApiVersion); + Assert.AreEqual("4.0", config.ApiVersion); } [Test] public void SerializationTest() { - var config = new Configuration(); + Configuration config = new Configuration(); Assert.AreEqual( "{\"" + "ApiBaseUrl\":\"https://api.aspose.cloud\",\"" + - "TokenUrl\":\"https://api.aspose.cloud/connect/token\",\"" + + "TokenUrl\":\"https://id.aspose.cloud/connect/token\",\"" + "ClientSecret\":null,\"" + "ClientId\":null,\"" + "JwtToken\":null,\"" + "DebugMode\":false,\"" + "AuthType\":\"JWT\",\"" + - "ApiVersion\":\"3.0\",\"" + + "ApiVersion\":\"4.0\",\"" + "DefaultHeaders\":{}" + "}", JsonConvert.SerializeObject(config)); diff --git a/Tests/GenerateAndThenRecognize.cs b/Tests/GenerateAndThenRecognize.cs index b0fe719..5344fda 100644 --- a/Tests/GenerateAndThenRecognize.cs +++ b/Tests/GenerateAndThenRecognize.cs @@ -5,7 +5,7 @@ using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using NUnit.Framework; namespace Aspose.BarCode.Cloud.Sdk.Tests @@ -16,28 +16,20 @@ public class GenerateAndThenRecognize : TestsBase [SetUp] public void Init() { - _api = new BarcodeApi(TestConfiguration); + _generateApi = new GenerateApi(TestConfiguration); + _scanApi = new ScanApi(TestConfiguration); } - private IBarcodeApi _api; + private IGenerateApi _generateApi; + private IScanApi _scanApi; [Test] [Category("AsyncTests")] public async Task GenerateAndThenRecognizeAsyncTest() { - Stream generatedImage = await _api.GetBarcodeGenerateAsync(new GetBarcodeGenerateRequest( - EncodeBarcodeType.QR.ToString(), "Test")); + Stream generatedImage = await _generateApi.GenerateAsync(EncodeBarcodeType.QR, "Test"); - BarcodeResponseList recognized = await _api.PostBarcodeRecognizeFromUrlOrContentAsync( - new PostBarcodeRecognizeFromUrlOrContentRequest(generatedImage) - { - Preset = PresetType.HighPerformance.ToString(), - Types = new List - { - DecodeBarcodeType.QR - } - } - ); + BarcodeResponseList recognized = await _scanApi.ScanMultipartAsync(generatedImage); Assert.AreEqual(1, recognized.Barcodes.Count); Assert.AreEqual(DecodeBarcodeType.QR.ToString(), recognized.Barcodes.First().Type); @@ -46,7 +38,7 @@ public async Task GenerateAndThenRecognizeAsyncTest() "{\"barcodes\":[{" + "\"barcodeValue\":\"Test\"," + "\"type\":\"QR\"," + - "\"region\":[{\"x\":7,\"y\":7},{\"x\":49,\"y\":6},{\"x\":48,\"y\":48},{\"x\":6,\"y\":49}]}]}", + "\"region\":[{\"x\":7,\"y\":7},{\"x\":49,\"y\":6},{\"x\":48,\"y\":48},{\"x\":6,\"y\":49}],\"checksum\":null}]}", recognized.ToString() ); } diff --git a/Tests/GenerateTests.cs b/Tests/GenerateTests.cs new file mode 100644 index 0000000..5020dcb --- /dev/null +++ b/Tests/GenerateTests.cs @@ -0,0 +1,74 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using NUnit.Framework; + +namespace Aspose.BarCode.Cloud.Sdk.Tests +{ + [TestFixture] + public class GenerateTests : TestsBase + { + private IGenerateApi _api; + + [SetUp] + public void Init() + { + _api = new GenerateApi(TestConfiguration); + } + + [Test] + public async Task TestBarcodeGenerateBarcodeTypeGet() + { + + Stream response = await _api.GenerateAsync(EncodeBarcodeType.Code128, "Hello!"); + + long contentLength = response.Length; + Assert.True(contentLength > 0, "Content length is zero or negative"); + } + + [Test] + public async Task TestBarcodeGenerateBodyPost() + { + // Test case for barcode_generate_body_post + // Generate barcode from params in body + BarcodeImageParams imageParams = new BarcodeImageParams + { + ImageFormat = BarcodeImageFormat.Jpeg + }; + + EncodeData encodeData = new EncodeData() + { + Data = "VGVzdA==", + DataType = EncodeDataType.Base64Bytes + }; + + GenerateParams generatorParams = new GenerateParams() + { + BarcodeType = EncodeBarcodeType.QR, + EncodeData = encodeData, + BarcodeImageParams = imageParams + }; + + + Stream response = await _api.GenerateBodyAsync(generatorParams); + + long contentLength = response.Length; + Assert.True(contentLength > 0, "Content length is zero or negative"); + } + + [Test] + public async Task TestBarcodeGenerateMultipartPost() + { + + Stream response = await _api.GenerateMultipartAsync(EncodeBarcodeType.QR, "54657374", dataType: EncodeDataType.HexBytes); + + long contentLength = response.Length; + Assert.True(contentLength > 0, "Content length is zero or negative"); + } + + } +} diff --git a/Tests/JWTRequestHandlerTests.cs b/Tests/JWTRequestHandlerTests.cs index a24e634..841ed27 100644 --- a/Tests/JWTRequestHandlerTests.cs +++ b/Tests/JWTRequestHandlerTests.cs @@ -40,7 +40,7 @@ public void TestTokenFetched() } // arrange - var jwtHandler = new JwtRequestHandler(TestConfiguration); + JwtRequestHandler jwtHandler = new JwtRequestHandler(TestConfiguration); jwtHandler.Preparing(); // act @@ -67,10 +67,10 @@ public void TestTokenRefresh() // arrange WebRequest unauthorizedRequest = _requestFactory.Object.Create("http://some url/"); unauthorizedRequest.Method = WebRequestMethods.Http.Get; - var response401 = (HttpWebResponse)unauthorizedRequest.GetResponse(); + HttpWebResponse response401 = (HttpWebResponse)unauthorizedRequest.GetResponse(); Assert.AreEqual(HttpStatusCode.Unauthorized, response401.StatusCode); - var jwtHandler = new JwtRequestHandler(TestConfiguration); + JwtRequestHandler jwtHandler = new JwtRequestHandler(TestConfiguration); // act Assert.Throws( @@ -100,16 +100,16 @@ public async Task TestTokenFetchedAsync() } // arrange - var jwtHandler = new JwtRequestHandler(TestConfiguration); + JwtRequestHandler jwtHandler = new JwtRequestHandler(TestConfiguration); await jwtHandler.PreparingAsync(); // act - var request = new HttpRequestMessage(); + HttpRequestMessage request = new HttpRequestMessage(); await jwtHandler.BeforeSendAsync(request); // assert Assert.IsTrue(request.Headers.Contains("Authorization")); - var auth = request.Headers.Authorization.ToString(); + string auth = request.Headers.Authorization.ToString(); Assert.Greater(auth.Length, "Bearer ".Length); string token = auth.Substring("Bearer ".Length); AssertTokenIsValid(token); @@ -125,9 +125,9 @@ public async Task TestTokenRefreshAsync() } // arrange - var response401 = new HttpResponseMessage(HttpStatusCode.Unauthorized); + HttpResponseMessage response401 = new HttpResponseMessage(HttpStatusCode.Unauthorized); - var jwtHandler = new JwtRequestHandler(TestConfiguration); + JwtRequestHandler jwtHandler = new JwtRequestHandler(TestConfiguration); // act Assert.ThrowsAsync( @@ -139,12 +139,12 @@ public async Task TestTokenRefreshAsync() }); // arrange - var request2 = new HttpRequestMessage(); + HttpRequestMessage request2 = new HttpRequestMessage(); await jwtHandler.BeforeSendAsync(request2); // assert Assert.IsTrue(request2.Headers.Contains("Authorization")); - var auth = request2.Headers.Authorization.ToString(); + string auth = request2.Headers.Authorization.ToString(); Assert.Greater(auth.Length, "Bearer ".Length); string token = auth.Substring("Bearer ".Length); AssertTokenIsValid(token); @@ -152,14 +152,14 @@ public async Task TestTokenRefreshAsync() private static Mock RequestFactoryMock() { - var responseMock = new Mock(); + Mock responseMock = new Mock(); responseMock.Setup(c => c.StatusCode).Returns(HttpStatusCode.Unauthorized); - var requestMock = new Mock(); + Mock requestMock = new Mock(); requestMock.Setup(c => c.GetResponse()).Returns(responseMock.Object); requestMock.Setup(c => c.Headers).Returns(new WebHeaderCollection()); - var requestFactory = new Mock(); + Mock requestFactory = new Mock(); requestFactory.Setup(c => c.Create(It.IsAny())) .Returns(requestMock.Object); return requestFactory; @@ -167,7 +167,7 @@ private static Mock RequestFactoryMock() private static void AssertTokenIsValid(string token) { - var firstPartBeforeDot = new string(token.TakeWhile(c => c != '.').ToArray()); + string firstPartBeforeDot = new string(token.TakeWhile(c => c != '.').ToArray()); byte[] tokenBytes = Convert.FromBase64String(firstPartBeforeDot); JObject tokenHeader = JObject.Parse(Encoding.UTF8.GetString(tokenBytes)); diff --git a/Tests/JwtAuthTests.cs b/Tests/JwtAuthTests.cs index dd1d96c..37863cc 100644 --- a/Tests/JwtAuthTests.cs +++ b/Tests/JwtAuthTests.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using Newtonsoft.Json.Linq; using NUnit.Framework; @@ -16,7 +16,7 @@ public class JwtAuthTests : TestsBase { private async Task FetchToken() { - var formParams = new Dictionary + Dictionary formParams = new Dictionary { ["grant_type"] = "client_credentials", // ReSharper disable once RedundantToStringCall @@ -24,11 +24,11 @@ private async Task FetchToken() // ReSharper disable once RedundantToStringCall ["client_secret"] = TestConfiguration.ClientSecret.ToString() }; - var formContent = new FormUrlEncodedContent(formParams); + FormUrlEncodedContent formContent = new FormUrlEncodedContent(formParams); HttpResponseMessage response = await new HttpClient().PostAsync(TestConfiguration.TokenUrl, formContent); response.EnsureSuccessStatusCode(); JObject json = JObject.Parse(await response.Content.ReadAsStringAsync()); - var accessToken = Convert.ToString(json["access_token"]); + string accessToken = Convert.ToString(json["access_token"]); return accessToken; } @@ -40,18 +40,15 @@ public async Task CanUseExternalTokenWithAsync() Assert.Ignore($"Unsupported TestConfiguration.AuthType={TestConfiguration.AuthType}"); } - var configWithToken = new Configuration + Configuration configWithToken = new Configuration { ApiBaseUrl = TestConfiguration.ApiBaseUrl, TokenUrl = TestConfiguration.TokenUrl, JwtToken = await FetchToken() }; - var api = new BarcodeApi(configWithToken); - using Stream generated = await api.GetBarcodeGenerateAsync( - new GetBarcodeGenerateRequest( - EncodeBarcodeType.QR.ToString(), "Test") - ); + GenerateApi api = new GenerateApi(configWithToken); + using Stream generated = await api.GenerateAsync(EncodeBarcodeType.QR, "Test"); Assert.Greater(generated.Length, 0); } } diff --git a/Tests/RecognizeTests.cs b/Tests/RecognizeTests.cs index 40779e4..0a1918f 100644 --- a/Tests/RecognizeTests.cs +++ b/Tests/RecognizeTests.cs @@ -1,10 +1,10 @@ +using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; using NUnit.Framework; namespace Aspose.BarCode.Cloud.Sdk.Tests @@ -12,12 +12,12 @@ namespace Aspose.BarCode.Cloud.Sdk.Tests [TestFixture] public class RecognizeTests : TestsBase { - private IBarcodeApi _api; + private IRecognizeApi _api; [SetUp] public void Init() { - _api = new BarcodeApi(TestConfiguration); + _api = new RecognizeApi(TestConfiguration); } [TearDown] @@ -26,18 +26,24 @@ public void Cleanup() } [Test] - public async Task RecognizeQrAsyncTest() + public async Task RecognizeBase64AsyncTest() { // Arrange using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); + byte[] buffer = new byte[image.Length]; + await image.ReadAsync(buffer, 0, buffer.Length); + // Act - BarcodeResponseList response = await _api.PostBarcodeRecognizeFromUrlOrContentAsync( - new PostBarcodeRecognizeFromUrlOrContentRequest(image) + BarcodeResponseList response = await _api.RecognizeBase64Async( + new RecognizeBase64Request() { - Preset = PresetType.HighPerformance.ToString(), - Types = new List { DecodeBarcodeType.QR } + RecognitionImageKind = RecognitionImageKind.ClearImage, + RecognitionMode = RecognitionMode.Normal, + BarcodeTypes = new List { DecodeBarcodeType.QR }, + FileBase64 = Convert.ToBase64String(buffer) } + ); // Assert @@ -46,27 +52,39 @@ public async Task RecognizeQrAsyncTest() Assert.AreEqual("Hello world!", response.Barcodes[0].BarcodeValue); } + [Test] + public async Task RecognizeMultipartAsyncTest() + { + // Arrange + using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); + + // Act + BarcodeResponseList response = await _api.RecognizeMultipartAsync(DecodeBarcodeType.QR, image, + recognitionImageKind: RecognitionImageKind.ClearImage, recognitionMode: RecognitionMode.Normal); + + // Assert + Assert.AreEqual(1, response.Barcodes.Count); + Assert.AreEqual(DecodeBarcodeType.QR.ToString(), response.Barcodes[0].Type); + Assert.AreEqual("Hello world!", response.Barcodes[0].BarcodeValue); + } [Test] - public void RecognizeWithTimeoutAsyncTest() + public async Task RecognizeAsyncTest() { // Arrange using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); // Act - var apiException = Assert.ThrowsAsync(async () => - { - await _api.PostBarcodeRecognizeFromUrlOrContentAsync( - new PostBarcodeRecognizeFromUrlOrContentRequest(image) - { - Timeout = 1 - } - ); - }); + BarcodeResponseList response = await _api.RecognizeAsync(DecodeBarcodeType.QR, + "https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png", + recognitionImageKind: RecognitionImageKind.ClearImage, + recognitionMode: RecognitionMode.Normal); // Assert - Assert.IsNotNull(apiException); - Assert.AreEqual(408, apiException.ErrorCode); + Assert.AreEqual(1, response.Barcodes.Count); + Assert.AreEqual(DecodeBarcodeType.QR.ToString(), response.Barcodes[0].Type); + Assert.AreEqual("http://en.m.wikipedia.org", response.Barcodes[0].BarcodeValue); } + } } diff --git a/Tests/ScanTests.cs b/Tests/ScanTests.cs index edb43c6..418a30c 100644 --- a/Tests/ScanTests.cs +++ b/Tests/ScanTests.cs @@ -1,10 +1,10 @@ -using System.Collections.Generic; +using System; using System.IO; using System.Threading.Tasks; using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using NUnit.Framework; namespace Aspose.BarCode.Cloud.Sdk.Tests @@ -12,27 +12,30 @@ namespace Aspose.BarCode.Cloud.Sdk.Tests [TestFixture] public class ScanTests : TestsBase { - private IBarcodeApi _api; + private IScanApi _api; [SetUp] public void Init() { - _api = new BarcodeApi(TestConfiguration); + _api = new ScanApi(TestConfiguration); } [Test] - public async Task ScanBarcodeAsyncTest() + public async Task ScanBase64AsyncTest() { // Arrange using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); + byte[] buffer = new byte[image.Length]; + + await image.ReadAsync(buffer, 0, buffer.Length); // Act - BarcodeResponseList response = await _api.ScanBarcodeAsync( - new ScanBarcodeRequest(image) - { - decodeTypes = new List { DecodeBarcodeType.Code128, DecodeBarcodeType.QR } - } + BarcodeResponseList response = await _api.ScanBase64Async( + new ScanBase64Request() + { + FileBase64 = Convert.ToBase64String(buffer) + } ); // Assert @@ -41,49 +44,32 @@ public async Task ScanBarcodeAsyncTest() Assert.AreEqual("Hello world!", response.Barcodes[0].BarcodeValue); } - [Test] - public void ScanBarcodeAsyncTimeoutTest() + public async Task ScanAsyncTest() { - // Arrange - using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); - // Act - var apiException = Assert.ThrowsAsync(async () => - { - await _api.ScanBarcodeAsync( - new ScanBarcodeRequest(image) - { - timeout = 1 - } - ); - }); + BarcodeResponseList response = await _api.ScanAsync("https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png"); // Assert - Assert.IsNotNull(apiException); - Assert.AreEqual(408, apiException.ErrorCode); + Assert.AreEqual(1, response.Barcodes.Count); + Assert.AreEqual(DecodeBarcodeType.QR.ToString(), response.Barcodes[0].Type); + Assert.AreEqual("http://en.m.wikipedia.org", response.Barcodes[0].BarcodeValue); } - [Test] - public async Task ScanCode39Test() + public async Task ScanMultipartAsyncTest() { // Arrange - using Stream image = GetTestImage("Code39.jpg"); + using Stream image = GetTestImage("Test_PostGenerateMultiple.png"); // Act - BarcodeResponseList response = await _api.ScanBarcodeAsync( - new ScanBarcodeRequest(image) - { - decodeTypes = new List { DecodeBarcodeType.Code39Extended }, - checksumValidation = ChecksumValidation.Off.ToString(), - } - ); + BarcodeResponseList response = await _api.ScanMultipartAsync(image); // Assert - Assert.AreEqual(1, response.Barcodes.Count); - Assert.AreEqual(DecodeBarcodeType.Code39Extended.ToString(), response.Barcodes[0].Type); - Assert.AreEqual("8M93", response.Barcodes[0].BarcodeValue); + Assert.AreEqual(2, response.Barcodes.Count); + Assert.AreEqual(DecodeBarcodeType.QR.ToString(), response.Barcodes[0].Type); + Assert.AreEqual("Hello world!", response.Barcodes[0].BarcodeValue); } + } } diff --git a/Tests/TestsBase.cs b/Tests/TestsBase.cs index 0bcf17a..e495f60 100644 --- a/Tests/TestsBase.cs +++ b/Tests/TestsBase.cs @@ -37,8 +37,8 @@ private static Configuration LoadTestConfiguration() if (File.Exists(configFilename)) { using StreamReader file = File.OpenText(configFilename); - using var reader = new JsonTextReader(file); - var serializer = new JsonSerializer(); + using JsonTextReader reader = new JsonTextReader(file); + JsonSerializer serializer = new JsonSerializer(); return serializer.Deserialize(reader); } @@ -59,7 +59,7 @@ private static Configuration LoadFromEnv() } string name = i.Key; - var envName = $"{ENV_NAME_PREFIX}{CamelCaseToUpper(name)}"; + string envName = $"{ENV_NAME_PREFIX}{CamelCaseToUpper(name)}"; string envValue = Environment.GetEnvironmentVariable(envName); if (!string.IsNullOrEmpty(envValue)) { @@ -72,8 +72,8 @@ private static Configuration LoadFromEnv() private static string CamelCaseToUpper(string name) { - var result = new StringBuilder(); - var prevCharWasLower = false; + StringBuilder result = new StringBuilder(); + bool prevCharWasLower = false; foreach (char c in name) { if (char.IsUpper(c)) diff --git a/Tests/test_data/Code128.jpeg b/Tests/test_data/Code128.jpeg new file mode 100644 index 0000000..4e7013c Binary files /dev/null and b/Tests/test_data/Code128.jpeg differ diff --git a/Tests/test_data/Code128.png b/Tests/test_data/Code128.png new file mode 100644 index 0000000..4e7013c Binary files /dev/null and b/Tests/test_data/Code128.png differ diff --git a/Tests/test_data/Code39.jpeg b/Tests/test_data/Code39.jpeg new file mode 100644 index 0000000..c5a4b3c Binary files /dev/null and b/Tests/test_data/Code39.jpeg differ diff --git a/Tests/test_data/Code39.png b/Tests/test_data/Code39.png new file mode 100644 index 0000000..1419490 Binary files /dev/null and b/Tests/test_data/Code39.png differ diff --git a/Tests/test_data/ManyTypes.png b/Tests/test_data/ManyTypes.png new file mode 100644 index 0000000..c305181 Binary files /dev/null and b/Tests/test_data/ManyTypes.png differ diff --git a/Tests/test_data/Pdf417.png b/Tests/test_data/Pdf417.png new file mode 100644 index 0000000..603813a Binary files /dev/null and b/Tests/test_data/Pdf417.png differ diff --git a/Tests/test_data/Pdf417.svg b/Tests/test_data/Pdf417.svg new file mode 100644 index 0000000..cc39c28 --- /dev/null +++ b/Tests/test_data/Pdf417.svg @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/test_data/aztec.png b/Tests/test_data/aztec.png new file mode 100644 index 0000000..4ed7a80 Binary files /dev/null and b/Tests/test_data/aztec.png differ diff --git a/Tests/test_data/qr.png b/Tests/test_data/qr.png new file mode 100644 index 0000000..c04b484 Binary files /dev/null and b/Tests/test_data/qr.png differ diff --git a/docs/ApiError.md b/docs/ApiError.md index 1522dd1..6c957f8 100644 --- a/docs/ApiError.md +++ b/docs/ApiError.md @@ -1,11 +1,13 @@ # Aspose.BarCode.Cloud.Sdk.Model.ApiError +Api Error. + ## Properties Name | Type | Description | Notes ---- | ---- | ----------- | ----- -**Code** | **string** | | [optional] -**Message** | **string** | | [optional] -**Description** | **string** | | [optional] -**DateTime** | **DateTime?** | | [optional] +**Code** | **string** | Gets or sets api error code. | +**Message** | **string** | Gets or sets error message. | +**Description** | **string** | Gets or sets error description. | [optional] +**DateTime** | **DateTime?** | Gets or sets server datetime. | [optional] **InnerError** | [**ApiError**](ApiError.md) | | [optional] diff --git a/docs/ApiErrorResponse.md b/docs/ApiErrorResponse.md index e881fa8..2f80b6e 100644 --- a/docs/ApiErrorResponse.md +++ b/docs/ApiErrorResponse.md @@ -1,8 +1,10 @@ # Aspose.BarCode.Cloud.Sdk.Model.ApiErrorResponse +ApiError Response + ## Properties Name | Type | Description | Notes ---- | ---- | ----------- | ----- -**RequestId** | **string** | | [optional] -**Error** | [**ApiError**](ApiError.md) | | [optional] +**RequestId** | **string** | Gets or sets request Id. | +**Error** | [**ApiError**](ApiError.md) | | diff --git a/docs/AustralianPostParams.md b/docs/AustralianPostParams.md deleted file mode 100644 index e606951..0000000 --- a/docs/AustralianPostParams.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AustralianPostParams - -AustralianPost barcode parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**EncodingTable** | **CustomerInformationInterpretingType** | Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other | [optional] -**ShortBarHeight** | **double?** | Short bar's height of AustralianPost barcode. | [optional] diff --git a/docs/AutoSizeMode.md b/docs/AutoSizeMode.md deleted file mode 100644 index 3a1aebd..0000000 --- a/docs/AutoSizeMode.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AutoSizeMode - -## Allowable values - -* **None** -* Nearest -* Interpolation diff --git a/docs/AvailableGraphicsUnit.md b/docs/AvailableGraphicsUnit.md deleted file mode 100644 index 7ebe4a5..0000000 --- a/docs/AvailableGraphicsUnit.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AvailableGraphicsUnit - -Subset of GraphicsUnit. - -## Allowable values - -* **Pixel** -* Point -* Inch -* Millimeter diff --git a/docs/AztecEncodeMode.md b/docs/AztecEncodeMode.md deleted file mode 100644 index 1135e5e..0000000 --- a/docs/AztecEncodeMode.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AztecEncodeMode - -## Allowable values - -* **Auto** -* Bytes -* ExtendedCodetext diff --git a/docs/AztecParams.md b/docs/AztecParams.md deleted file mode 100644 index fee4e99..0000000 --- a/docs/AztecParams.md +++ /dev/null @@ -1,16 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AztecParams - -Aztec parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**ErrorLevel** | **int?** | Level of error correction of Aztec types of barcode. Value should between 10 to 95. | [optional] -**SymbolMode** | **AztecSymbolMode** | Aztec Symbol mode. Default value: AztecSymbolMode.Auto. | [optional] -**TextEncoding** | **string** | DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. | [optional] -**EncodeMode** | **AztecEncodeMode** | Encoding mode for Aztec barcodes. Default value: Auto | [optional] -**ECIEncoding** | **ECIEncodings** | Identifies ECI encoding. Used when AztecEncodeMode is Auto. Default value: ISO-8859-1. | [optional] -**IsReaderInitialization** | **bool?** | Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization. | [optional] -**LayersCount** | **int?** | Gets or sets layers count of Aztec symbol. Layers count should be in range from 1 to 3 for Compact mode and in range from 1 to 32 for Full Range mode. Default value: 0 (auto). | [optional] diff --git a/docs/AztecSymbolMode.md b/docs/AztecSymbolMode.md deleted file mode 100644 index 1b9877f..0000000 --- a/docs/AztecSymbolMode.md +++ /dev/null @@ -1,8 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.AztecSymbolMode - -## Allowable values - -* **Auto** -* Compact -* FullRange -* Rune diff --git a/docs/BarcodeApi.md b/docs/BarcodeApi.md deleted file mode 100644 index a4aa42d..0000000 --- a/docs/BarcodeApi.md +++ /dev/null @@ -1,365 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Api.BarcodeApi - -All URIs are relative to ** - -Method | HTTP request | Description ------- | ------------ | ----------- -[**GetBarcodeGenerate**](BarcodeApi.md#getbarcodegenerate) | **GET** /barcode/generate | Generate barcode. -[**GetBarcodeRecognize**](BarcodeApi.md#getbarcoderecognize) | **GET** /barcode/{name}/recognize | Recognize barcode from a file on server. -[**PostBarcodeRecognizeFromUrlOrContent**](BarcodeApi.md#postbarcoderecognizefromurlorcontent) | **POST** /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field. -[**PostGenerateMultiple**](BarcodeApi.md#postgeneratemultiple) | **POST** /barcode/generateMultiple | Generate multiple barcodes and return in response stream -[**PutBarcodeGenerateFile**](BarcodeApi.md#putbarcodegeneratefile) | **PUT** /barcode/{name}/generate | Generate barcode and save on server (from query params or from file with json or xml content) -[**PutBarcodeRecognizeFromBody**](BarcodeApi.md#putbarcoderecognizefrombody) | **PUT** /barcode/{name}/recognize | Recognition of a barcode from file on server with parameters in body. -[**PutGenerateMultiple**](BarcodeApi.md#putgeneratemultiple) | **PUT** /barcode/{name}/generateMultiple | Generate image with multiple barcodes and put new file on server -[**ScanBarcode**](BarcodeApi.md#scanbarcode) | **POST** /barcode/scan | Quickly scan a barcode from an image. - - -## **GetBarcodeGenerate** - -```csharp -System.IO.Stream GetBarcodeGenerate (string type, string text, string twoDDisplayText = null, string textLocation = null, string textAlignment = null, string textColor = null, bool? noWrap = null, double? resolution = null, double? resolutionX = null, double? resolutionY = null, double? dimensionX = null, double? textSpace = null, string units = null, string sizeMode = null, double? barHeight = null, double? imageHeight = null, double? imageWidth = null, double? rotationAngle = null, string backColor = null, string barColor = null, string borderColor = null, double? borderWidth = null, string borderDashStyle = null, bool? borderVisible = null, string enableChecksum = null, bool? enableEscape = null, bool? filledBars = null, bool? alwaysShowChecksum = null, double? wideNarrowRatio = null, bool? validateText = null, string supplementData = null, double? supplementSpace = null, double? barWidthReduction = null, bool? useAntiAlias = null, string format = null) -``` - -Generate barcode. - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **type** | **string**| Type of barcode to generate. | - **text** | **string**| Text to encode. | - **twoDDisplayText** | **string**| Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] - **textLocation** | **string**| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] - **textAlignment** | **string**| Text alignment. | [optional] - **textColor** | **string**| Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **noWrap** | **bool?**| Specify word wraps (line breaks) within text. Default value: false. | [optional] - **resolution** | **double?**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. | [optional] - **resolutionX** | **double?**| DEPRECATED: Use 'Resolution' instead. | [optional] - **resolutionY** | **double?**| DEPRECATED: Use 'Resolution' instead. | [optional] - **dimensionX** | **double?**| The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. | [optional] - **textSpace** | **double?**| Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. | [optional] - **units** | **string**| Common Units for all measuring in query. Default units: pixel. | [optional] - **sizeMode** | **string**| Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. | [optional] - **barHeight** | **double?**| Height of the barcode in given units. Default units: pixel. | [optional] - **imageHeight** | **double?**| Height of the barcode image in given units. Default units: pixel. | [optional] - **imageWidth** | **double?**| Width of the barcode image in given units. Default units: pixel. | [optional] - **rotationAngle** | **double?**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] - **backColor** | **string**| Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **barColor** | **string**| Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **borderColor** | **string**| Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **borderWidth** | **double?**| Border width. Default value: 0. Ignored if Visible is set to false. | [optional] - **borderDashStyle** | **string**| Border dash style. Default value: BorderDashStyle.Solid. | [optional] - **borderVisible** | **bool?**| Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] - **enableChecksum** | **string**| Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology | [optional] - **enableEscape** | **bool?**| Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. | [optional] - **filledBars** | **bool?**| Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. | [optional] - **alwaysShowChecksum** | **bool?**| Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. | [optional] - **wideNarrowRatio** | **double?**| Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard | [optional] - **validateText** | **bool?**| Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. | [optional] - **supplementData** | **string**| Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. | [optional] - **supplementSpace** | **double?**| Space between main the BarCode and supplement BarCode. | [optional] - **barWidthReduction** | **double?**| Bars reduction value that is used to compensate ink spread while printing. | [optional] - **useAntiAlias** | **bool?**| Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. | [optional] - **format** | **string**| Result image format. | [optional] - -### Return type - -System.IO.Stream - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: image/png, image/bmp, image/gif, image/jpeg, image/svg+xml, image/tiff - - -## **GetBarcodeRecognize** - -```csharp -BarcodeResponseList GetBarcodeRecognize (string name, string type = null, List types = null, string checksumValidation = null, bool? detectEncoding = null, string preset = null, int? rectX = null, int? rectY = null, int? rectWidth = null, int? rectHeight = null, bool? stripFNC = null, int? timeout = null, int? medianSmoothingWindowSize = null, bool? allowMedianSmoothing = null, bool? allowComplexBackground = null, bool? allowDatamatrixIndustrialBarcodes = null, bool? allowDecreasedImage = null, bool? allowDetectScanGap = null, bool? allowIncorrectBarcodes = null, bool? allowInvertImage = null, bool? allowMicroWhiteSpotsRemoving = null, bool? allowOneDFastBarcodesDetector = null, bool? allowOneDWipedBarsRestoration = null, bool? allowQRMicroQrRestoration = null, bool? allowRegularImage = null, bool? allowSaltAndPepperFiltering = null, bool? allowWhiteSpotsRemoving = null, bool? checkMore1DVariants = null, bool? fastScanOnly = null, bool? allowAdditionalRestorations = null, double? regionLikelihoodThresholdPercent = null, List scanWindowSizes = null, double? similarity = null, bool? skipDiagonalSearch = null, bool? readTinyBarcodes = null, string australianPostEncodingTable = null, bool? ignoreEndingFillingPatternsForCTable = null, string storage = null, string folder = null) -``` - -Recognize barcode from a file on server. - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **name** | **string**| The image file name. | - **type** | **string**| The type of barcode to read. | [optional] - **types** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md)| Multiple barcode types to read. | [optional] - **checksumValidation** | **string**| Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional] - **detectEncoding** | **bool?**| A flag which force engine to detect codetext encoding for Unicode. | [optional] - **preset** | **string**| Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional] - **rectX** | **int?**| Set X of top left corner of area for recognition. | [optional] - **rectY** | **int?**| Set Y of top left corner of area for recognition. | [optional] - **rectWidth** | **int?**| Set Width of area for recognition. | [optional] - **rectHeight** | **int?**| Set Height of area for recognition. | [optional] - **stripFNC** | **bool?**| Value indicating whether FNC symbol strip must be done. | [optional] - **timeout** | **int?**| Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. | [optional] - **medianSmoothingWindowSize** | **int?**| Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. | [optional] - **allowMedianSmoothing** | **bool?**| Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. | [optional] - **allowComplexBackground** | **bool?**| Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. | [optional] - **allowDatamatrixIndustrialBarcodes** | **bool?**| Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. | [optional] - **allowDecreasedImage** | **bool?**| Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. | [optional] - **allowDetectScanGap** | **bool?**| Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. | [optional] - **allowIncorrectBarcodes** | **bool?**| Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. | [optional] - **allowInvertImage** | **bool?**| Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. | [optional] - **allowMicroWhiteSpotsRemoving** | **bool?**| Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. | [optional] - **allowOneDFastBarcodesDetector** | **bool?**| Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. | [optional] - **allowOneDWipedBarsRestoration** | **bool?**| Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. | [optional] - **allowQRMicroQrRestoration** | **bool?**| Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. | [optional] - **allowRegularImage** | **bool?**| Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. | [optional] - **allowSaltAndPepperFiltering** | **bool?**| Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. | [optional] - **allowWhiteSpotsRemoving** | **bool?**| Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional] - **checkMore1DVariants** | **bool?**| Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional] - **fastScanOnly** | **bool?**| Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional] - **allowAdditionalRestorations** | **bool?**| Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional] - **regionLikelihoodThresholdPercent** | **double?**| Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional] - **scanWindowSizes** | [**List<int?>**](int?.md)| Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional] - **similarity** | **double?**| Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional] - **skipDiagonalSearch** | **bool?**| Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. | [optional] - **readTinyBarcodes** | **bool?**| Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. | [optional] - **australianPostEncodingTable** | **string**| Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. | [optional] - **ignoreEndingFillingPatternsForCTable** | **bool?**| The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". | [optional] - **storage** | **string**| The image storage. | [optional] - **folder** | **string**| The image folder. | [optional] - -### Return type - -[**BarcodeResponseList**](BarcodeResponseList.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **PostBarcodeRecognizeFromUrlOrContent** - -```csharp -BarcodeResponseList PostBarcodeRecognizeFromUrlOrContent (string type = null, List types = null, string checksumValidation = null, bool? detectEncoding = null, string preset = null, int? rectX = null, int? rectY = null, int? rectWidth = null, int? rectHeight = null, bool? stripFNC = null, int? timeout = null, int? medianSmoothingWindowSize = null, bool? allowMedianSmoothing = null, bool? allowComplexBackground = null, bool? allowDatamatrixIndustrialBarcodes = null, bool? allowDecreasedImage = null, bool? allowDetectScanGap = null, bool? allowIncorrectBarcodes = null, bool? allowInvertImage = null, bool? allowMicroWhiteSpotsRemoving = null, bool? allowOneDFastBarcodesDetector = null, bool? allowOneDWipedBarsRestoration = null, bool? allowQRMicroQrRestoration = null, bool? allowRegularImage = null, bool? allowSaltAndPepperFiltering = null, bool? allowWhiteSpotsRemoving = null, bool? checkMore1DVariants = null, bool? fastScanOnly = null, bool? allowAdditionalRestorations = null, double? regionLikelihoodThresholdPercent = null, List scanWindowSizes = null, double? similarity = null, bool? skipDiagonalSearch = null, bool? readTinyBarcodes = null, string australianPostEncodingTable = null, bool? ignoreEndingFillingPatternsForCTable = null, string url = null, System.IO.Stream image = null) -``` - -Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field. - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **type** | **string**| The type of barcode to read. | [optional] - **types** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md)| Multiple barcode types to read. | [optional] - **checksumValidation** | **string**| Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional] - **detectEncoding** | **bool?**| A flag which force engine to detect codetext encoding for Unicode. | [optional] - **preset** | **string**| Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional] - **rectX** | **int?**| Set X of top left corner of area for recognition. | [optional] - **rectY** | **int?**| Set Y of top left corner of area for recognition. | [optional] - **rectWidth** | **int?**| Set Width of area for recognition. | [optional] - **rectHeight** | **int?**| Set Height of area for recognition. | [optional] - **stripFNC** | **bool?**| Value indicating whether FNC symbol strip must be done. | [optional] - **timeout** | **int?**| Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. | [optional] - **medianSmoothingWindowSize** | **int?**| Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. | [optional] - **allowMedianSmoothing** | **bool?**| Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. | [optional] - **allowComplexBackground** | **bool?**| Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. | [optional] - **allowDatamatrixIndustrialBarcodes** | **bool?**| Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. | [optional] - **allowDecreasedImage** | **bool?**| Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. | [optional] - **allowDetectScanGap** | **bool?**| Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. | [optional] - **allowIncorrectBarcodes** | **bool?**| Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. | [optional] - **allowInvertImage** | **bool?**| Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. | [optional] - **allowMicroWhiteSpotsRemoving** | **bool?**| Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. | [optional] - **allowOneDFastBarcodesDetector** | **bool?**| Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. | [optional] - **allowOneDWipedBarsRestoration** | **bool?**| Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. | [optional] - **allowQRMicroQrRestoration** | **bool?**| Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. | [optional] - **allowRegularImage** | **bool?**| Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. | [optional] - **allowSaltAndPepperFiltering** | **bool?**| Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. | [optional] - **allowWhiteSpotsRemoving** | **bool?**| Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional] - **checkMore1DVariants** | **bool?**| Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional] - **fastScanOnly** | **bool?**| Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional] - **allowAdditionalRestorations** | **bool?**| Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional] - **regionLikelihoodThresholdPercent** | **double?**| Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional] - **scanWindowSizes** | [**List<int?>**](int?.md)| Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional] - **similarity** | **double?**| Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional] - **skipDiagonalSearch** | **bool?**| Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. | [optional] - **readTinyBarcodes** | **bool?**| Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. | [optional] - **australianPostEncodingTable** | **string**| Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. | [optional] - **ignoreEndingFillingPatternsForCTable** | **bool?**| The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". | [optional] - **url** | **string**| The image file url. | [optional] - **image** | **System.IO.Stream**| Image data | [optional] - -### Return type - -[**BarcodeResponseList**](BarcodeResponseList.md) - -### HTTP request headers - -- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/octet-stream -- **Accept**: application/json - - -## **PostGenerateMultiple** - -```csharp -System.IO.Stream PostGenerateMultiple (GeneratorParamsList generatorParamsList, string format = null) -``` - -Generate multiple barcodes and return in response stream - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **generatorParamsList** | [**GeneratorParamsList**](GeneratorParamsList.md)| List of barcodes | - **format** | **string**| Format to return stream in | [optional] [default to png] - -### Return type - -System.IO.Stream - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: image/png, image/bmp, image/gif, image/jpeg, image/svg+xml, image/tiff - - -## **PutBarcodeGenerateFile** - -```csharp -ResultImageInfo PutBarcodeGenerateFile (string name, string type, string text, string twoDDisplayText = null, string textLocation = null, string textAlignment = null, string textColor = null, bool? noWrap = null, double? resolution = null, double? resolutionX = null, double? resolutionY = null, double? dimensionX = null, double? textSpace = null, string units = null, string sizeMode = null, double? barHeight = null, double? imageHeight = null, double? imageWidth = null, double? rotationAngle = null, string backColor = null, string barColor = null, string borderColor = null, double? borderWidth = null, string borderDashStyle = null, bool? borderVisible = null, string enableChecksum = null, bool? enableEscape = null, bool? filledBars = null, bool? alwaysShowChecksum = null, double? wideNarrowRatio = null, bool? validateText = null, string supplementData = null, double? supplementSpace = null, double? barWidthReduction = null, bool? useAntiAlias = null, string storage = null, string folder = null, string format = null) -``` - -Generate barcode and save on server (from query params or from file with json or xml content) - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **name** | **string**| The image file name. | - **type** | **string**| Type of barcode to generate. | - **text** | **string**| Text to encode. | - **twoDDisplayText** | **string**| Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] - **textLocation** | **string**| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] - **textAlignment** | **string**| Text alignment. | [optional] - **textColor** | **string**| Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **noWrap** | **bool?**| Specify word wraps (line breaks) within text. Default value: false. | [optional] - **resolution** | **double?**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. | [optional] - **resolutionX** | **double?**| DEPRECATED: Use 'Resolution' instead. | [optional] - **resolutionY** | **double?**| DEPRECATED: Use 'Resolution' instead. | [optional] - **dimensionX** | **double?**| The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. | [optional] - **textSpace** | **double?**| Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. | [optional] - **units** | **string**| Common Units for all measuring in query. Default units: pixel. | [optional] - **sizeMode** | **string**| Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. | [optional] - **barHeight** | **double?**| Height of the barcode in given units. Default units: pixel. | [optional] - **imageHeight** | **double?**| Height of the barcode image in given units. Default units: pixel. | [optional] - **imageWidth** | **double?**| Width of the barcode image in given units. Default units: pixel. | [optional] - **rotationAngle** | **double?**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] - **backColor** | **string**| Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **barColor** | **string**| Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **borderColor** | **string**| Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] - **borderWidth** | **double?**| Border width. Default value: 0. Ignored if Visible is set to false. | [optional] - **borderDashStyle** | **string**| Border dash style. Default value: BorderDashStyle.Solid. | [optional] - **borderVisible** | **bool?**| Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] - **enableChecksum** | **string**| Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology | [optional] - **enableEscape** | **bool?**| Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. | [optional] - **filledBars** | **bool?**| Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. | [optional] - **alwaysShowChecksum** | **bool?**| Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. | [optional] - **wideNarrowRatio** | **double?**| Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard | [optional] - **validateText** | **bool?**| Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. | [optional] - **supplementData** | **string**| Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. | [optional] - **supplementSpace** | **double?**| Space between main the BarCode and supplement BarCode. | [optional] - **barWidthReduction** | **double?**| Bars reduction value that is used to compensate ink spread while printing. | [optional] - **useAntiAlias** | **bool?**| Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. | [optional] - **storage** | **string**| Image's storage. | [optional] - **folder** | **string**| Image's folder. | [optional] - **format** | **string**| The image format. | [optional] - -### Return type - -[**ResultImageInfo**](ResultImageInfo.md) - -### HTTP request headers - -- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json, application/xml -- **Accept**: application/json - - -## **PutBarcodeRecognizeFromBody** - -```csharp -BarcodeResponseList PutBarcodeRecognizeFromBody (string name, ReaderParams readerParams, string type = null, string storage = null, string folder = null) -``` - -Recognition of a barcode from file on server with parameters in body. - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **name** | **string**| The image file name. | - **readerParams** | [**ReaderParams**](ReaderParams.md)| BarcodeReader object with parameters. | - **type** | **string**| | [optional] - **storage** | **string**| The storage name | [optional] - **folder** | **string**| The image folder. | [optional] - -### Return type - -[**BarcodeResponseList**](BarcodeResponseList.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **PutGenerateMultiple** - -```csharp -ResultImageInfo PutGenerateMultiple (string name, GeneratorParamsList generatorParamsList, string format = null, string folder = null, string storage = null) -``` - -Generate image with multiple barcodes and put new file on server - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **name** | **string**| New filename | - **generatorParamsList** | [**GeneratorParamsList**](GeneratorParamsList.md)| List of barcodes | - **format** | **string**| Format of file | [optional] [default to png] - **folder** | **string**| Folder to place file to | [optional] - **storage** | **string**| The storage name | [optional] - -### Return type - -[**ResultImageInfo**](ResultImageInfo.md) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: application/json - - -## **ScanBarcode** - -```csharp -BarcodeResponseList ScanBarcode (System.IO.Stream imageFile, List decodeTypes = null, int? timeout = null, string checksumValidation = null) -``` - -Quickly scan a barcode from an image. - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **imageFile** | **System.IO.Stream**| Image as file | - **decodeTypes** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md)| Types of barcode to recognize | [optional] - **timeout** | **int?**| Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. | [optional] - **checksumValidation** | **string**| Checksum validation setting. Default is ON. | [optional] - -### Return type - -[**BarcodeResponseList**](BarcodeResponseList.md) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - diff --git a/docs/BarcodeImageFormat.md b/docs/BarcodeImageFormat.md new file mode 100644 index 0000000..6b56fe4 --- /dev/null +++ b/docs/BarcodeImageFormat.md @@ -0,0 +1,11 @@ +# Aspose.BarCode.Cloud.Sdk.Model.BarcodeImageFormat + +Specifies the file format of the image. + +## Allowable values + +* **Png** +* Jpeg +* Svg +* Tiff +* Gif diff --git a/docs/BarcodeImageParams.md b/docs/BarcodeImageParams.md new file mode 100644 index 0000000..8828d54 --- /dev/null +++ b/docs/BarcodeImageParams.md @@ -0,0 +1,17 @@ +# Aspose.BarCode.Cloud.Sdk.Model.BarcodeImageParams + +Barcode image optional parameters + +## Properties + +Name | Type | Description | Notes +---- | ---- | ----------- | ----- +**ImageFormat** | **BarcodeImageFormat** | | [optional] +**TextLocation** | **CodeLocation** | | [optional] +**ForegroundColor** | **string** | Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to "Black"] +**BackgroundColor** | **string** | Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to "White"] +**Units** | **GraphicsUnit** | | [optional] +**Resolution** | **float?** | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] +**ImageHeight** | **float?** | Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] +**ImageWidth** | **float?** | Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] +**RotationAngle** | **int?** | BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] diff --git a/docs/BarcodeResponseList.md b/docs/BarcodeResponseList.md index 6297711..9364e5d 100644 --- a/docs/BarcodeResponseList.md +++ b/docs/BarcodeResponseList.md @@ -6,4 +6,4 @@ Represents information about barcode list. Name | Type | Description | Notes ---- | ---- | ----------- | ----- -**Barcodes** | [**List<BarcodeResponse>**](BarcodeResponse.md) | List of barcodes which are present in image. | [optional] +**Barcodes** | [**List<BarcodeResponse>**](BarcodeResponse.md) | List of barcodes which are present in image. | diff --git a/docs/BorderDashStyle.md b/docs/BorderDashStyle.md deleted file mode 100644 index fcc14d9..0000000 --- a/docs/BorderDashStyle.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.BorderDashStyle - -## Allowable values - -* **Solid** -* Dash -* Dot -* DashDot -* DashDotDot diff --git a/docs/CaptionParams.md b/docs/CaptionParams.md deleted file mode 100644 index 32a8c14..0000000 --- a/docs/CaptionParams.md +++ /dev/null @@ -1,15 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CaptionParams - -Caption - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Text** | **string** | Caption text. | [optional] -**Alignment** | **TextAlignment** | Text alignment. | [optional] -**Color** | **string** | Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] -**Visible** | **bool?** | Is caption visible. | [optional] -**Font** | [**FontParams**](FontParams.md) | Font. | [optional] -**Padding** | [**Padding**](Padding.md) | Padding. | [optional] -**NoWrap** | **bool?** | Specify word wraps (line breaks) within text. Default value: false. | [optional] diff --git a/docs/ChecksumValidation.md b/docs/ChecksumValidation.md deleted file mode 100644 index 5113ae5..0000000 --- a/docs/ChecksumValidation.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ChecksumValidation - -## Allowable values - -* **Default** -* On -* Off diff --git a/docs/CodabarChecksumMode.md b/docs/CodabarChecksumMode.md deleted file mode 100644 index e4557b0..0000000 --- a/docs/CodabarChecksumMode.md +++ /dev/null @@ -1,6 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CodabarChecksumMode - -## Allowable values - -* **Mod10** -* Mod16 diff --git a/docs/CodabarParams.md b/docs/CodabarParams.md deleted file mode 100644 index c54f226..0000000 --- a/docs/CodabarParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CodabarParams - -Codabar parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**ChecksumMode** | **CodabarChecksumMode** | Checksum algorithm for Codabar barcodes. Default value: CodabarChecksumMode.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum. | [optional] -**StartSymbol** | **CodabarSymbol** | Start symbol (character) of Codabar symbology. Default value: CodabarSymbol.A | [optional] -**StopSymbol** | **CodabarSymbol** | Stop symbol (character) of Codabar symbology. Default value: CodabarSymbol.A | [optional] diff --git a/docs/CodabarSymbol.md b/docs/CodabarSymbol.md deleted file mode 100644 index 536f035..0000000 --- a/docs/CodabarSymbol.md +++ /dev/null @@ -1,8 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CodabarSymbol - -## Allowable values - -* **A** -* B -* C -* D diff --git a/docs/CodablockParams.md b/docs/CodablockParams.md deleted file mode 100644 index 6fca3ee..0000000 --- a/docs/CodablockParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CodablockParams - -Codablock parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**Columns** | **int?** | Columns count. | [optional] -**Rows** | **int?** | Rows count. | [optional] diff --git a/docs/Code128Emulation.md b/docs/Code128Emulation.md deleted file mode 100644 index 06ec78e..0000000 --- a/docs/Code128Emulation.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Code128Emulation - -DEPRECATED. This enum will be removed in future releases Function codewords for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes. - -## Allowable values - -* **None** -* Code903 -* Code904 -* Code905 diff --git a/docs/Code128EncodeMode.md b/docs/Code128EncodeMode.md deleted file mode 100644 index 852a8a2..0000000 --- a/docs/Code128EncodeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Code128EncodeMode - -## Allowable values - -* **Auto** -* CodeA -* CodeB -* CodeAB -* CodeC -* CodeAC -* CodeBC diff --git a/docs/Code128Params.md b/docs/Code128Params.md deleted file mode 100644 index 2741a4b..0000000 --- a/docs/Code128Params.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Code128Params - -Code128 params. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**EncodeMode** | **Code128EncodeMode** | Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto. | [optional] diff --git a/docs/Code16KParams.md b/docs/Code16KParams.md deleted file mode 100644 index 2901f80..0000000 --- a/docs/Code16KParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Code16KParams - -Code16K parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**QuietZoneLeftCoef** | **int?** | Size of the left quiet zone in xDimension. Default value: 10, meaning if xDimension = 2px than left quiet zone will be 20px. | [optional] -**QuietZoneRightCoef** | **int?** | Size of the right quiet zone in xDimension. Default value: 1, meaning if xDimension = 2px than right quiet zone will be 2px. | [optional] diff --git a/docs/CouponParams.md b/docs/CouponParams.md deleted file mode 100644 index 725305f..0000000 --- a/docs/CouponParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CouponParams - -Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**SupplementSpace** | **double?** | Space between main the BarCode and supplement BarCode in Unit value. | [optional] diff --git a/docs/CustomerInformationInterpretingType.md b/docs/CustomerInformationInterpretingType.md deleted file mode 100644 index 827d6ad..0000000 --- a/docs/CustomerInformationInterpretingType.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.CustomerInformationInterpretingType - -## Allowable values - -* **CTable** -* NTable -* Other diff --git a/docs/DataBarParams.md b/docs/DataBarParams.md deleted file mode 100644 index b648825..0000000 --- a/docs/DataBarParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DataBarParams - -Databar parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. Used for DataBar stacked. | [optional] -**Columns** | **int?** | Columns count. | [optional] -**Rows** | **int?** | Rows count. | [optional] -**Is2DCompositeComponent** | **bool?** | Enables flag of 2D composite component with DataBar barcode | [optional] -**IsAllowOnlyGS1Encoding** | **bool?** | If this flag is set, it allows only GS1 encoding standard for Databar barcode types | [optional] diff --git a/docs/DataMatrixEccType.md b/docs/DataMatrixEccType.md deleted file mode 100644 index 20a9903..0000000 --- a/docs/DataMatrixEccType.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DataMatrixEccType - -## Allowable values - -* **EccAuto** -* Ecc000 -* Ecc050 -* Ecc080 -* Ecc100 -* Ecc140 -* Ecc200 diff --git a/docs/DataMatrixEncodeMode.md b/docs/DataMatrixEncodeMode.md deleted file mode 100644 index 97a2111..0000000 --- a/docs/DataMatrixEncodeMode.md +++ /dev/null @@ -1,15 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DataMatrixEncodeMode - -DataMatrix encoder's encoding mode, default to Auto - -## Allowable values - -* **Auto** -* ASCII -* Full -* Custom -* C40 -* Text -* EDIFACT -* ANSIX12 -* ExtendedCodetext diff --git a/docs/DataMatrixParams.md b/docs/DataMatrixParams.md deleted file mode 100644 index 3551a8e..0000000 --- a/docs/DataMatrixParams.md +++ /dev/null @@ -1,16 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DataMatrixParams - -DataMatrix parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module | [optional] -**TextEncoding** | **string** | DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. | [optional] -**Columns** | **int?** | DEPRECATED: Will be replaced with 'DataMatrix.Version' in the next release Columns count. | [optional] -**DataMatrixEcc** | **DataMatrixEccType** | Datamatrix ECC type. Default value: DataMatrixEccType.Ecc200. | [optional] -**DataMatrixEncodeMode** | **DataMatrixEncodeMode** | Encode mode of Datamatrix barcode. Default value: DataMatrixEncodeMode.Auto. | [optional] -**Rows** | **int?** | DEPRECATED: Will be replaced with 'DataMatrix.Version' in the next release Rows count. | [optional] -**MacroCharacters** | **MacroCharacter** | Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. Can be used only with DataMatrixEccType.Ecc200 or DataMatrixEccType.EccAuto. Cannot be used with EncodeTypes.GS1DataMatrix Default value: MacroCharacters.None. | [optional] -**Version** | **DataMatrixVersion** | Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto. | [optional] diff --git a/docs/DataMatrixVersion.md b/docs/DataMatrixVersion.md deleted file mode 100644 index a7bcbeb..0000000 --- a/docs/DataMatrixVersion.md +++ /dev/null @@ -1,75 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DataMatrixVersion - -## Allowable values - -* **Auto** -* RowsColumns -* ECC000_9x9 -* ECC000_050_11x11 -* ECC000_100_13x13 -* ECC000_100_15x15 -* ECC000_140_17x17 -* ECC000_140_19x19 -* ECC000_140_21x21 -* ECC000_140_23x23 -* ECC000_140_25x25 -* ECC000_140_27x27 -* ECC000_140_29x29 -* ECC000_140_31x31 -* ECC000_140_33x33 -* ECC000_140_35x35 -* ECC000_140_37x37 -* ECC000_140_39x39 -* ECC000_140_41x41 -* ECC000_140_43x43 -* ECC000_140_45x45 -* ECC000_140_47x47 -* ECC000_140_49x49 -* ECC200_10x10 -* ECC200_12x12 -* ECC200_14x14 -* ECC200_16x16 -* ECC200_18x18 -* ECC200_20x20 -* ECC200_22x22 -* ECC200_24x24 -* ECC200_26x26 -* ECC200_32x32 -* ECC200_36x36 -* ECC200_40x40 -* ECC200_44x44 -* ECC200_48x48 -* ECC200_52x52 -* ECC200_64x64 -* ECC200_72x72 -* ECC200_80x80 -* ECC200_88x88 -* ECC200_96x96 -* ECC200_104x104 -* ECC200_120x120 -* ECC200_132x132 -* ECC200_144x144 -* ECC200_8x18 -* ECC200_8x32 -* ECC200_12x26 -* ECC200_12x36 -* ECC200_16x36 -* ECC200_16x48 -* DMRE_8x48 -* DMRE_8x64 -* DMRE_8x80 -* DMRE_8x96 -* DMRE_8x120 -* DMRE_8x144 -* DMRE_12x64 -* DMRE_12x88 -* DMRE_16x64 -* DMRE_20x36 -* DMRE_20x44 -* DMRE_20x64 -* DMRE_22x48 -* DMRE_24x48 -* DMRE_24x64 -* DMRE_26x40 -* DMRE_26x48 -* DMRE_26x64 diff --git a/docs/DecodeBarcodeType.md b/docs/DecodeBarcodeType.md index f65500c..aba1067 100644 --- a/docs/DecodeBarcodeType.md +++ b/docs/DecodeBarcodeType.md @@ -1,91 +1,90 @@ # Aspose.BarCode.Cloud.Sdk.Model.DecodeBarcodeType -See DecodeType +See Aspose.BarCode.Aspose.BarCode.BarCodeRecognition.DecodeType ## Allowable values -* **all** +* **MostCommonlyUsed** +* QR * AustraliaPost +* AustralianPosteParcel * Aztec -* ISBN * Codabar +* CodablockF * Code11 * Code128 -* GS1Code128 -* Code39Extended -* Code39Standard -* Code93Extended -* Code93Standard +* Code16K +* Code32 +* Code39 +* Code39FullASCII +* Code93 +* CompactPdf417 +* DataLogic2of5 * DataMatrix +* DatabarExpanded +* DatabarExpandedStacked +* DatabarLimited +* DatabarOmniDirectional +* DatabarStacked +* DatabarStackedOmniDirectional +* DatabarTruncated * DeutschePostIdentcode * DeutschePostLeitcode +* DotCode +* DutchKIX * EAN13 * EAN14 * EAN8 +* GS1Aztec +* GS1Code128 +* GS1CompositeBar +* GS1DataMatrix +* GS1DotCode +* GS1HanXin +* GS1MicroPdf417 +* GS1QR +* HanXin +* HIBCAztecLIC +* HIBCAztecPAS +* HIBCCode128LIC +* HIBCCode128PAS +* HIBCCode39LIC +* HIBCCode39PAS +* HIBCDataMatrixLIC +* HIBCDataMatrixPAS +* HIBCQRLIC +* HIBCQRPAS * IATA2of5 -* Interleaved2of5 -* ISSN +* ISBN * ISMN -* ItalianPost25 +* ISSN * ITF14 * ITF6 +* Interleaved2of5 +* ItalianPost25 * MacroPdf417 +* Mailmark * Matrix2of5 +* MaxiCode +* MicrE13B +* MicroPdf417 +* MicroQR * MSI * OneCode * OPC * PatchCode * Pdf417 -* MicroPdf417 +* Pharmacode * Planet * Postnet * PZN -* QR -* MicroQR +* RectMicroQR * RM4SCC * SCC14 * SSCC18 * Standard2of5 * Supplement +* SwissPostParcel * UPCA * UPCE * VIN -* Pharmacode -* GS1DataMatrix -* DatabarOmniDirectional -* DatabarTruncated -* DatabarLimited -* DatabarExpanded -* SwissPostParcel -* AustralianPosteParcel -* Code16K -* DatabarStackedOmniDirectional -* DatabarStacked -* DatabarExpandedStacked -* CompactPdf417 -* GS1QR -* MaxiCode -* MicrE13B -* Code32 -* DataLogic2of5 -* DotCode -* DutchKIX -* CodablockF -* Mailmark -* GS1DotCode -* HIBCCode39LIC -* HIBCCode128LIC -* HIBCAztecLIC -* HIBCDataMatrixLIC -* HIBCQRLIC -* HIBCCode39PAS -* HIBCCode128PAS -* HIBCAztecPAS -* HIBCDataMatrixPAS -* HIBCQRPAS -* HanXin -* GS1HanXin -* GS1Aztec -* GS1CompositeBar -* GS1MicroPdf417 -* mostCommonlyUsed diff --git a/docs/DiscUsage.md b/docs/DiscUsage.md deleted file mode 100644 index e9606cf..0000000 --- a/docs/DiscUsage.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DiscUsage - -Class for disc space information. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**UsedSize** | **long?** | Application used disc space. | -**TotalSize** | **long?** | Total disc space. | diff --git a/docs/DotCodeEncodeMode.md b/docs/DotCodeEncodeMode.md deleted file mode 100644 index 5c080d5..0000000 --- a/docs/DotCodeEncodeMode.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DotCodeEncodeMode - -## Allowable values - -* **Auto** -* Bytes -* ExtendedCodetext diff --git a/docs/DotCodeParams.md b/docs/DotCodeParams.md deleted file mode 100644 index 5b40ded..0000000 --- a/docs/DotCodeParams.md +++ /dev/null @@ -1,14 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.DotCodeParams - -DotCode parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**Columns** | **int?** | Identifies columns count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of columns must be at least 5. | [optional] -**EncodeMode** | **DotCodeEncodeMode** | Identifies DotCode encode mode. Default value: Auto. | [optional] -**ECIEncoding** | **ECIEncodings** | Identifies ECI encoding. Used when DotCodeEncodeMode is Auto. Default value: ISO-8859-1. | [optional] -**IsReaderInitialization** | **bool?** | Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader. Default value is false. | [optional] -**Rows** | **int?** | Identifies rows count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of rows must be at least 5. | [optional] diff --git a/docs/ECIEncodings.md b/docs/ECIEncodings.md deleted file mode 100644 index 041eef1..0000000 --- a/docs/ECIEncodings.md +++ /dev/null @@ -1,31 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ECIEncodings - -## Allowable values - -* **NONE** -* ISO_8859_1 -* ISO_8859_2 -* ISO_8859_3 -* ISO_8859_4 -* ISO_8859_5 -* ISO_8859_6 -* ISO_8859_7 -* ISO_8859_8 -* ISO_8859_9 -* ISO_8859_10 -* ISO_8859_11 -* ISO_8859_13 -* ISO_8859_14 -* ISO_8859_15 -* ISO_8859_16 -* Shift_JIS -* Win1250 -* Win1251 -* Win1252 -* Win1256 -* UTF16BE -* UTF8 -* US_ASCII -* Big5 -* GB18030 -* EUC_KR diff --git a/docs/EnableChecksum.md b/docs/EnableChecksum.md deleted file mode 100644 index 1a25988..0000000 --- a/docs/EnableChecksum.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.EnableChecksum - -## Allowable values - -* **Default** -* Yes -* No diff --git a/docs/EncodeBarcodeType.md b/docs/EncodeBarcodeType.md index 95fac3f..913ab6f 100644 --- a/docs/EncodeBarcodeType.md +++ b/docs/EncodeBarcodeType.md @@ -1,78 +1,79 @@ # Aspose.BarCode.Cloud.Sdk.Model.EncodeBarcodeType -See EncodeTypes +See Aspose.BarCode.Generation.EncodeTypes ## Allowable values -* **Codabar** +* **QR** +* AustraliaPost +* AustralianPosteParcel +* Aztec +* Codabar +* CodablockF * Code11 -* Code39Standard -* Code39Extended -* Code93Standard -* Code93Extended * Code128 -* GS1Code128 -* EAN8 +* Code16K +* Code32 +* Code39 +* Code39FullASCII +* Code93 +* DataLogic2of5 +* DataMatrix +* DatabarExpanded +* DatabarExpandedStacked +* DatabarLimited +* DatabarOmniDirectional +* DatabarStacked +* DatabarStackedOmniDirectional +* DatabarTruncated +* DeutschePostIdentcode +* DeutschePostLeitcode +* DotCode +* DutchKIX * EAN13 * EAN14 -* SCC14 -* SSCC18 -* UPCA -* UPCE +* EAN8 +* GS1Aztec +* GS1CodablockF +* GS1Code128 +* GS1DataMatrix +* GS1DotCode +* GS1HanXin +* GS1MicroPdf417 +* GS1QR +* HanXin +* IATA2of5 * ISBN -* ISSN * ISMN -* Standard2of5 -* Interleaved2of5 -* Matrix2of5 -* ItalianPost25 -* IATA2of5 +* ISSN * ITF14 * ITF6 +* Interleaved2of5 +* ItalianPost25 * MSI -* VIN -* DeutschePostIdentcode -* DeutschePostLeitcode +* MacroPdf417 +* Mailmark +* Matrix2of5 +* MaxiCode +* MicroPdf417 +* MicroQR * OPC +* OneCode * PZN -* Code16K -* Pharmacode -* DataMatrix -* QR -* Aztec +* PatchCode * Pdf417 -* MacroPdf417 -* AustraliaPost -* Postnet +* Pharmacode * Planet -* OneCode +* Postnet * RM4SCC -* DatabarOmniDirectional -* DatabarTruncated -* DatabarLimited -* DatabarExpanded +* RectMicroQR +* SCC14 +* SSCC18 * SingaporePost -* GS1DataMatrix -* AustralianPosteParcel +* Standard2of5 * SwissPostParcel -* PatchCode -* DatabarExpandedStacked -* DatabarStacked -* DatabarStackedOmniDirectional -* MicroPdf417 -* GS1QR -* MaxiCode -* Code32 -* DataLogic2of5 -* DotCode -* DutchKIX +* UPCA +* UPCE * UpcaGs1Code128Coupon * UpcaGs1DatabarCoupon -* CodablockF -* GS1CodablockF -* Mailmark -* GS1DotCode -* HanXin -* GS1HanXin -* GS1Aztec -* GS1MicroPdf417 +* VIN diff --git a/docs/EncodeData.md b/docs/EncodeData.md new file mode 100644 index 0000000..3758e86 --- /dev/null +++ b/docs/EncodeData.md @@ -0,0 +1,10 @@ +# Aspose.BarCode.Cloud.Sdk.Model.EncodeData + +Data to encode in barcode + +## Properties + +Name | Type | Description | Notes +---- | ---- | ----------- | ----- +**DataType** | **EncodeDataType** | | [optional] +**Data** | **string** | String represents data to encode | diff --git a/docs/EncodeDataType.md b/docs/EncodeDataType.md new file mode 100644 index 0000000..3a22783 --- /dev/null +++ b/docs/EncodeDataType.md @@ -0,0 +1,9 @@ +# Aspose.BarCode.Cloud.Sdk.Model.EncodeDataType + +Types of data can be encoded to barcode + +## Allowable values + +* **StringData** +* Base64Bytes +* HexBytes diff --git a/docs/Error.md b/docs/Error.md deleted file mode 100644 index f874296..0000000 --- a/docs/Error.md +++ /dev/null @@ -1,12 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Error - -Error - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Code** | **string** | Code | [optional] -**Message** | **string** | Message | [optional] -**Description** | **string** | Description | [optional] -**InnerError** | [**ErrorDetails**](ErrorDetails.md) | Inner Error | [optional] diff --git a/docs/ErrorDetails.md b/docs/ErrorDetails.md deleted file mode 100644 index bc438d7..0000000 --- a/docs/ErrorDetails.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ErrorDetails - -The error details - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**RequestId** | **string** | The request id | [optional] -**Date** | **DateTime?** | Date | diff --git a/docs/FileApi.md b/docs/FileApi.md deleted file mode 100644 index 2a4d7d6..0000000 --- a/docs/FileApi.md +++ /dev/null @@ -1,146 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Api.FileApi - -All URIs are relative to ** - -Method | HTTP request | Description ------- | ------------ | ----------- -[**CopyFile**](FileApi.md#copyfile) | **PUT** /barcode/storage/file/copy/{srcPath} | Copy file -[**DeleteFile**](FileApi.md#deletefile) | **DELETE** /barcode/storage/file/{path} | Delete file -[**DownloadFile**](FileApi.md#downloadfile) | **GET** /barcode/storage/file/{path} | Download file -[**MoveFile**](FileApi.md#movefile) | **PUT** /barcode/storage/file/move/{srcPath} | Move file -[**UploadFile**](FileApi.md#uploadfile) | **PUT** /barcode/storage/file/{path} | Upload file - - -## **CopyFile** - -```csharp -void CopyFile (string srcPath, string destPath, string srcStorageName = null, string destStorageName = null, string versionId = null) -``` - -Copy file - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **srcPath** | **string**| Source file path e.g. '/folder/file.ext' | - **destPath** | **string**| Destination file path | - **srcStorageName** | **string**| Source storage name | [optional] - **destStorageName** | **string**| Destination storage name | [optional] - **versionId** | **string**| File version ID to copy | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **DeleteFile** - -```csharp -void DeleteFile (string path, string storageName = null, string versionId = null) -``` - -Delete file - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| File path e.g. '/folder/file.ext' | - **storageName** | **string**| Storage name | [optional] - **versionId** | **string**| File version ID to delete | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **DownloadFile** - -```csharp -System.IO.Stream DownloadFile (string path, string storageName = null, string versionId = null) -``` - -Download file - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| File path e.g. '/folder/file.ext' | - **storageName** | **string**| Storage name | [optional] - **versionId** | **string**| File version ID to download | [optional] - -### Return type - -System.IO.Stream - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: multipart/form-data - - -## **MoveFile** - -```csharp -void MoveFile (string srcPath, string destPath, string srcStorageName = null, string destStorageName = null, string versionId = null) -``` - -Move file - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **srcPath** | **string**| Source file path e.g. '/src.ext' | - **destPath** | **string**| Destination file path e.g. '/dest.ext' | - **srcStorageName** | **string**| Source storage name | [optional] - **destStorageName** | **string**| Destination storage name | [optional] - **versionId** | **string**| File version ID to move | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **UploadFile** - -```csharp -FilesUploadResult UploadFile (string path, System.IO.Stream _file, string storageName = null) -``` - -Upload file - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. | - **_file** | **System.IO.Stream**| File to upload | - **storageName** | **string**| Storage name | [optional] - -### Return type - -[**FilesUploadResult**](FilesUploadResult.md) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - diff --git a/docs/FileVersion.md b/docs/FileVersion.md deleted file mode 100644 index a55d9b8..0000000 --- a/docs/FileVersion.md +++ /dev/null @@ -1,13 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FileVersion - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Name** | **string** | File or folder name. | [optional] -**IsFolder** | **bool?** | True if it is a folder. | -**ModifiedDate** | **DateTime?** | File or folder last modified DateTime. | [optional] -**Size** | **long?** | File or folder size. | -**Path** | **string** | File or folder path. | [optional] -**VersionId** | **string** | File Version ID. | [optional] -**IsLatest** | **bool?** | Specifies whether the file is (true) or is not (false) the latest version of an file. | diff --git a/docs/FileVersions.md b/docs/FileVersions.md deleted file mode 100644 index 5e27074..0000000 --- a/docs/FileVersions.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FileVersions - -File versions FileVersion. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Value** | [**List<FileVersion>**](FileVersion.md) | File versions FileVersion. | [optional] diff --git a/docs/FilesList.md b/docs/FilesList.md deleted file mode 100644 index 3f206a9..0000000 --- a/docs/FilesList.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FilesList - -Files list - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Value** | [**List<StorageFile>**](StorageFile.md) | Files and folders contained by folder StorageFile. | [optional] diff --git a/docs/FilesUploadResult.md b/docs/FilesUploadResult.md deleted file mode 100644 index 08d0e58..0000000 --- a/docs/FilesUploadResult.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FilesUploadResult - -File upload result - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Uploaded** | **List<string>** | List of uploaded file names | [optional] -**Errors** | [**List<Error>**](Error.md) | List of errors. | [optional] diff --git a/docs/FolderApi.md b/docs/FolderApi.md deleted file mode 100644 index deb4e18..0000000 --- a/docs/FolderApi.md +++ /dev/null @@ -1,142 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Api.FolderApi - -All URIs are relative to ** - -Method | HTTP request | Description ------- | ------------ | ----------- -[**CopyFolder**](FolderApi.md#copyfolder) | **PUT** /barcode/storage/folder/copy/{srcPath} | Copy folder -[**CreateFolder**](FolderApi.md#createfolder) | **PUT** /barcode/storage/folder/{path} | Create the folder -[**DeleteFolder**](FolderApi.md#deletefolder) | **DELETE** /barcode/storage/folder/{path} | Delete folder -[**GetFilesList**](FolderApi.md#getfileslist) | **GET** /barcode/storage/folder/{path} | Get all files and folders within a folder -[**MoveFolder**](FolderApi.md#movefolder) | **PUT** /barcode/storage/folder/move/{srcPath} | Move folder - - -## **CopyFolder** - -```csharp -void CopyFolder (string srcPath, string destPath, string srcStorageName = null, string destStorageName = null) -``` - -Copy folder - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **srcPath** | **string**| Source folder path e.g. '/src' | - **destPath** | **string**| Destination folder path e.g. '/dst' | - **srcStorageName** | **string**| Source storage name | [optional] - **destStorageName** | **string**| Destination storage name | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **CreateFolder** - -```csharp -void CreateFolder (string path, string storageName = null) -``` - -Create the folder - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| Folder path to create e.g. 'folder_1/folder_2/' | - **storageName** | **string**| Storage name | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **DeleteFolder** - -```csharp -void DeleteFolder (string path, string storageName = null, bool? recursive = null) -``` - -Delete folder - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| Folder path e.g. '/folder' | - **storageName** | **string**| Storage name | [optional] - **recursive** | **bool?**| Enable to delete folders, subfolders and files | [optional] [default to false] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **GetFilesList** - -```csharp -FilesList GetFilesList (string path, string storageName = null) -``` - -Get all files and folders within a folder - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| Folder path e.g. '/folder' | - **storageName** | **string**| Storage name | [optional] - -### Return type - -[**FilesList**](FilesList.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **MoveFolder** - -```csharp -void MoveFolder (string srcPath, string destPath, string srcStorageName = null, string destStorageName = null) -``` - -Move folder - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **srcPath** | **string**| Folder path to move e.g. '/folder' | - **destPath** | **string**| Destination folder path to move to e.g '/dst' | - **srcStorageName** | **string**| Source storage name | [optional] - **destStorageName** | **string**| Destination storage name | [optional] - -### Return type - -void (empty response body) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/FontMode.md b/docs/FontMode.md deleted file mode 100644 index 24fa5ee..0000000 --- a/docs/FontMode.md +++ /dev/null @@ -1,6 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FontMode - -## Allowable values - -* **Auto** -* Manual diff --git a/docs/FontParams.md b/docs/FontParams.md deleted file mode 100644 index c07bf49..0000000 --- a/docs/FontParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FontParams - -Font. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Family** | **string** | Font family. | [optional] -**Size** | **double?** | Font size in units. | [optional] -**Style** | **FontStyle** | Font style. | [optional] diff --git a/docs/FontStyle.md b/docs/FontStyle.md deleted file mode 100644 index 68ae8e4..0000000 --- a/docs/FontStyle.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.FontStyle - -## Allowable values - -* **Regular** -* Bold -* Italic -* Underline -* Strikeout diff --git a/docs/GenerateApi.md b/docs/GenerateApi.md new file mode 100644 index 0000000..3598236 --- /dev/null +++ b/docs/GenerateApi.md @@ -0,0 +1,104 @@ +# Aspose.BarCode.Cloud.Sdk.Api.GenerateApi + +All URIs are relative to ** + +Method | HTTP request | Description +------ | ------------ | ----------- +[**Generate**](GenerateApi.md#generate) | **GET** /barcode/generate/{barcodeType} | Generate barcode using GET request with parameters in route and query string. +[**GenerateBody**](GenerateApi.md#generatebody) | **POST** /barcode/generate-body | Generate barcode using POST request with parameters in body in json or xml format. +[**GenerateMultipart**](GenerateApi.md#generatemultipart) | **POST** /barcode/generate-multipart | Generate barcode using POST request with parameters in multipart form. + + +## **Generate** + +```csharp +System.IO.Stream Generate (EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = null, BarcodeImageFormat? imageFormat = null, CodeLocation? textLocation = null, string foregroundColor = null, string backgroundColor = null, GraphicsUnit? units = null, float? resolution = null, float? imageHeight = null, float? imageWidth = null, int? rotationAngle = null) +``` + +Generate barcode using GET request with parameters in route and query string. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **barcodeType** | **EncodeBarcodeType**| Type of barcode to generate. | + **data** | **string**| String represents data to encode | + **dataType** | **EncodeDataType?**| Type of data to encode. Default value: StringData. | [optional] + **imageFormat** | **BarcodeImageFormat?**| Barcode output image format. Default value: png | [optional] + **textLocation** | **CodeLocation?**| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] + **foregroundColor** | **string**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to "Black"] + **backgroundColor** | **string**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to "White"] + **units** | **GraphicsUnit?**| Common Units for all measuring in query. Default units: pixel. | [optional] + **resolution** | **float?**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] + **imageHeight** | **float?**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **imageWidth** | **float?**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **rotationAngle** | **int?**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] + +### Return type + +System.IO.Stream + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: image/png, image/bmp, image/gif, image/jpeg, image/svg+xml, image/tiff, application/json, application/xml + + +## **GenerateBody** + +```csharp +System.IO.Stream GenerateBody (GenerateParams generateParams) +``` + +Generate barcode using POST request with parameters in body in json or xml format. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **generateParams** | [**GenerateParams**](GenerateParams.md)| Parameters of generation | + +### Return type + +System.IO.Stream + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: image/png, image/bmp, image/gif, image/jpeg, image/svg+xml, image/tiff, application/json, application/xml + + +## **GenerateMultipart** + +```csharp +System.IO.Stream GenerateMultipart (EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = null, BarcodeImageFormat? imageFormat = null, CodeLocation? textLocation = null, string foregroundColor = null, string backgroundColor = null, GraphicsUnit? units = null, float? resolution = null, float? imageHeight = null, float? imageWidth = null, int? rotationAngle = null) +``` + +Generate barcode using POST request with parameters in multipart form. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **barcodeType** | **EncodeBarcodeType**| | + **data** | **string**| String represents data to encode | + **dataType** | **EncodeDataType?**| | [optional] + **imageFormat** | **BarcodeImageFormat?**| | [optional] + **textLocation** | **CodeLocation?**| | [optional] + **foregroundColor** | **string**| Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. | [optional] [default to "Black"] + **backgroundColor** | **string**| Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. | [optional] [default to "White"] + **units** | **GraphicsUnit?**| | [optional] + **resolution** | **float?**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. | [optional] + **imageHeight** | **float?**| Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **imageWidth** | **float?**| Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. | [optional] + **rotationAngle** | **int?**| BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] + +### Return type + +System.IO.Stream + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: image/png, image/bmp, image/gif, image/jpeg, image/svg+xml, image/tiff, application/json, application/xml + diff --git a/docs/GenerateParams.md b/docs/GenerateParams.md new file mode 100644 index 0000000..2dc2544 --- /dev/null +++ b/docs/GenerateParams.md @@ -0,0 +1,11 @@ +# Aspose.BarCode.Cloud.Sdk.Model.GenerateParams + +Barcode generation parameters + +## Properties + +Name | Type | Description | Notes +---- | ---- | ----------- | ----- +**BarcodeType** | **EncodeBarcodeType** | | +**EncodeData** | [**EncodeData**](EncodeData.md) | | +**BarcodeImageParams** | [**BarcodeImageParams**](BarcodeImageParams.md) | | [optional] diff --git a/docs/GeneratorParams.md b/docs/GeneratorParams.md deleted file mode 100644 index 3bb7287..0000000 --- a/docs/GeneratorParams.md +++ /dev/null @@ -1,64 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.GeneratorParams - -Represents extended BarcodeGenerator params. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**TypeOfBarcode** | **EncodeBarcodeType** | Type of barcode to generate. | -**Text** | **string** | Text to encode. | -**TwoDDisplayText** | **string** | Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] -**TextLocation** | **CodeLocation** | Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] -**TextAlignment** | **TextAlignment** | Text alignment. | [optional] -**TextColor** | **string** | Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] -**Font** | [**FontParams**](FontParams.md) | Specify the displaying Text's font. Default value: Arial 5pt regular. Ignored if FontSizeMode is set to FontSizeMode.Auto. | [optional] -**FontSizeMode** | **FontMode** | Specify FontSizeMode. If FontSizeMode is set to Auto, font size will be calculated automatically based on xDimension value. It is recommended to use FontSizeMode.Auto especially in AutoSizeMode.Nearest or AutoSizeMode.Interpolation. Default value: FontSizeMode.Auto. | [optional] -**NoWrap** | **bool?** | Specify word wraps (line breaks) within text. Default value: false. | [optional] -**Resolution** | **double?** | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. | [optional] -**ResolutionX** | **double?** | DEPRECATED: Use 'Resolution' instead. | [optional] -**ResolutionY** | **double?** | DEPRECATED: Use 'Resolution' instead. | [optional] -**DimensionX** | **double?** | The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. | [optional] -**TextSpace** | **double?** | Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. | [optional] -**Units** | **AvailableGraphicsUnit** | Common Units for all measuring in query. Default units: pixel. | [optional] -**SizeMode** | **AutoSizeMode** | Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. | [optional] -**BarHeight** | **double?** | Height of the barcode in given units. Default units: pixel. | [optional] -**ImageHeight** | **double?** | Height of the barcode image in given units. Default units: pixel. | [optional] -**ImageWidth** | **double?** | Width of the barcode image in given units. Default units: pixel. | [optional] -**RotationAngle** | **double?** | BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. | [optional] -**Padding** | [**Padding**](Padding.md) | Barcode paddings. Default value: 5pt 5pt 5pt 5pt. | [optional] -**CaptionAbove** | [**CaptionParams**](CaptionParams.md) | Additional caption above barcode. | [optional] -**CaptionBelow** | [**CaptionParams**](CaptionParams.md) | Additional caption below barcode. | [optional] -**BackColor** | **string** | Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] -**BarColor** | **string** | Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] -**BorderColor** | **string** | Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] -**BorderWidth** | **double?** | Border width. Default value: 0. Ignored if Visible is set to false. | [optional] -**BorderDashStyle** | **BorderDashStyle** | Border dash style. Default value: BorderDashStyle.Solid. | [optional] -**BorderVisible** | **bool?** | Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] -**EnableChecksum** | **EnableChecksum** | Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology | [optional] -**EnableEscape** | **bool?** | Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. | [optional] -**FilledBars** | **bool?** | Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. | [optional] -**AlwaysShowChecksum** | **bool?** | Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. | [optional] -**WideNarrowRatio** | **double?** | Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard | [optional] -**ValidateText** | **bool?** | Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. | [optional] -**SupplementData** | **string** | Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. | [optional] -**SupplementSpace** | **double?** | Space between main the BarCode and supplement BarCode. | [optional] -**BarWidthReduction** | **double?** | Bars reduction value that is used to compensate ink spread while printing. | [optional] -**UseAntiAlias** | **bool?** | Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. | [optional] -**AustralianPost** | [**AustralianPostParams**](AustralianPostParams.md) | AustralianPost params. | [optional] -**Aztec** | [**AztecParams**](AztecParams.md) | Aztec params. | [optional] -**Codabar** | [**CodabarParams**](CodabarParams.md) | Codabar params. | [optional] -**Codablock** | [**CodablockParams**](CodablockParams.md) | Codablock params. | [optional] -**Code16K** | [**Code16KParams**](Code16KParams.md) | Code16K params. | [optional] -**Coupon** | [**CouponParams**](CouponParams.md) | Coupon params. | [optional] -**DataBar** | [**DataBarParams**](DataBarParams.md) | DataBar params. | [optional] -**DataMatrix** | [**DataMatrixParams**](DataMatrixParams.md) | DataMatrix params. | [optional] -**DotCode** | [**DotCodeParams**](DotCodeParams.md) | DotCode params. | [optional] -**ITF** | [**ITFParams**](ITFParams.md) | ITF params. | [optional] -**MaxiCode** | [**MaxiCodeParams**](MaxiCodeParams.md) | MaxiCode params. | [optional] -**Pdf417** | [**Pdf417Params**](Pdf417Params.md) | Pdf417 params. | [optional] -**Postal** | [**PostalParams**](PostalParams.md) | Postal params. | [optional] -**QR** | [**QrParams**](QrParams.md) | QR params. | [optional] -**PatchCode** | [**PatchCodeParams**](PatchCodeParams.md) | PatchCode params. | [optional] -**Code128** | [**Code128Params**](Code128Params.md) | Code128 parameters | [optional] -**HanXin** | [**HanXinParams**](HanXinParams.md) | HanXin params. | [optional] diff --git a/docs/GeneratorParamsList.md b/docs/GeneratorParamsList.md deleted file mode 100644 index 9420fbe..0000000 --- a/docs/GeneratorParamsList.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.GeneratorParamsList - -Represents list of barcode generators - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**BarcodeBuilders** | [**List<GeneratorParams>**](GeneratorParams.md) | List of barcode generators | [optional] -**XStep** | **int?** | Shift step according to X axis | -**YStep** | **int?** | Shift step according to Y axis | diff --git a/docs/GraphicsUnit.md b/docs/GraphicsUnit.md new file mode 100644 index 0000000..c49712c --- /dev/null +++ b/docs/GraphicsUnit.md @@ -0,0 +1,10 @@ +# Aspose.BarCode.Cloud.Sdk.Model.GraphicsUnit + +Subset of Aspose.Drawing.GraphicsUnit. + +## Allowable values + +* **Pixel** +* Point +* Inch +* Millimeter diff --git a/docs/HanXinEncodeMode.md b/docs/HanXinEncodeMode.md deleted file mode 100644 index 091b0f4..0000000 --- a/docs/HanXinEncodeMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.HanXinEncodeMode - -## Allowable values - -* **Auto** -* Binary -* ECI -* Unicode -* URI -* Extended diff --git a/docs/HanXinErrorLevel.md b/docs/HanXinErrorLevel.md deleted file mode 100644 index d0ab9d4..0000000 --- a/docs/HanXinErrorLevel.md +++ /dev/null @@ -1,8 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.HanXinErrorLevel - -## Allowable values - -* **L1** -* L2 -* L3 -* L4 diff --git a/docs/HanXinParams.md b/docs/HanXinParams.md deleted file mode 100644 index 65cedb3..0000000 --- a/docs/HanXinParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.HanXinParams - -HanXin params. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**EncodeMode** | **HanXinEncodeMode** | Encoding mode for XanXin barcodes. Default value: HanXinEncodeMode.Auto. | [optional] -**ErrorLevel** | **HanXinErrorLevel** | Allowed Han Xin error correction levels from L1 to L4. Default value: HanXinErrorLevel.L1. | [optional] -**Version** | **HanXinVersion** | Allowed Han Xin versions, Auto and Version01 - Version84. Default value: HanXinVersion.Auto. | [optional] -**ECIEncoding** | **ECIEncodings** | Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Default value: ECIEncodings.ISO_8859_1 | [optional] diff --git a/docs/HanXinVersion.md b/docs/HanXinVersion.md deleted file mode 100644 index 80a2ea2..0000000 --- a/docs/HanXinVersion.md +++ /dev/null @@ -1,89 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.HanXinVersion - -## Allowable values - -* **Auto** -* Version01 -* Version02 -* Version03 -* Version04 -* Version05 -* Version06 -* Version07 -* Version08 -* Version09 -* Version10 -* Version11 -* Version12 -* Version13 -* Version14 -* Version15 -* Version16 -* Version17 -* Version18 -* Version19 -* Version20 -* Version21 -* Version22 -* Version23 -* Version24 -* Version25 -* Version26 -* Version27 -* Version28 -* Version29 -* Version30 -* Version31 -* Version32 -* Version33 -* Version34 -* Version35 -* Version36 -* Version37 -* Version38 -* Version39 -* Version40 -* Version41 -* Version42 -* Version43 -* Version44 -* Version45 -* Version46 -* Version47 -* Version48 -* Version49 -* Version50 -* Version51 -* Version52 -* Version53 -* Version54 -* Version55 -* Version56 -* Version57 -* Version58 -* Version59 -* Version60 -* Version61 -* Version62 -* Version63 -* Version64 -* Version65 -* Version66 -* Version67 -* Version68 -* Version69 -* Version70 -* Version71 -* Version72 -* Version73 -* Version74 -* Version75 -* Version76 -* Version77 -* Version78 -* Version79 -* Version80 -* Version81 -* Version82 -* Version83 -* Version84 diff --git a/docs/ITF14BorderType.md b/docs/ITF14BorderType.md deleted file mode 100644 index 8018c62..0000000 --- a/docs/ITF14BorderType.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ITF14BorderType - -## Allowable values - -* **None** -* Frame -* Bar -* FrameOut -* BarOut diff --git a/docs/ITFParams.md b/docs/ITFParams.md deleted file mode 100644 index 340a7e5..0000000 --- a/docs/ITFParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ITFParams - -ITF parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**BorderThickness** | **double?** | ITF border (bearer bar) thickness in Unit value. Default value: 12pt. | [optional] -**BorderType** | **ITF14BorderType** | Border type of ITF barcode. Default value: ITF14BorderType.Bar. | [optional] -**QuietZoneCoef** | **int?** | Size of the quiet zones in xDimension. Default value: 10, meaning if xDimension = 2px than quiet zones will be 20px. | [optional] diff --git a/docs/MacroCharacter.md b/docs/MacroCharacter.md deleted file mode 100644 index 44a3b4c..0000000 --- a/docs/MacroCharacter.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.MacroCharacter - -## Allowable values - -* **None** -* Macro05 -* Macro06 diff --git a/docs/MaxiCodeEncodeMode.md b/docs/MaxiCodeEncodeMode.md deleted file mode 100644 index 48c7e35..0000000 --- a/docs/MaxiCodeEncodeMode.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.MaxiCodeEncodeMode - -## Allowable values - -* **Auto** -* Bytes -* ExtendedCodetext diff --git a/docs/MaxiCodeMode.md b/docs/MaxiCodeMode.md deleted file mode 100644 index dcacdfc..0000000 --- a/docs/MaxiCodeMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.MaxiCodeMode - -## Allowable values - -* **Mode2** -* Mode3 -* Mode4 -* Mode5 -* Mode6 diff --git a/docs/MaxiCodeParams.md b/docs/MaxiCodeParams.md deleted file mode 100644 index 33f1eef..0000000 --- a/docs/MaxiCodeParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.MaxiCodeParams - -MaxiCode parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**Mode** | **MaxiCodeMode** | Mode for MaxiCode barcodes. | [optional] -**EncodeMode** | **MaxiCodeEncodeMode** | Encoding mode for MaxiCode barcodes. | [optional] diff --git a/docs/ObjectExist.md b/docs/ObjectExist.md deleted file mode 100644 index 442f16c..0000000 --- a/docs/ObjectExist.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ObjectExist - -Object exists - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Exists** | **bool?** | Indicates that the file or folder exists. | -**IsFolder** | **bool?** | True if it is a folder, false if it is a file. | diff --git a/docs/Padding.md b/docs/Padding.md deleted file mode 100644 index 928c9d6..0000000 --- a/docs/Padding.md +++ /dev/null @@ -1,12 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Padding - -Padding around barcode. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Left** | **double?** | Left padding. | [optional] -**Right** | **double?** | Right padding. | [optional] -**Top** | **double?** | Top padding. | [optional] -**Bottom** | **double?** | Bottom padding. | [optional] diff --git a/docs/PatchCodeParams.md b/docs/PatchCodeParams.md deleted file mode 100644 index 7b6bd3d..0000000 --- a/docs/PatchCodeParams.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.PatchCodeParams - -PatchCode parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**ExtraBarcodeText** | **string** | Specifies codetext for an extra QR barcode, when PatchCode is generated in page mode. | [optional] -**PatchFormat** | **PatchFormat** | PatchCode format. Choose PatchOnly to generate single PatchCode. Use page format to generate Patch page with PatchCodes as borders. Default value: PatchFormat.PatchOnly | [optional] diff --git a/docs/PatchFormat.md b/docs/PatchFormat.md deleted file mode 100644 index 0f2ccca..0000000 --- a/docs/PatchFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.PatchFormat - -## Allowable values - -* **PatchOnly** -* A4 -* A4_LANDSCAPE -* US_Letter -* US_Letter_LANDSCAPE diff --git a/docs/Pdf417CompactionMode.md b/docs/Pdf417CompactionMode.md deleted file mode 100644 index 351c190..0000000 --- a/docs/Pdf417CompactionMode.md +++ /dev/null @@ -1,8 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Pdf417CompactionMode - -## Allowable values - -* **Auto** -* Text -* Numeric -* Binary diff --git a/docs/Pdf417ErrorLevel.md b/docs/Pdf417ErrorLevel.md deleted file mode 100644 index 3b52c6b..0000000 --- a/docs/Pdf417ErrorLevel.md +++ /dev/null @@ -1,13 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Pdf417ErrorLevel - -## Allowable values - -* **Level0** -* Level1 -* Level2 -* Level3 -* Level4 -* Level5 -* Level6 -* Level7 -* Level8 diff --git a/docs/Pdf417MacroTerminator.md b/docs/Pdf417MacroTerminator.md deleted file mode 100644 index 7570ed9..0000000 --- a/docs/Pdf417MacroTerminator.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Pdf417MacroTerminator - -## Allowable values - -* **Auto** -* None -* Set diff --git a/docs/Pdf417Params.md b/docs/Pdf417Params.md deleted file mode 100644 index 9355f27..0000000 --- a/docs/Pdf417Params.md +++ /dev/null @@ -1,32 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.Pdf417Params - -PDF417 parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**TextEncoding** | **string** | DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. | [optional] -**Columns** | **int?** | Columns count. | [optional] -**CompactionMode** | **Pdf417CompactionMode** | Pdf417 symbology type of BarCode's compaction mode. Default value: Pdf417CompactionMode.Auto. | [optional] -**ErrorLevel** | **Pdf417ErrorLevel** | Pdf417 symbology type of BarCode's error correction level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture. | [optional] -**MacroFileID** | **int?** | Macro Pdf417 barcode's file ID. Used for MacroPdf417. | [optional] -**MacroSegmentID** | **int?** | Macro Pdf417 barcode's segment ID, which starts from 0, to MacroSegmentsCount - 1. | [optional] -**MacroSegmentsCount** | **int?** | Macro Pdf417 barcode segments count. | [optional] -**Rows** | **int?** | Rows count. | [optional] -**Truncate** | **bool?** | Whether Pdf417 symbology type of BarCode is truncated (to reduce space). | [optional] -**Pdf417ECIEncoding** | **ECIEncodings** | Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. | [optional] -**IsReaderInitialization** | **bool?** | Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization | [optional] -**MacroTimeStamp** | **DateTime?** | Macro Pdf417 barcode time stamp | [optional] -**MacroSender** | **string** | Macro Pdf417 barcode sender name | [optional] -**MacroFileSize** | **int?** | Macro Pdf417 file size. The file size field contains the size in bytes of the entire source file | [optional] -**MacroChecksum** | **int?** | Macro Pdf417 barcode checksum. The checksum field contains the value of the 16-bit (2 bytes) CRC checksum using the CCITT-16 polynomial | [optional] -**MacroFileName** | **string** | Macro Pdf417 barcode file name | [optional] -**MacroAddressee** | **string** | Macro Pdf417 barcode addressee name | [optional] -**MacroECIEncoding** | **ECIEncodings** | Extended Channel Interpretation Identifiers. Applies for Macro PDF417 text fields. | [optional] -**Code128Emulation** | **Code128Emulation** | DEPRECATED: This property is obsolete and will be removed in future releases. See samples of using new parameters on https://releases.aspose.com/barcode/net/release-notes/2023/aspose-barcode-for-net-23-10-release-notes/ Function codeword for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes. | [optional] -**IsCode128Emulation** | **bool?** | Can be used only with MicroPdf417 and encodes Code 128 emulation modes. Can encode FNC1 in second position modes 908 and 909, also can encode 910 and 911 which just indicate that recognized MicroPdf417 can be interpret as Code 128. | [optional] -**Pdf417MacroTerminator** | **Pdf417MacroTerminator** | Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417. | [optional] -**IsLinked** | **bool?** | Defines linked modes with GS1MicroPdf417, MicroPdf417 and Pdf417 barcodes. With GS1MicroPdf417 symbology encodes 906, 907, 912, 913, 914, 915 “Linked” UCC/EAN-128 modes. With MicroPdf417 and Pdf417 symbologies encodes 918 linkage flag to associated linear component other than an EAN.UCC. | [optional] -**MacroCharacters** | **MacroCharacter** | Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. Can be used only with MicroPdf417 and encodes 916 and 917 MicroPdf417 modes. Default value: MacroCharacters.None. | [optional] diff --git a/docs/PostalParams.md b/docs/PostalParams.md deleted file mode 100644 index 864a621..0000000 --- a/docs/PostalParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.PostalParams - -Postal parameters. Used for Postnet, Planet. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**ShortBarHeight** | **double?** | Short bar's height of Postal barcodes. | [optional] diff --git a/docs/PresetType.md b/docs/PresetType.md deleted file mode 100644 index c516fab..0000000 --- a/docs/PresetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.PresetType - -See QualitySettings allows to configure recognition quality and speed manually. - -## Allowable values - -* **HighPerformance** -* NormalQuality -* HighQualityDetection -* MaxQualityDetection -* HighQuality -* MaxBarCodes diff --git a/docs/QREncodeMode.md b/docs/QREncodeMode.md deleted file mode 100644 index eaf435d..0000000 --- a/docs/QREncodeMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.QREncodeMode - -## Allowable values - -* **Auto** -* Bytes -* Utf8BOM -* Utf16BEBOM -* ECIEncoding -* ExtendedCodetext diff --git a/docs/QREncodeType.md b/docs/QREncodeType.md deleted file mode 100644 index 8dfee68..0000000 --- a/docs/QREncodeType.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.QREncodeType - -## Allowable values - -* **Auto** -* ForceQR -* ForceMicroQR diff --git a/docs/QRErrorLevel.md b/docs/QRErrorLevel.md deleted file mode 100644 index 829747f..0000000 --- a/docs/QRErrorLevel.md +++ /dev/null @@ -1,8 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.QRErrorLevel - -## Allowable values - -* **LevelL** -* LevelM -* LevelQ -* LevelH diff --git a/docs/QRVersion.md b/docs/QRVersion.md deleted file mode 100644 index 7a75eff..0000000 --- a/docs/QRVersion.md +++ /dev/null @@ -1,49 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.QRVersion - -## Allowable values - -* **Auto** -* Version01 -* Version02 -* Version03 -* Version04 -* Version05 -* Version06 -* Version07 -* Version08 -* Version09 -* Version10 -* Version11 -* Version12 -* Version13 -* Version14 -* Version15 -* Version16 -* Version17 -* Version18 -* Version19 -* Version20 -* Version21 -* Version22 -* Version23 -* Version24 -* Version25 -* Version26 -* Version27 -* Version28 -* Version29 -* Version30 -* Version31 -* Version32 -* Version33 -* Version34 -* Version35 -* Version36 -* Version37 -* Version38 -* Version39 -* Version40 -* VersionM1 -* VersionM2 -* VersionM3 -* VersionM4 diff --git a/docs/QrParams.md b/docs/QrParams.md deleted file mode 100644 index d13ffa2..0000000 --- a/docs/QrParams.md +++ /dev/null @@ -1,16 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.QrParams - -QR parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**AspectRatio** | **double?** | Height/Width ratio of 2D BarCode module. | [optional] -**TextEncoding** | **string** | DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. | [optional] -**EncodeType** | **QREncodeType** | QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR. | [optional] -**ECIEncoding** | **ECIEncodings** | Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. | [optional] -**EncodeMode** | **QREncodeMode** | QR symbology type of BarCode's encoding mode. Default value: QREncodeMode.Auto. | [optional] -**ErrorLevel** | **QRErrorLevel** | Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel. | [optional] -**Version** | **QRVersion** | Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr. Default value is QRVersion.Auto. | [optional] -**StructuredAppend** | [**StructuredAppend**](StructuredAppend.md) | QR structured append parameters. | [optional] diff --git a/docs/ReaderParams.md b/docs/ReaderParams.md deleted file mode 100644 index 4c3bd81..0000000 --- a/docs/ReaderParams.md +++ /dev/null @@ -1,44 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ReaderParams - -Represents BarcodeReader object. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Type** | **DecodeBarcodeType** | The type of barcode to read. | [optional] -**Types** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md) | Multiple barcode types to read. | [optional] -**ChecksumValidation** | **ChecksumValidation** | Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional] -**DetectEncoding** | **bool?** | A flag which force engine to detect codetext encoding for Unicode. | [optional] -**Preset** | **PresetType** | Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional] -**RectX** | **int?** | Set X of top left corner of area for recognition. | [optional] -**RectY** | **int?** | Set Y of top left corner of area for recognition. | [optional] -**RectWidth** | **int?** | Set Width of area for recognition. | [optional] -**RectHeight** | **int?** | Set Height of area for recognition. | [optional] -**StripFNC** | **bool?** | Value indicating whether FNC symbol strip must be done. | [optional] -**Timeout** | **int?** | Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. | [optional] -**MedianSmoothingWindowSize** | **int?** | Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. | [optional] -**AllowMedianSmoothing** | **bool?** | Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. | [optional] -**AllowComplexBackground** | **bool?** | Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. | [optional] -**AllowDatamatrixIndustrialBarcodes** | **bool?** | Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. | [optional] -**AllowDecreasedImage** | **bool?** | Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. | [optional] -**AllowDetectScanGap** | **bool?** | Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. | [optional] -**AllowIncorrectBarcodes** | **bool?** | Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. | [optional] -**AllowInvertImage** | **bool?** | Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. | [optional] -**AllowMicroWhiteSpotsRemoving** | **bool?** | Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. | [optional] -**AllowOneDFastBarcodesDetector** | **bool?** | Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. | [optional] -**AllowOneDWipedBarsRestoration** | **bool?** | Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. | [optional] -**AllowQRMicroQrRestoration** | **bool?** | Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. | [optional] -**AllowRegularImage** | **bool?** | Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. | [optional] -**AllowSaltAndPepperFiltering** | **bool?** | Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. | [optional] -**AllowWhiteSpotsRemoving** | **bool?** | Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional] -**CheckMore1DVariants** | **bool?** | Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional] -**FastScanOnly** | **bool?** | Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional] -**AllowAdditionalRestorations** | **bool?** | Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional] -**RegionLikelihoodThresholdPercent** | **double?** | Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional] -**ScanWindowSizes** | **List<int?>** | Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional] -**Similarity** | **double?** | Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional] -**SkipDiagonalSearch** | **bool?** | Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. | [optional] -**ReadTinyBarcodes** | **bool?** | Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. | [optional] -**AustralianPostEncodingTable** | **CustomerInformationInterpretingType** | Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. | [optional] -**IgnoreEndingFillingPatternsForCTable** | **bool?** | The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". | [optional] diff --git a/docs/RecognitionImageKind.md b/docs/RecognitionImageKind.md new file mode 100644 index 0000000..8277552 --- /dev/null +++ b/docs/RecognitionImageKind.md @@ -0,0 +1,9 @@ +# Aspose.BarCode.Cloud.Sdk.Model.RecognitionImageKind + +Kind of image to recognize + +## Allowable values + +* **Photo** +* ScannedDocument +* ClearImage diff --git a/docs/RecognitionMode.md b/docs/RecognitionMode.md new file mode 100644 index 0000000..86ce83d --- /dev/null +++ b/docs/RecognitionMode.md @@ -0,0 +1,9 @@ +# Aspose.BarCode.Cloud.Sdk.Model.RecognitionMode + +Recognition mode. + +## Allowable values + +* **Fast** +* Normal +* Excellent diff --git a/docs/RecognizeApi.md b/docs/RecognizeApi.md new file mode 100644 index 0000000..700acd7 --- /dev/null +++ b/docs/RecognizeApi.md @@ -0,0 +1,88 @@ +# Aspose.BarCode.Cloud.Sdk.Api.RecognizeApi + +All URIs are relative to ** + +Method | HTTP request | Description +------ | ------------ | ----------- +[**Recognize**](RecognizeApi.md#recognize) | **GET** /barcode/recognize | Recognize barcode from file on server using GET requests with parameters in route and query string. +[**RecognizeBase64**](RecognizeApi.md#recognizebase64) | **POST** /barcode/recognize-body | Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. +[**RecognizeMultipart**](RecognizeApi.md#recognizemultipart) | **POST** /barcode/recognize-multipart | Recognize barcode from file in request body using POST requests with parameters in multipart form. + + +## **Recognize** + +```csharp +BarcodeResponseList Recognize (DecodeBarcodeType barcodeType, string fileUrl, RecognitionMode? recognitionMode = null, RecognitionImageKind? recognitionImageKind = null) +``` + +Recognize barcode from file on server using GET requests with parameters in route and query string. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **barcodeType** | **DecodeBarcodeType**| Type of barcode to recognize | + **fileUrl** | **string**| Url to barcode image | + **recognitionMode** | **RecognitionMode?**| Recognition mode | [optional] + **recognitionImageKind** | **RecognitionImageKind?**| Image kind for recognition | [optional] + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + + +## **RecognizeBase64** + +```csharp +BarcodeResponseList RecognizeBase64 (RecognizeBase64Request recognizeBase64Request) +``` + +Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **recognizeBase64Request** | [**RecognizeBase64Request**](RecognizeBase64Request.md)| Barcode recognition request | + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/json, application/xml + + +## **RecognizeMultipart** + +```csharp +BarcodeResponseList RecognizeMultipart (DecodeBarcodeType barcodeType, System.IO.Stream file, RecognitionMode? recognitionMode = null, RecognitionImageKind? recognitionImageKind = null) +``` + +Recognize barcode from file in request body using POST requests with parameters in multipart form. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **barcodeType** | **DecodeBarcodeType**| | + **file** | **System.IO.Stream****System.IO.Stream**| Barcode image file | + **recognitionMode** | **RecognitionMode?**| | [optional] + **recognitionImageKind** | **RecognitionImageKind?**| | [optional] + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json, application/xml + diff --git a/docs/RecognizeBase64Request.md b/docs/RecognizeBase64Request.md new file mode 100644 index 0000000..affb4ff --- /dev/null +++ b/docs/RecognizeBase64Request.md @@ -0,0 +1,12 @@ +# Aspose.BarCode.Cloud.Sdk.Model.RecognizeBase64Request + +Barcode recognize request + +## Properties + +Name | Type | Description | Notes +---- | ---- | ----------- | ----- +**BarcodeTypes** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md) | Array of decode types to find on barcode | +**FileBase64** | **string** | Barcode image bytes encoded as base-64. | +**RecognitionMode** | **RecognitionMode** | | [optional] +**RecognitionImageKind** | **RecognitionImageKind** | | [optional] diff --git a/docs/RegionPoint.md b/docs/RegionPoint.md index 4260bc0..2e6ec2b 100644 --- a/docs/RegionPoint.md +++ b/docs/RegionPoint.md @@ -6,5 +6,5 @@ Wrapper around Drawing.Point for proper specification. Name | Type | Description | Notes ---- | ---- | ----------- | ----- -**X** | **int?** | X-coordinate | -**Y** | **int?** | Y-coordinate | +**X** | **int** | X-coordinate | [optional] +**Y** | **int** | Y-coordinate | [optional] diff --git a/docs/ResultImageInfo.md b/docs/ResultImageInfo.md deleted file mode 100644 index d5667b2..0000000 --- a/docs/ResultImageInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.ResultImageInfo - -Created image info. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**FileSize** | **long?** | Result file size. | -**ImageWidth** | **int?** | Result image width. | [optional] -**ImageHeight** | **int?** | Result image height. | [optional] diff --git a/docs/ScanApi.md b/docs/ScanApi.md new file mode 100644 index 0000000..b1b3fe3 --- /dev/null +++ b/docs/ScanApi.md @@ -0,0 +1,82 @@ +# Aspose.BarCode.Cloud.Sdk.Api.ScanApi + +All URIs are relative to ** + +Method | HTTP request | Description +------ | ------------ | ----------- +[**Scan**](ScanApi.md#scan) | **GET** /barcode/scan | Scan barcode from file on server using GET requests with parameter in query string. +[**ScanBase64**](ScanApi.md#scanbase64) | **POST** /barcode/scan-body | Scan barcode from file in request body using POST requests with parameter in body in json or xml format. +[**ScanMultipart**](ScanApi.md#scanmultipart) | **POST** /barcode/scan-multipart | Scan barcode from file in request body using POST requests with parameter in multipart form. + + +## **Scan** + +```csharp +BarcodeResponseList Scan (string fileUrl) +``` + +Scan barcode from file on server using GET requests with parameter in query string. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **fileUrl** | **string**| Url to barcode image | + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + + +## **ScanBase64** + +```csharp +BarcodeResponseList ScanBase64 (ScanBase64Request scanBase64Request) +``` + +Scan barcode from file in request body using POST requests with parameter in body in json or xml format. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **scanBase64Request** | [**ScanBase64Request**](ScanBase64Request.md)| Barcode scan request | + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/json, application/xml + + +## **ScanMultipart** + +```csharp +BarcodeResponseList ScanMultipart (System.IO.Stream file) +``` + +Scan barcode from file in request body using POST requests with parameter in multipart form. + +### Parameters + +Name | Type | Description | Notes +---- | ---- | ------------ | ----- + **file** | **System.IO.Stream****System.IO.Stream**| Barcode image file | + +### Return type + +[**BarcodeResponseList**](BarcodeResponseList.md) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json, application/xml + diff --git a/docs/ScanBase64Request.md b/docs/ScanBase64Request.md new file mode 100644 index 0000000..79f5d2d --- /dev/null +++ b/docs/ScanBase64Request.md @@ -0,0 +1,9 @@ +# Aspose.BarCode.Cloud.Sdk.Model.ScanBase64Request + +Scan barcode request. + +## Properties + +Name | Type | Description | Notes +---- | ---- | ----------- | ----- +**FileBase64** | **string** | Barcode image bytes encoded as base-64. | diff --git a/docs/StorageApi.md b/docs/StorageApi.md deleted file mode 100644 index 8739ed0..0000000 --- a/docs/StorageApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Api.StorageApi - -All URIs are relative to ** - -Method | HTTP request | Description ------- | ------------ | ----------- -[**GetDiscUsage**](StorageApi.md#getdiscusage) | **GET** /barcode/storage/disc | Get disc usage -[**GetFileVersions**](StorageApi.md#getfileversions) | **GET** /barcode/storage/version/{path} | Get file versions -[**ObjectExists**](StorageApi.md#objectexists) | **GET** /barcode/storage/exist/{path} | Check if file or folder exists -[**StorageExists**](StorageApi.md#storageexists) | **GET** /barcode/storage/{storageName}/exist | Check if storage exists - - -## **GetDiscUsage** - -```csharp -DiscUsage GetDiscUsage (string storageName = null) -``` - -Get disc usage - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **storageName** | **string**| Storage name | [optional] - -### Return type - -[**DiscUsage**](DiscUsage.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **GetFileVersions** - -```csharp -FileVersions GetFileVersions (string path, string storageName = null) -``` - -Get file versions - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| File path e.g. '/file.ext' | - **storageName** | **string**| Storage name | [optional] - -### Return type - -[**FileVersions**](FileVersions.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **ObjectExists** - -```csharp -ObjectExist ObjectExists (string path, string storageName = null, string versionId = null) -``` - -Check if file or folder exists - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **path** | **string**| File or folder path e.g. '/file.ext' or '/folder' | - **storageName** | **string**| Storage name | [optional] - **versionId** | **string**| File version ID | [optional] - -### Return type - -[**ObjectExist**](ObjectExist.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## **StorageExists** - -```csharp -StorageExist StorageExists (string storageName) -``` - -Check if storage exists - -### Parameters - -Name | Type | Description | Notes ----- | ---- | ------------ | ----- - **storageName** | **string**| Storage name | - -### Return type - -[**StorageExist**](StorageExist.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/StorageExist.md b/docs/StorageExist.md deleted file mode 100644 index 42548df..0000000 --- a/docs/StorageExist.md +++ /dev/null @@ -1,9 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.StorageExist - -Storage exists - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Exists** | **bool?** | Shows that the storage exists. | diff --git a/docs/StorageFile.md b/docs/StorageFile.md deleted file mode 100644 index 95636ec..0000000 --- a/docs/StorageFile.md +++ /dev/null @@ -1,13 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.StorageFile - -File or folder information - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**Name** | **string** | File or folder name. | [optional] -**IsFolder** | **bool?** | True if it is a folder. | -**ModifiedDate** | **DateTime?** | File or folder last modified DateTime. | [optional] -**Size** | **long?** | File or folder size. | -**Path** | **string** | File or folder path. | [optional] diff --git a/docs/StructuredAppend.md b/docs/StructuredAppend.md deleted file mode 100644 index bd241bb..0000000 --- a/docs/StructuredAppend.md +++ /dev/null @@ -1,11 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.StructuredAppend - -QR structured append parameters. - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ----- -**SequenceIndicator** | **int?** | The index of the QR structured append mode barcode. Index starts from 0. | [optional] -**TotalCount** | **int?** | QR structured append mode barcodes quantity. Max value is 16. | [optional] -**ParityByte** | **int?** | QR structured append mode parity data. | [optional] diff --git a/docs/TextAlignment.md b/docs/TextAlignment.md deleted file mode 100644 index 1581e85..0000000 --- a/docs/TextAlignment.md +++ /dev/null @@ -1,7 +0,0 @@ -# Aspose.BarCode.Cloud.Sdk.Model.TextAlignment - -## Allowable values - -* **Left** -* Center -* Right diff --git a/examples/GenerateQR/GenerateQR.csproj b/examples/GenerateQR/GenerateQR.csproj index 2446034..4c9b046 100644 --- a/examples/GenerateQR/GenerateQR.csproj +++ b/examples/GenerateQR/GenerateQR.csproj @@ -7,7 +7,7 @@ - + diff --git a/examples/GenerateQR/Program.cs b/examples/GenerateQR/Program.cs index c867883..cae2046 100644 --- a/examples/GenerateQR/Program.cs +++ b/examples/GenerateQR/Program.cs @@ -1,7 +1,7 @@ using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using System; using System.IO; using System.Reflection; @@ -29,16 +29,14 @@ private static Configuration MakeConfiguration() return config; } - private static async Task GenerateQR(IBarcodeApi api, string fileName) + private static async Task GenerateQR(IGenerateApi api, string fileName) { - await using Stream generated = await api.GetBarcodeGenerateAsync( - new GetBarcodeGenerateRequest( - EncodeBarcodeType.QR.ToString(), - "QR code text") - { - TextLocation = CodeLocation.None.ToString(), - format = "png" - }); + await using Stream generated = await api.GenerateAsync( + EncodeBarcodeType.QR, + "QR code text", + textLocation: CodeLocation.None, + imageFormat: BarcodeImageFormat.Png + ); await using FileStream stream = File.Create(fileName); await generated.CopyToAsync(stream); } @@ -51,7 +49,7 @@ public static async Task Main(string[] args) "qr.png" )); - BarcodeApi api = new BarcodeApi(MakeConfiguration()); + GenerateApi api = new GenerateApi(MakeConfiguration()); await GenerateQR(api, fileName); Console.WriteLine($"File '{fileName}' generated."); diff --git a/examples/ReadQR/Program.cs b/examples/ReadQR/Program.cs index cb06bce..e9fc0cb 100644 --- a/examples/ReadQR/Program.cs +++ b/examples/ReadQR/Program.cs @@ -1,7 +1,7 @@ using Aspose.BarCode.Cloud.Sdk.Api; using Aspose.BarCode.Cloud.Sdk.Interfaces; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + using System; using System.Collections.Generic; using System.IO; @@ -30,13 +30,16 @@ private static Configuration MakeConfiguration() return config; } - private static async Task ReadQR(IBarcodeApi api, string fileName) + private static async Task ReadQR(IRecognizeApi api, string fileName) { - await using FileStream imageStream = File.OpenRead(fileName); - BarcodeResponseList recognized = await api.ScanBarcodeAsync( - new ScanBarcodeRequest(imageStream) + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + BarcodeResponseList recognized = await api.RecognizeBase64Async( + new RecognizeBase64Request() { - decodeTypes = new List { DecodeBarcodeType.QR } + BarcodeTypes = new List { DecodeBarcodeType.QR }, + FileBase64 = imageBase64 } ); @@ -51,7 +54,7 @@ public static async Task Main(string[] args) "qr.png" )); - var api = new BarcodeApi(MakeConfiguration()); + var api = new RecognizeApi(MakeConfiguration()); string result = await ReadQR(api, fileName); Console.WriteLine($"File '{fileName}' recognized, result: '{result}'"); diff --git a/examples/ReadQR/ReadQR.csproj b/examples/ReadQR/ReadQR.csproj index 2446034..4c9b046 100644 --- a/examples/ReadQR/ReadQR.csproj +++ b/examples/ReadQR/ReadQR.csproj @@ -7,7 +7,7 @@ - + diff --git a/examples/qr.png b/examples/qr.png index a99f254..c1bb9a3 100644 Binary files a/examples/qr.png and b/examples/qr.png differ diff --git a/scripts/insert-credentials.py b/scripts/insert-credentials.py new file mode 100644 index 0000000..2fda5e9 --- /dev/null +++ b/scripts/insert-credentials.py @@ -0,0 +1,54 @@ +import sys +import json +import os + +def replace_values_in_file(text_file_path, json_file_path, output_folder_path): + # Check if the JSON file exists + if not os.path.exists(json_file_path): + print(f"JSON file '{json_file_path}' does not exist. Writing input file as is.") + # Ensure the output folder exists + os.makedirs(output_folder_path, exist_ok=True) + + # Generate the output file path + output_file_path = os.path.join(output_folder_path, os.path.basename(text_file_path)) + + # Write the original content to the output file + with open(text_file_path, 'r') as text_file, open(output_file_path, 'w') as output_file: + output_file.write(text_file.read()) + return + + # Read the JSON file + with open(json_file_path, 'r') as json_file: + replacement_values = json.load(json_file) + + + # Read the text file + with open(text_file_path, 'r') as text_file: + content = text_file.read() + + values_dict = { + "ClientId": "Client Id from https://dashboard.aspose.cloud/applications", + "ClientSecret": "Client Secret from https://dashboard.aspose.cloud/applications", + } + # Replace the old values with the new values + for new_value_key, old_value in values_dict.items(): + content = content.replace(old_value, replacement_values[new_value_key]) + + # Ensure the output folder exists + os.makedirs(output_folder_path, exist_ok=True) + + # Generate the output file path + output_file_path = os.path.join(output_folder_path,"Program.cs") + + # Write the updated content to the output file + with open(output_file_path, 'w') as output_file: + output_file.write(content) + +if __name__ == "__main__": + if len(sys.argv) != 4: + print("Usage: python replace_values.py ") + else: + text_file_path = sys.argv[1] + json_file_path = sys.argv[2] + output_folder_path = sys.argv[3] + replace_values_in_file(text_file_path, json_file_path, output_folder_path) diff --git a/scripts/run_snippet.sh b/scripts/run_snippet.sh new file mode 100644 index 0000000..bcba53c --- /dev/null +++ b/scripts/run_snippet.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -euo pipefail + +FILE_PATH=$1; +RUN_DIR=$2 +SCRIPT_DIR=$3 +CONFIG_FILE_PATH=$4 + +rm $RUN_DIR/*.cs || true + +echo "Run snippet file: $FILE_PATH" + +python ${SCRIPT_DIR}/insert-credentials.py $FILE_PATH $CONFIG_FILE_PATH $RUN_DIR + +dotnet run --project ./$RUN_DIR/Snippets.csproj || exit 1 + diff --git a/scripts/run_snippets.sh b/scripts/run_snippets.sh new file mode 100644 index 0000000..7a936eb --- /dev/null +++ b/scripts/run_snippets.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -euo pipefail + +RUN_DIR="snippets_test" +SNIPPETS_DIR="snippets" +SCRIPT_DIR="scripts" +CONFIG_FILE_PATH="Tests/Configuration.json" + +rm -rf "${RUN_DIR}" || true +mkdir -p "${RUN_DIR}" + +pushd ${RUN_DIR} +cp ../*.nupkg . +ln -sv -F "../$SNIPPETS_DIR/Snippets.csproj" ./Snippets.csproj +ln -sv -F "../$SNIPPETS_DIR/nuget.config" ./nuget.config +popd + +for file in $(find "${SNIPPETS_DIR}" -name "*.cs"); do + ${SCRIPT_DIR}/run_snippet.sh "$file" $RUN_DIR $SCRIPT_DIR $CONFIG_FILE_PATH || { echo "Error processing $file"; exit 1; } +done + +rm -rf "${RUN_DIR}" || true diff --git a/snippets/ManualFetchToken.cs b/snippets/ManualFetchToken.cs new file mode 100644 index 0000000..82c2631 --- /dev/null +++ b/snippets/ManualFetchToken.cs @@ -0,0 +1,48 @@ +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Threading.Tasks; +using System.Collections.Generic; + +namespace Snippets; + +internal static class Program +{ + public static async Task Main(string[] args) + { + var clientId = "Client Id from https://dashboard.aspose.cloud/applications"; + var clientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + + //Check the clientId is changed to not break github ci pipeline + if(clientId.StartsWith("Client Id")) + { + Console.WriteLine("Client Id not changed. Skip this snippet test."); + return; + + } + using var client = new HttpClient + { + BaseAddress = new Uri("https://id.aspose.cloud/") + }; + + var payload = new FormUrlEncodedContent(new[] + { + new KeyValuePair("grant_type", "client_credentials"), + new KeyValuePair("client_id", clientId), + new KeyValuePair("client_secret", clientSecret) + }); + + var response = await client.PostAsync("connect/token", payload); + response.EnsureSuccessStatusCode(); + + var strData = await response.Content.ReadAsStringAsync(); + + JsonNode data = JsonSerializer.Deserialize(strData)!; + + Console.WriteLine("Token reciewed successfullly."); + // Uncomment next line to view token + // Console.WriteLine(data["access_token"]!.GetValue()); + } +} diff --git a/snippets/Snippets.csproj b/snippets/Snippets.csproj new file mode 100644 index 0000000..4c9b046 --- /dev/null +++ b/snippets/Snippets.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + diff --git a/snippets/dependency.xml b/snippets/dependency.xml new file mode 100644 index 0000000..17e8441 --- /dev/null +++ b/snippets/dependency.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/snippets/generate/appearance/GenerateBody.cs b/snippets/generate/appearance/GenerateBody.cs new file mode 100644 index 0000000..4315c6d --- /dev/null +++ b/snippets/generate/appearance/GenerateBody.cs @@ -0,0 +1,60 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Code39.jpeg" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generateParams = new GenerateParams + { + BarcodeType = EncodeBarcodeType.Code39, + EncodeData = new EncodeData { Data = "Aspose", DataType = EncodeDataType.StringData }, + BarcodeImageParams = new BarcodeImageParams + { + ForegroundColor = "#FF0000", + BackgroundColor = "#FFFF00", + ImageFormat = BarcodeImageFormat.Jpeg, + RotationAngle = 90 + } + }; + + var generated = await generateApi.GenerateBodyAsync(generateParams); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/appearance/GenerateGet.cs b/snippets/generate/appearance/GenerateGet.cs new file mode 100644 index 0000000..7fc3f92 --- /dev/null +++ b/snippets/generate/appearance/GenerateGet.cs @@ -0,0 +1,55 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generated = await generateApi.GenerateAsync( barcodeType: EncodeBarcodeType.QR, + data: "Aspose.BarCode.Cloud", + imageFormat: BarcodeImageFormat.Png, + foregroundColor: "Black", + backgroundColor: "White", + textLocation: CodeLocation.Below, + resolution: 300, + imageHeight: 200, + imageWidth: 200); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/appearance/GenerateMultipart.cs b/snippets/generate/appearance/GenerateMultipart.cs new file mode 100644 index 0000000..ada84b4 --- /dev/null +++ b/snippets/generate/appearance/GenerateMultipart.cs @@ -0,0 +1,51 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.svg" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generated = await generateApi.GenerateMultipartAsync(barcodeType: EncodeBarcodeType.Pdf417, + data: "Aspose.BarCode.Cloud", + textLocation: CodeLocation.Above, + imageFormat: BarcodeImageFormat.Svg + ); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/save/GenerateBody.cs b/snippets/generate/save/GenerateBody.cs new file mode 100644 index 0000000..188bbb1 --- /dev/null +++ b/snippets/generate/save/GenerateBody.cs @@ -0,0 +1,59 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generateParams = new GenerateParams + { + BarcodeType = EncodeBarcodeType.Pdf417, + EncodeData = new EncodeData { Data = "Aspose.BarCode.Cloud", DataType = EncodeDataType.StringData }, + BarcodeImageParams = new BarcodeImageParams + { + ForegroundColor = "#FF5733", + BackgroundColor = "#FFFFFF", + ImageFormat = BarcodeImageFormat.Jpeg + } + }; + + Stream generated = await generateApi.GenerateBodyAsync(generateParams); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/save/GenerateGet.cs b/snippets/generate/save/GenerateGet.cs new file mode 100644 index 0000000..770dc29 --- /dev/null +++ b/snippets/generate/save/GenerateGet.cs @@ -0,0 +1,47 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Code128.jpeg" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + using var generated = await generateApi.GenerateAsync(EncodeBarcodeType.Code128, "Aspose.BarCode.Cloud", imageFormat: BarcodeImageFormat.Png); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/save/GenerateMultipart.cs b/snippets/generate/save/GenerateMultipart.cs new file mode 100644 index 0000000..0728d55 --- /dev/null +++ b/snippets/generate/save/GenerateMultipart.cs @@ -0,0 +1,47 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + using var generated = await generateApi.GenerateMultipartAsync(EncodeBarcodeType.Pdf417, "Aspose.BarCode.Cloud"); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-colorscheme/GenerateBody.cs b/snippets/generate/set-colorscheme/GenerateBody.cs new file mode 100644 index 0000000..188bbb1 --- /dev/null +++ b/snippets/generate/set-colorscheme/GenerateBody.cs @@ -0,0 +1,59 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generateParams = new GenerateParams + { + BarcodeType = EncodeBarcodeType.Pdf417, + EncodeData = new EncodeData { Data = "Aspose.BarCode.Cloud", DataType = EncodeDataType.StringData }, + BarcodeImageParams = new BarcodeImageParams + { + ForegroundColor = "#FF5733", + BackgroundColor = "#FFFFFF", + ImageFormat = BarcodeImageFormat.Jpeg + } + }; + + Stream generated = await generateApi.GenerateBodyAsync(generateParams); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-colorscheme/GenerateGet.cs b/snippets/generate/set-colorscheme/GenerateGet.cs new file mode 100644 index 0000000..3c00661 --- /dev/null +++ b/snippets/generate/set-colorscheme/GenerateGet.cs @@ -0,0 +1,51 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + Stream generated = await generateApi.GenerateAsync(EncodeBarcodeType.QR, + "https://products.aspose.cloud/barcode/family/", + foregroundColor: "DarkBlue", + backgroundColor: "LightGray", + imageFormat: BarcodeImageFormat.Png); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-colorscheme/GenerateMultipart.cs b/snippets/generate/set-colorscheme/GenerateMultipart.cs new file mode 100644 index 0000000..0107916 --- /dev/null +++ b/snippets/generate/set-colorscheme/GenerateMultipart.cs @@ -0,0 +1,50 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Code39.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + Stream generated = await generateApi.GenerateMultipartAsync(EncodeBarcodeType.Code39, "Aspose", + foregroundColor: "Green", + backgroundColor: "Yellow", + imageFormat: BarcodeImageFormat.Gif); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-size/GenerateBody.cs b/snippets/generate/set-size/GenerateBody.cs new file mode 100644 index 0000000..76a0882 --- /dev/null +++ b/snippets/generate/set-size/GenerateBody.cs @@ -0,0 +1,60 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generateParams = new GenerateParams + { + BarcodeType = EncodeBarcodeType.Pdf417, + EncodeData = new EncodeData { Data = "Aspose.BarCode.Cloud", DataType = EncodeDataType.StringData }, + BarcodeImageParams = new BarcodeImageParams + { + ImageHeight = 2, + ImageWidth = 3, + Resolution = 96, + Units = GraphicsUnit.Inch + } + }; + + Stream generated = await generateApi.GenerateBodyAsync(generateParams); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-size/GenerateGet.cs b/snippets/generate/set-size/GenerateGet.cs new file mode 100644 index 0000000..a21b237 --- /dev/null +++ b/snippets/generate/set-size/GenerateGet.cs @@ -0,0 +1,52 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + Stream generated = await generateApi.GenerateAsync(EncodeBarcodeType.QR, "Aspose.BarCode.Cloud", + imageHeight: 200, + imageWidth: 200, + resolution: 300, + units: GraphicsUnit.Pixel + ); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-size/GenerateMultipart.cs b/snippets/generate/set-size/GenerateMultipart.cs new file mode 100644 index 0000000..089fbc9 --- /dev/null +++ b/snippets/generate/set-size/GenerateMultipart.cs @@ -0,0 +1,52 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "aztec.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + + Stream generated = await generateApi.GenerateMultipartAsync(EncodeBarcodeType.Aztec, "Aspose.BarCode.Cloud", + imageHeight: 200, + imageWidth: 200, + resolution: 150, + units: GraphicsUnit.Point); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-text/GenerateBody.cs b/snippets/generate/set-text/GenerateBody.cs new file mode 100644 index 0000000..1e89c64 --- /dev/null +++ b/snippets/generate/set-text/GenerateBody.cs @@ -0,0 +1,57 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + var generateParams = new GenerateParams + { + BarcodeType = EncodeBarcodeType.Pdf417, + EncodeData = new EncodeData + { + DataType = EncodeDataType.Base64Bytes, + Data = "QXNwb3NlLkJhckNvZGUuQ2xvdWQ=" + } + }; + + Stream generated = await generateApi.GenerateBodyAsync(generateParams); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-text/GenerateGet.cs b/snippets/generate/set-text/GenerateGet.cs new file mode 100644 index 0000000..318bca8 --- /dev/null +++ b/snippets/generate/set-text/GenerateGet.cs @@ -0,0 +1,47 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + Stream generated = await generateApi.GenerateAsync(EncodeBarcodeType.QR, "Aspose.BarCode.Cloud", dataType: EncodeDataType.StringData); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/generate/set-text/GenerateMultipart.cs b/snippets/generate/set-text/GenerateMultipart.cs new file mode 100644 index 0000000..284b897 --- /dev/null +++ b/snippets/generate/set-text/GenerateMultipart.cs @@ -0,0 +1,47 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace GenerateSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Code128.png" + )); + + GenerateApi generateApi = new GenerateApi(MakeConfiguration()); + + Stream generated = await generateApi.GenerateMultipartAsync(EncodeBarcodeType.Code128, "4173706F73652E426172436F64652E436C6F7564", dataType: EncodeDataType.HexBytes); + + await using FileStream stream = File.Create(fileName); + await generated.CopyToAsync(stream); + + Console.WriteLine($"File '{fileName}' generated."); + } +} diff --git a/snippets/nuget.config b/snippets/nuget.config new file mode 100644 index 0000000..048733c --- /dev/null +++ b/snippets/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/snippets/read/set-image-kind/RecognizeBody.cs b/snippets/read/set-image-kind/RecognizeBody.cs new file mode 100644 index 0000000..ca98315 --- /dev/null +++ b/snippets/read/set-image-kind/RecognizeBody.cs @@ -0,0 +1,57 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "aztec.png" + )); + + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + + var request = new RecognizeBase64Request + { + BarcodeTypes = new List { DecodeBarcodeType.Aztec, DecodeBarcodeType.QR }, + FileBase64 = imageBase64, + RecognitionImageKind = RecognitionImageKind.ScannedDocument + }; + + BarcodeResponseList result = await recognizeApi.RecognizeBase64Async(request); + + Console.WriteLine($"File '{fileName}' recognized, results: value: '{result.Barcodes[0].BarcodeValue}', type: {result.Barcodes[0].Type}"); + + } +} diff --git a/snippets/read/set-image-kind/RecognizeGet.cs b/snippets/read/set-image-kind/RecognizeGet.cs new file mode 100644 index 0000000..41a2ead --- /dev/null +++ b/snippets/read/set-image-kind/RecognizeGet.cs @@ -0,0 +1,43 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecgonizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + BarcodeResponseList result = await recognizeApi.RecognizeAsync(DecodeBarcodeType.QR, + "https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png", + recognitionImageKind: RecognitionImageKind.Photo); + + Console.WriteLine($"File recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-image-kind/RecognizeMultipart.cs b/snippets/read/set-image-kind/RecognizeMultipart.cs new file mode 100644 index 0000000..ba3a1a6 --- /dev/null +++ b/snippets/read/set-image-kind/RecognizeMultipart.cs @@ -0,0 +1,48 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + using var fileStream = new FileStream(fileName, FileMode.Open); + + BarcodeResponseList result = await recognizeApi.RecognizeMultipartAsync(DecodeBarcodeType.MostCommonlyUsed, + fileStream, recognitionImageKind: RecognitionImageKind.ClearImage); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-quality/RecognizeBody.cs b/snippets/read/set-quality/RecognizeBody.cs new file mode 100644 index 0000000..2f0ff12 --- /dev/null +++ b/snippets/read/set-quality/RecognizeBody.cs @@ -0,0 +1,56 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + + var request = new RecognizeBase64Request + { + FileBase64 = imageBase64, + RecognitionMode = RecognitionMode.Excellent, + BarcodeTypes = new List { DecodeBarcodeType.Pdf417 } + }; + + + BarcodeResponseList result = await recognizeApi.RecognizeBase64Async(request); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-quality/RecognizeGet.cs b/snippets/read/set-quality/RecognizeGet.cs new file mode 100644 index 0000000..0d85fbf --- /dev/null +++ b/snippets/read/set-quality/RecognizeGet.cs @@ -0,0 +1,44 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecgonizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + BarcodeResponseList result = await recognizeApi.RecognizeAsync(DecodeBarcodeType.QR, + "https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png", + recognitionMode: RecognitionMode.Fast, + recognitionImageKind: RecognitionImageKind.Photo); + + Console.WriteLine($"File recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-quality/RecognizeMultipart.cs b/snippets/read/set-quality/RecognizeMultipart.cs new file mode 100644 index 0000000..7e21493 --- /dev/null +++ b/snippets/read/set-quality/RecognizeMultipart.cs @@ -0,0 +1,50 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "aztec.png" + )); + + using var fileStream = File.OpenRead(fileName); + + BarcodeResponseList result = await recognizeApi.RecognizeMultipartAsync(DecodeBarcodeType.Aztec, fileStream, + recognitionMode: RecognitionMode.Normal, + recognitionImageKind: RecognitionImageKind.ScannedDocument + ); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/RecognizeBody.cs b/snippets/read/set-source/RecognizeBody.cs new file mode 100644 index 0000000..2e08d2d --- /dev/null +++ b/snippets/read/set-source/RecognizeBody.cs @@ -0,0 +1,54 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + + var request = new RecognizeBase64Request + { + BarcodeTypes = new List { DecodeBarcodeType.Pdf417 }, + FileBase64 = imageBase64 + }; + + var result = await recognizeApi.RecognizeBase64Async(request); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/RecognizeGet.cs b/snippets/read/set-source/RecognizeGet.cs new file mode 100644 index 0000000..4a55b57 --- /dev/null +++ b/snippets/read/set-source/RecognizeGet.cs @@ -0,0 +1,42 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecgonizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + var result = await recognizeApi.RecognizeAsync(DecodeBarcodeType.QR, + "https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png"); + + Console.WriteLine($"File recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/RecognizeMultipart.cs b/snippets/read/set-source/RecognizeMultipart.cs new file mode 100644 index 0000000..90e25a9 --- /dev/null +++ b/snippets/read/set-source/RecognizeMultipart.cs @@ -0,0 +1,48 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + using var fileStream = new FileStream(fileName, FileMode.Open); + + var result = await recognizeApi.RecognizeMultipartAsync(DecodeBarcodeType.QR, + fileStream); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/ScanBody.cs b/snippets/read/set-source/ScanBody.cs new file mode 100644 index 0000000..6cc7b1a --- /dev/null +++ b/snippets/read/set-source/ScanBody.cs @@ -0,0 +1,53 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace ScanSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var scanApi = new ScanApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + var request = new ScanBase64Request + { + FileBase64 = imageBase64 + }; + + var result = await scanApi.ScanBase64Async(request); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/ScanGet.cs b/snippets/read/set-source/ScanGet.cs new file mode 100644 index 0000000..24087df --- /dev/null +++ b/snippets/read/set-source/ScanGet.cs @@ -0,0 +1,41 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace ScanSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var scanApi = new ScanApi(MakeConfiguration()); + + var result = await scanApi.ScanAsync("https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png"); + + Console.WriteLine($"File recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-source/ScanMultipart.cs b/snippets/read/set-source/ScanMultipart.cs new file mode 100644 index 0000000..27df32a --- /dev/null +++ b/snippets/read/set-source/ScanMultipart.cs @@ -0,0 +1,47 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace ScanSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var scanApi = new ScanApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "qr.png" + )); + + using var fileStream = new FileStream(fileName, FileMode.Open); + + var result = await scanApi.ScanMultipartAsync(fileStream); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-target-types/RecognizeBody.cs b/snippets/read/set-target-types/RecognizeBody.cs new file mode 100644 index 0000000..7ae6bba --- /dev/null +++ b/snippets/read/set-target-types/RecognizeBody.cs @@ -0,0 +1,60 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "ManyTypes.png" + )); + + byte[] imageBytes = await File.ReadAllBytesAsync(fileName); + string imageBase64 = Convert.ToBase64String(imageBytes); + + + var request = new RecognizeBase64Request + { + BarcodeTypes = new List { DecodeBarcodeType.QR, DecodeBarcodeType.Code128 }, + FileBase64 = imageBase64 + }; + + BarcodeResponseList response = await recognizeApi.RecognizeBase64Async(request); + + Console.WriteLine($"File '{fileName}' recognized, results: "); + foreach (var result in response.Barcodes) + { + Console.WriteLine($"Value: '{result.BarcodeValue}', type: {result.Type}"); + } + + } +} diff --git a/snippets/read/set-target-types/RecognizeGet.cs b/snippets/read/set-target-types/RecognizeGet.cs new file mode 100644 index 0000000..a89988c --- /dev/null +++ b/snippets/read/set-target-types/RecognizeGet.cs @@ -0,0 +1,42 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecgonizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + var result = await recognizeApi.RecognizeAsync(DecodeBarcodeType.MostCommonlyUsed, + "https://products.aspose.app/barcode/scan/img/how-to/scan/step2.png"); + + Console.WriteLine($"File recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/snippets/read/set-target-types/RecognizeMultipart.cs b/snippets/read/set-target-types/RecognizeMultipart.cs new file mode 100644 index 0000000..c0f5539 --- /dev/null +++ b/snippets/read/set-target-types/RecognizeMultipart.cs @@ -0,0 +1,48 @@ +using Aspose.BarCode.Cloud.Sdk.Api; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Model; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +namespace RecognizeSnippets; + +internal static class Program +{ + private static Configuration MakeConfiguration() + { + var config = new Configuration(); + + string? envToken = Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ACCESS_TOKEN"); + if (string.IsNullOrEmpty(envToken)) + { + config.ClientId = "Client Id from https://dashboard.aspose.cloud/applications"; + config.ClientSecret = "Client Secret from https://dashboard.aspose.cloud/applications"; + } + else + { + config.JwtToken = envToken; + } + + return config; + } + + public static async Task Main(string[] args) + { + var recognizeApi = new RecognizeApi(MakeConfiguration()); + + string fileName = Path.GetFullPath(Path.Join("Tests", "test_data", + "Pdf417.png" + )); + + using var fileStream = new FileStream(fileName, FileMode.Open); + + var result = await recognizeApi.RecognizeMultipartAsync(DecodeBarcodeType.Pdf417, + fileStream); + + Console.WriteLine($"File '{fileName}' recognized, result: '{result.Barcodes[0].BarcodeValue}'"); + } +} diff --git a/src/Api/BarcodeApi.cs b/src/Api/BarcodeApi.cs deleted file mode 100644 index 2dce4ef..0000000 --- a/src/Api/BarcodeApi.cs +++ /dev/null @@ -1,857 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; -using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Api -{ - /// - /// BarcodeApi - /// - public class BarcodeApi : IBarcodeApi - { - private readonly ApiInvoker _apiInvoker; - private readonly Configuration _configuration; - - - /// - /// Initializes a new instance of the class. - /// - /// Configuration settings - public BarcodeApi(Configuration configuration) - { - _configuration = configuration; - - List requestHandlers = new List(); - switch (_configuration.AuthType) - { - case AuthType.JWT: - requestHandlers.Add(new JwtRequestHandler(_configuration)); - break; - case AuthType.ExternalAuth: - requestHandlers.Add(new ExternalAuthorizationRequestHandler(_configuration)); - break; - default: - throw new System.ArgumentOutOfRangeException($"Unknown AuthType={_configuration.AuthType}."); - } - - requestHandlers.Add(new DebugLogRequestHandler(_configuration)); - requestHandlers.Add(new ApiExceptionRequestHandler()); - _apiInvoker = new ApiInvoker(configuration, requestHandlers); - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Client Secret. - /// - /// - /// The Client Id. - /// - public BarcodeApi(string clientSecret, string clientId) - : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) - { - } - - /// - /// Generate barcode. - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task GetBarcodeGenerateAsync(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("&", "&") - .Replace("/?", "?"); -#pragma warning disable CS0618 // Type or member is obsolete - 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, "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, "useAntiAlias", request.UseAntiAlias); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format); -#pragma warning restore CS0618 // Type or member is obsolete - - return await _apiInvoker.InvokeBinaryApiAsync( - resourcePath, - "GET", - null, - null, - null); - } - - /// - /// Recognize barcode from a file on server. - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task GetBarcodeRecognizeAsync(GetBarcodeRecognizeRequest request) - { - // verify the required parameter 'name' is set - if (request.name == null) - { - throw new ApiException(400, "Missing required parameter 'name' when calling GetBarcodeRecognize"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/{name}/recognize"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.name); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "type", request.Type); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "types", request.Types); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "checksumValidation", request.ChecksumValidation); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "detectEncoding", request.DetectEncoding); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "preset", request.Preset); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectX", request.RectX); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectY", request.RectY); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectWidth", request.RectWidth); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectHeight", request.RectHeight); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "stripFNC", request.StripFNC); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "timeout", request.Timeout); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "medianSmoothingWindowSize", request.MedianSmoothingWindowSize); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowMedianSmoothing", request.AllowMedianSmoothing); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowComplexBackground", request.AllowComplexBackground); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDatamatrixIndustrialBarcodes", request.AllowDatamatrixIndustrialBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDecreasedImage", request.AllowDecreasedImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDetectScanGap", request.AllowDetectScanGap); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowIncorrectBarcodes", request.AllowIncorrectBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowInvertImage", request.AllowInvertImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowMicroWhiteSpotsRemoving", request.AllowMicroWhiteSpotsRemoving); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowOneDFastBarcodesDetector", request.AllowOneDFastBarcodesDetector); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowOneDWipedBarsRestoration", request.AllowOneDWipedBarsRestoration); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowQRMicroQrRestoration", request.AllowQRMicroQrRestoration); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowRegularImage", request.AllowRegularImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowSaltAndPepperFiltering", request.AllowSaltAndPepperFiltering); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowWhiteSpotsRemoving", request.AllowWhiteSpotsRemoving); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "checkMore1DVariants", request.CheckMore1DVariants); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fastScanOnly", request.FastScanOnly); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowAdditionalRestorations", request.AllowAdditionalRestorations); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "regionLikelihoodThresholdPercent", request.RegionLikelihoodThresholdPercent); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "scanWindowSizes", request.ScanWindowSizes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "similarity", request.Similarity); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "skipDiagonalSearch", request.SkipDiagonalSearch); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "readTinyBarcodes", request.ReadTinyBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "australianPostEncodingTable", request.AustralianPostEncodingTable); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "ignoreEndingFillingPatternsForCTable", request.IgnoreEndingFillingPatternsForCTable); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder); -#pragma warning restore CS0618 // Type or member is obsolete - - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "GET", - null, - null, - null); - - return response == null ? null : (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)); - - - } - - /// - /// Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field. - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task PostBarcodeRecognizeFromUrlOrContentAsync(PostBarcodeRecognizeFromUrlOrContentRequest request) - { - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/recognize"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - MultipartFormDataContent formParams = new MultipartFormDataContent(); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "type", request.Type); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "types", request.Types); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "checksumValidation", request.ChecksumValidation); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "detectEncoding", request.DetectEncoding); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "preset", request.Preset); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectX", request.RectX); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectY", request.RectY); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectWidth", request.RectWidth); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectHeight", request.RectHeight); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "stripFNC", request.StripFNC); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "timeout", request.Timeout); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "medianSmoothingWindowSize", request.MedianSmoothingWindowSize); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowMedianSmoothing", request.AllowMedianSmoothing); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowComplexBackground", request.AllowComplexBackground); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDatamatrixIndustrialBarcodes", request.AllowDatamatrixIndustrialBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDecreasedImage", request.AllowDecreasedImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowDetectScanGap", request.AllowDetectScanGap); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowIncorrectBarcodes", request.AllowIncorrectBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowInvertImage", request.AllowInvertImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowMicroWhiteSpotsRemoving", request.AllowMicroWhiteSpotsRemoving); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowOneDFastBarcodesDetector", request.AllowOneDFastBarcodesDetector); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowOneDWipedBarsRestoration", request.AllowOneDWipedBarsRestoration); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowQRMicroQrRestoration", request.AllowQRMicroQrRestoration); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowRegularImage", request.AllowRegularImage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowSaltAndPepperFiltering", request.AllowSaltAndPepperFiltering); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowWhiteSpotsRemoving", request.AllowWhiteSpotsRemoving); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "checkMore1DVariants", request.CheckMore1DVariants); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fastScanOnly", request.FastScanOnly); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "allowAdditionalRestorations", request.AllowAdditionalRestorations); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "regionLikelihoodThresholdPercent", request.RegionLikelihoodThresholdPercent); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "scanWindowSizes", request.ScanWindowSizes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "similarity", request.Similarity); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "skipDiagonalSearch", request.SkipDiagonalSearch); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "readTinyBarcodes", request.ReadTinyBarcodes); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "australianPostEncodingTable", request.AustralianPostEncodingTable); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "ignoreEndingFillingPatternsForCTable", request.IgnoreEndingFillingPatternsForCTable); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "url", request.url); -#pragma warning restore CS0618 // Type or member is obsolete - - if (request.image != null) - { - formParams.Add(new StreamContent(request.image), "image", "image.png"); - } - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "POST", - null, - null, - formParams); - - return response == null ? null : (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)); - - - } - - /// - /// Generate multiple barcodes and return in response stream - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task PostGenerateMultipleAsync(PostGenerateMultipleRequest request) - { - // verify the required parameter 'generatorParamsList' is set - if (request.generatorParamsList == null) - { - throw new ApiException(400, "Missing required parameter 'generatorParamsList' when calling PostGenerateMultiple"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/generateMultiple"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format); -#pragma warning restore CS0618 // Type or member is obsolete - string postBody = SerializationHelper.Serialize(request.generatorParamsList); // http body (model) parameter - return await _apiInvoker.InvokeBinaryApiAsync( - resourcePath, - "POST", - postBody, - null, - null); - } - - /// - /// Generate barcode and save on server (from query params or from file with json or xml content) - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task PutBarcodeGenerateFileAsync(PutBarcodeGenerateFileRequest request) - { - // verify the required parameter 'name' is set - if (request.name == null) - { - throw new ApiException(400, "Missing required parameter 'name' when calling PutBarcodeGenerateFile"); - } - // verify the required parameter 'type' is set - if (request.Type == null) - { - throw new ApiException(400, "Missing required parameter 'type' when calling PutBarcodeGenerateFile"); - } - // verify the required parameter 'text' is set - if (request.Text == null) - { - throw new ApiException(400, "Missing required parameter 'text' when calling PutBarcodeGenerateFile"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/{name}/generate"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.name); -#pragma warning disable CS0618 // Type or member is obsolete - 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, "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, "useAntiAlias", request.UseAntiAlias); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format); -#pragma warning restore CS0618 // Type or member is obsolete - - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - - return response == null ? null : (ResultImageInfo)SerializationHelper.Deserialize(response, typeof(ResultImageInfo)); - - - } - - /// - /// Recognition of a barcode from file on server with parameters in body. - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task PutBarcodeRecognizeFromBodyAsync(PutBarcodeRecognizeFromBodyRequest request) - { - // verify the required parameter 'name' is set - if (request.name == null) - { - throw new ApiException(400, "Missing required parameter 'name' when calling PutBarcodeRecognizeFromBody"); - } - // verify the required parameter 'readerParams' is set - if (request.readerParams == null) - { - throw new ApiException(400, "Missing required parameter 'readerParams' when calling PutBarcodeRecognizeFromBody"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/{name}/recognize"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.name); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "type", request.type); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder); -#pragma warning restore CS0618 // Type or member is obsolete - string postBody = SerializationHelper.Serialize(request.readerParams); // http body (model) parameter - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - postBody, - null, - null); - - return response == null ? null : (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)); - - - } - - /// - /// Generate image with multiple barcodes and put new file on server - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task PutGenerateMultipleAsync(PutGenerateMultipleRequest request) - { - // verify the required parameter 'name' is set - if (request.name == null) - { - throw new ApiException(400, "Missing required parameter 'name' when calling PutGenerateMultiple"); - } - // verify the required parameter 'generatorParamsList' is set - if (request.generatorParamsList == null) - { - throw new ApiException(400, "Missing required parameter 'generatorParamsList' when calling PutGenerateMultiple"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/{name}/generateMultiple"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.name); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage); -#pragma warning restore CS0618 // Type or member is obsolete - string postBody = SerializationHelper.Serialize(request.generatorParamsList); // http body (model) parameter - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - postBody, - null, - null); - - return response == null ? null : (ResultImageInfo)SerializationHelper.Deserialize(response, typeof(ResultImageInfo)); - - - } - - /// - /// Quickly scan a barcode from an image. - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task ScanBarcodeAsync(ScanBarcodeRequest request) - { - // verify the required parameter 'imageFile' is set - if (request.imageFile == null) - { - throw new ApiException(400, "Missing required parameter 'imageFile' when calling ScanBarcode"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/scan"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - MultipartFormDataContent formParams = new MultipartFormDataContent(); - - - - - if (request.imageFile != null) - { - formParams.Add(new StreamContent(request.imageFile), "imageFile", "imageFile.png"); - } - if (request.decodeTypes != null) - { - foreach (DecodeBarcodeType oneParam in request.decodeTypes) - { - formParams.Add(new StringContent(oneParam.ToString()), "decodeTypes"); - } - } - if (request.timeout != null) - { - formParams.Add(new StringContent($"{request.timeout}"), "timeout"); - } - if (request.checksumValidation != null) - { - formParams.Add(new StringContent($"{request.checksumValidation}"), "checksumValidation"); - } - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "POST", - null, - null, - formParams); - - return response == null ? null : (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)); - - - } - } -} diff --git a/src/Api/Configuration.cs b/src/Api/Configuration.cs index 822ff0c..06a82bb 100644 --- a/src/Api/Configuration.cs +++ b/src/Api/Configuration.cs @@ -17,9 +17,9 @@ public Configuration() { ApiBaseUrl = "https://api.aspose.cloud"; DebugMode = false; - ApiVersion = "3.0"; + ApiVersion = "4.0"; AuthType = AuthType.JWT; - TokenUrl = "https://api.aspose.cloud/connect/token"; + TokenUrl = "https://id.aspose.cloud/connect/token"; DefaultHeaders = new Dictionary(); } diff --git a/src/Api/FileApi.cs b/src/Api/FileApi.cs deleted file mode 100644 index 7f59443..0000000 --- a/src/Api/FileApi.cs +++ /dev/null @@ -1,300 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; -using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Api -{ - /// - /// FileApi - /// - public class FileApi : IFileApi - { - private readonly ApiInvoker _apiInvoker; - private readonly Configuration _configuration; - - - /// - /// Initializes a new instance of the class. - /// - /// Configuration settings - public FileApi(Configuration configuration) - { - _configuration = configuration; - - List requestHandlers = new List(); - switch (_configuration.AuthType) - { - case AuthType.JWT: - requestHandlers.Add(new JwtRequestHandler(_configuration)); - break; - case AuthType.ExternalAuth: - requestHandlers.Add(new ExternalAuthorizationRequestHandler(_configuration)); - break; - default: - throw new System.ArgumentOutOfRangeException($"Unknown AuthType={_configuration.AuthType}."); - } - - requestHandlers.Add(new DebugLogRequestHandler(_configuration)); - requestHandlers.Add(new ApiExceptionRequestHandler()); - _apiInvoker = new ApiInvoker(configuration, requestHandlers); - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Client Secret. - /// - /// - /// The Client Id. - /// - public FileApi(string clientSecret, string clientId) - : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) - { - } - - /// - /// Copy file - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task CopyFileAsync(CopyFileRequest request) - { - // verify the required parameter 'srcPath' is set - if (request.srcPath == null) - { - throw new ApiException(400, "Missing required parameter 'srcPath' when calling CopyFile"); - } - // verify the required parameter 'destPath' is set - if (request.destPath == null) - { - throw new ApiException(400, "Missing required parameter 'destPath' when calling CopyFile"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/file/copy/{srcPath}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "srcPath", request.srcPath); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destPath", request.destPath); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "srcStorageName", request.srcStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - } - - /// - /// Delete file - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task DeleteFileAsync(DeleteFileRequest request) - { - // verify the required parameter 'path' is set - if (request.path == null) - { - throw new ApiException(400, "Missing required parameter 'path' when calling DeleteFile"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/file/{path}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "DELETE", - null, - null, - null); - } - - /// - /// Download file - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task DownloadFileAsync(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("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId); -#pragma warning restore CS0618 // Type or member is obsolete - - return await _apiInvoker.InvokeBinaryApiAsync( - resourcePath, - "GET", - null, - null, - null); - } - - /// - /// Move file - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task MoveFileAsync(MoveFileRequest request) - { - // verify the required parameter 'srcPath' is set - if (request.srcPath == null) - { - throw new ApiException(400, "Missing required parameter 'srcPath' when calling MoveFile"); - } - // verify the required parameter 'destPath' is set - if (request.destPath == null) - { - throw new ApiException(400, "Missing required parameter 'destPath' when calling MoveFile"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/file/move/{srcPath}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "srcPath", request.srcPath); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destPath", request.destPath); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "srcStorageName", request.srcStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - } - - /// - /// Upload file - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task UploadFileAsync(UploadFileRequest request) - { - // verify the required parameter 'path' is set - if (request.path == null) - { - throw new ApiException(400, "Missing required parameter 'path' when calling UploadFile"); - } - // verify the required parameter '_file' is set - if (request.File == null) - { - throw new ApiException(400, "Missing required parameter '_file' when calling UploadFile"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/file/{path}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - MultipartFormDataContent formParams = new MultipartFormDataContent(); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); -#pragma warning restore CS0618 // Type or member is obsolete - - if (request.File != null) - { - formParams.Add(new StreamContent(request.File), "File", "_file.png"); - } - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - formParams); - - return response == null ? null : (FilesUploadResult)SerializationHelper.Deserialize(response, typeof(FilesUploadResult)); - - - } - } -} diff --git a/src/Api/FolderApi.cs b/src/Api/FolderApi.cs deleted file mode 100644 index 0250a0d..0000000 --- a/src/Api/FolderApi.cs +++ /dev/null @@ -1,281 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; -using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Api -{ - /// - /// FolderApi - /// - public class FolderApi : IFolderApi - { - private readonly ApiInvoker _apiInvoker; - private readonly Configuration _configuration; - - - /// - /// Initializes a new instance of the class. - /// - /// Configuration settings - public FolderApi(Configuration configuration) - { - _configuration = configuration; - - List requestHandlers = new List(); - switch (_configuration.AuthType) - { - case AuthType.JWT: - requestHandlers.Add(new JwtRequestHandler(_configuration)); - break; - case AuthType.ExternalAuth: - requestHandlers.Add(new ExternalAuthorizationRequestHandler(_configuration)); - break; - default: - throw new System.ArgumentOutOfRangeException($"Unknown AuthType={_configuration.AuthType}."); - } - - requestHandlers.Add(new DebugLogRequestHandler(_configuration)); - requestHandlers.Add(new ApiExceptionRequestHandler()); - _apiInvoker = new ApiInvoker(configuration, requestHandlers); - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Client Secret. - /// - /// - /// The Client Id. - /// - public FolderApi(string clientSecret, string clientId) - : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) - { - } - - /// - /// Copy folder - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task CopyFolderAsync(CopyFolderRequest request) - { - // verify the required parameter 'srcPath' is set - if (request.srcPath == null) - { - throw new ApiException(400, "Missing required parameter 'srcPath' when calling CopyFolder"); - } - // verify the required parameter 'destPath' is set - if (request.destPath == null) - { - throw new ApiException(400, "Missing required parameter 'destPath' when calling CopyFolder"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/folder/copy/{srcPath}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "srcPath", request.srcPath); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destPath", request.destPath); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "srcStorageName", request.srcStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - } - - /// - /// Create the folder - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task CreateFolderAsync(CreateFolderRequest request) - { - // verify the required parameter 'path' is set - if (request.path == null) - { - throw new ApiException(400, "Missing required parameter 'path' when calling CreateFolder"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/folder/{path}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - } - - /// - /// Delete folder - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task DeleteFolderAsync(DeleteFolderRequest request) - { - // verify the required parameter 'path' is set - if (request.path == null) - { - throw new ApiException(400, "Missing required parameter 'path' when calling DeleteFolder"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/folder/{path}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "recursive", request.recursive); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "DELETE", - null, - null, - null); - } - - /// - /// Get all files and folders within a folder - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task GetFilesListAsync(GetFilesListRequest request) - { - // verify the required parameter 'path' is set - if (request.path == null) - { - throw new ApiException(400, "Missing required parameter 'path' when calling GetFilesList"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/folder/{path}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); -#pragma warning restore CS0618 // Type or member is obsolete - - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "GET", - null, - null, - null); - - return response == null ? null : (FilesList)SerializationHelper.Deserialize(response, typeof(FilesList)); - - - } - - /// - /// Move folder - /// - /// Request. - /// - /// A task that represents the asynchronous operation. - /// - public async Task MoveFolderAsync(MoveFolderRequest request) - { - // verify the required parameter 'srcPath' is set - if (request.srcPath == null) - { - throw new ApiException(400, "Missing required parameter 'srcPath' when calling MoveFolder"); - } - // verify the required parameter 'destPath' is set - if (request.destPath == null) - { - throw new ApiException(400, "Missing required parameter 'destPath' when calling MoveFolder"); - } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/folder/move/{srcPath}"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "srcPath", request.srcPath); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destPath", request.destPath); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "srcStorageName", request.srcStorageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName); -#pragma warning restore CS0618 // Type or member is obsolete - - await _apiInvoker.InvokeApiAsync( - resourcePath, - "PUT", - null, - null, - null); - } - } -} diff --git a/src/Api/GenerateApi.cs b/src/Api/GenerateApi.cs new file mode 100644 index 0000000..46eed95 --- /dev/null +++ b/src/Api/GenerateApi.cs @@ -0,0 +1,292 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2025 Aspose.BarCode for Cloud +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Net.Http; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Internal; +using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; +using Aspose.BarCode.Cloud.Sdk.Model; + + +namespace Aspose.BarCode.Cloud.Sdk.Api +{ + /// + /// GenerateApi + /// + public class GenerateApi : IGenerateApi + { + private readonly ApiInvoker _apiInvoker; + private readonly Configuration _configuration; + + + /// + /// Initializes a new instance of the class. + /// + /// Configuration settings + public GenerateApi(Configuration configuration) + { + _configuration = configuration; + + List requestHandlers = new List(); + switch (_configuration.AuthType) + { + case AuthType.JWT: + requestHandlers.Add(new JwtRequestHandler(_configuration)); + break; + case AuthType.ExternalAuth: + requestHandlers.Add(new ExternalAuthorizationRequestHandler(_configuration)); + break; + default: + throw new System.ArgumentOutOfRangeException($"Unknown AuthType={_configuration.AuthType}."); + } + + requestHandlers.Add(new DebugLogRequestHandler(_configuration)); + requestHandlers.Add(new ApiExceptionRequestHandler()); + _apiInvoker = new ApiInvoker(configuration, requestHandlers); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The Client Secret. + /// + /// + /// The Client Id. + /// + public GenerateApi(string clientSecret, string clientId) + : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) + { + } + /// + /// Generate barcode using GET request with parameters in route and query string. + /// + /// Type of barcode to generate. + /// String represents data to encode + /// Type of data to encode. Default value: StringData. (optional) + /// Barcode output image format. Default value: png (optional) + /// Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. (optional) + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. (optional, default to "Black") + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. (optional, default to "White") + /// Common Units for all measuring in query. Default units: pixel. (optional) + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. (optional) + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. (optional) + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. (optional) + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. (optional) + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task GenerateAsync(EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = default, BarcodeImageFormat? imageFormat = default, CodeLocation? textLocation = default, string foregroundColor = default, string backgroundColor = default, GraphicsUnit? units = default, float? resolution = default, float? imageHeight = default, float? imageWidth = default, int? rotationAngle = default, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'data' is set + if (data == null) + { + throw new ApiException(400, "Missing required parameter 'data' when calling Generate"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/generate/{barcodeType}"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); + resourcePath = UrlHelper.AddPathParameter(resourcePath, "barcodeType", barcodeType); +#pragma warning disable CS0618 // Type or member is obsolete + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "dataType", dataType); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "data", data); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "imageFormat", imageFormat); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "textLocation", textLocation); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "foregroundColor", foregroundColor); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "backgroundColor", backgroundColor); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "units", units); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "resolution", resolution); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "imageHeight", imageHeight); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "imageWidth", imageWidth); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rotationAngle", rotationAngle); +#pragma warning restore CS0618 // Type or member is obsolete + + + return await _apiInvoker.InvokeBinaryApiAsync( + resourcePath, + "GET", + null, + null, + null); + } + /// + /// Generate barcode using POST request with parameters in body in json or xml format. + /// + /// Parameters of generation + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task GenerateBodyAsync(GenerateParams generateParams, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'generateParams' is set + if (generateParams == null) + { + throw new ApiException(400, "Missing required parameter 'generateParams' when calling GenerateBody"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/generate-body"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); + string postBody = SerializationHelper.Serialize(generateParams); // http body (model) parameter + + return await _apiInvoker.InvokeBinaryApiAsync( + resourcePath, + "POST", + postBody, + null, + null); + } + /// + /// Generate barcode using POST request with parameters in multipart form. + /// + /// + /// String represents data to encode + /// (optional) + /// (optional) + /// (optional) + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. (optional, default to "Black") + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. (optional, default to "White") + /// (optional) + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. (optional) + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. (optional) + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. (optional) + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. (optional) + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task GenerateMultipartAsync(EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = default, BarcodeImageFormat? imageFormat = default, CodeLocation? textLocation = default, string foregroundColor = default, string backgroundColor = default, GraphicsUnit? units = default, float? resolution = default, float? imageHeight = default, float? imageWidth = default, int? rotationAngle = default, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'data' is set + if (data == null) + { + throw new ApiException(400, "Missing required parameter 'data' when calling GenerateMultipart"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/generate-multipart"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); + MultipartFormDataContent multipartContent = new MultipartFormDataContent(); + + multipartContent.Add(new StringContent($"{barcodeType}"), "barcodeType"); + + + if (dataType != null) + { + multipartContent.Add(new StringContent($"{dataType}"), "dataType"); + } + + if (data != null) + { + multipartContent.Add(new StringContent($"{data}"), "data"); + } + + if (imageFormat != null) + { + multipartContent.Add(new StringContent($"{imageFormat}"), "imageFormat"); + } + + if (textLocation != null) + { + multipartContent.Add(new StringContent($"{textLocation}"), "textLocation"); + } + + if (foregroundColor != null) + { + multipartContent.Add(new StringContent($"{foregroundColor}"), "foregroundColor"); + } + + if (backgroundColor != null) + { + multipartContent.Add(new StringContent($"{backgroundColor}"), "backgroundColor"); + } + + if (units != null) + { + multipartContent.Add(new StringContent($"{units}"), "units"); + } + + if (resolution != null) + { + multipartContent.Add(new StringContent($"{resolution}"), "resolution"); + } + + if (imageHeight != null) + { + multipartContent.Add(new StringContent($"{imageHeight}"), "imageHeight"); + } + + if (imageWidth != null) + { + multipartContent.Add(new StringContent($"{imageWidth}"), "imageWidth"); + } + + if (rotationAngle != null) + { + multipartContent.Add(new StringContent($"{rotationAngle}"), "rotationAngle"); + } + + + return await _apiInvoker.InvokeBinaryApiAsync( + resourcePath, + "POST", + null, + null, + multipartContent); + } + } +} diff --git a/src/Api/RecognizeApi.cs b/src/Api/RecognizeApi.cs new file mode 100644 index 0000000..1893366 --- /dev/null +++ b/src/Api/RecognizeApi.cs @@ -0,0 +1,228 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2025 Aspose.BarCode for Cloud +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Net.Http; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Internal; +using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; +using Aspose.BarCode.Cloud.Sdk.Model; + + +namespace Aspose.BarCode.Cloud.Sdk.Api +{ + /// + /// RecognizeApi + /// + public class RecognizeApi : IRecognizeApi + { + private readonly ApiInvoker _apiInvoker; + private readonly Configuration _configuration; + + + /// + /// Initializes a new instance of the class. + /// + /// Configuration settings + public RecognizeApi(Configuration configuration) + { + _configuration = configuration; + + List requestHandlers = new List(); + switch (_configuration.AuthType) + { + case AuthType.JWT: + requestHandlers.Add(new JwtRequestHandler(_configuration)); + break; + case AuthType.ExternalAuth: + requestHandlers.Add(new ExternalAuthorizationRequestHandler(_configuration)); + break; + default: + throw new System.ArgumentOutOfRangeException($"Unknown AuthType={_configuration.AuthType}."); + } + + requestHandlers.Add(new DebugLogRequestHandler(_configuration)); + requestHandlers.Add(new ApiExceptionRequestHandler()); + _apiInvoker = new ApiInvoker(configuration, requestHandlers); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The Client Secret. + /// + /// + /// The Client Id. + /// + public RecognizeApi(string clientSecret, string clientId) + : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) + { + } + /// + /// Recognize barcode from file on server using GET requests with parameters in route and query string. + /// + /// Type of barcode to recognize + /// Url to barcode image + /// Recognition mode (optional) + /// Image kind for recognition (optional) + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task RecognizeAsync(DecodeBarcodeType barcodeType, string fileUrl, RecognitionMode? recognitionMode = default, RecognitionImageKind? recognitionImageKind = default, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'fileUrl' is set + if (fileUrl == null) + { + throw new ApiException(400, "Missing required parameter 'fileUrl' when calling Recognize"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/recognize"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); +#pragma warning disable CS0618 // Type or member is obsolete + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "barcodeType", barcodeType); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fileUrl", fileUrl); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "recognitionMode", recognitionMode); + + + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "recognitionImageKind", recognitionImageKind); +#pragma warning restore CS0618 // Type or member is obsolete + + + string response = await _apiInvoker.InvokeApiAsync( + resourcePath, + "GET", + null, + null, + null); + + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; + + + } + /// + /// Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. + /// + /// Barcode recognition request + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task RecognizeBase64Async(RecognizeBase64Request recognizeBase64Request, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'recognizeBase64Request' is set + if (recognizeBase64Request == null) + { + throw new ApiException(400, "Missing required parameter 'recognizeBase64Request' when calling RecognizeBase64"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/recognize-body"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); + string postBody = SerializationHelper.Serialize(recognizeBase64Request); // http body (model) parameter + + string response = await _apiInvoker.InvokeApiAsync( + resourcePath, + "POST", + postBody, + null, + null); + + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; + + + } + /// + /// Recognize barcode from file in request body using POST requests with parameters in multipart form. + /// + /// + /// Barcode image file + /// (optional) + /// (optional) + /// + /// + /// A task that represents the asynchronous operation. Task result type is + /// + public async Task RecognizeMultipartAsync(DecodeBarcodeType barcodeType, System.IO.Stream file, RecognitionMode? recognitionMode = default, RecognitionImageKind? recognitionImageKind = default, System.Threading.CancellationToken cancellationToken = default) + { + // verify the required parameter 'file' is set + if (file == null) + { + throw new ApiException(400, "Missing required parameter 'file' when calling RecognizeMultipart"); + } + // create path and map variables + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/recognize-multipart"; + resourcePath = Regex + .Replace(resourcePath, "\\*", string.Empty) + .Replace("&", "&") + .Replace("/?", "?"); + MultipartFormDataContent multipartContent = new MultipartFormDataContent(); + + multipartContent.Add(new StringContent($"{barcodeType}"), "barcodeType"); + + + if (file != null) + { + + multipartContent.Add(new StreamContent(file), "file", "file.png"); + + } + + if (recognitionMode != null) + { + multipartContent.Add(new StringContent($"{recognitionMode}"), "recognitionMode"); + } + + if (recognitionImageKind != null) + { + multipartContent.Add(new StringContent($"{recognitionImageKind}"), "recognitionImageKind"); + } + + + string response = await _apiInvoker.InvokeApiAsync( + resourcePath, + "POST", + null, + null, + multipartContent); + + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; + + + } + } +} diff --git a/src/Api/StorageApi.cs b/src/Api/ScanApi.cs similarity index 56% rename from src/Api/StorageApi.cs rename to src/Api/ScanApi.cs index 4caf407..00a6571 100644 --- a/src/Api/StorageApi.cs +++ b/src/Api/ScanApi.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // Copyright (c) 2025 Aspose.BarCode for Cloud // // @@ -31,24 +31,24 @@ using Aspose.BarCode.Cloud.Sdk.Internal; using Aspose.BarCode.Cloud.Sdk.Internal.RequestHandlers; using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; + namespace Aspose.BarCode.Cloud.Sdk.Api { /// - /// StorageApi + /// ScanApi /// - public class StorageApi : IStorageApi + public class ScanApi : IScanApi { private readonly ApiInvoker _apiInvoker; private readonly Configuration _configuration; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Configuration settings - public StorageApi(Configuration configuration) + public ScanApi(Configuration configuration) { _configuration = configuration; @@ -71,7 +71,7 @@ public StorageApi(Configuration configuration) } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The Client Secret. @@ -79,30 +79,36 @@ public StorageApi(Configuration configuration) /// /// The Client Id. /// - public StorageApi(string clientSecret, string clientId) + public ScanApi(string clientSecret, string clientId) : this(new Configuration { ClientSecret = clientSecret, ClientId = clientId }) { } - /// - /// Get disc usage + /// Scan barcode from file on server using GET requests with parameter in query string. /// - /// Request. + /// Url to barcode image + /// /// - /// A task that represents the asynchronous operation. Task result type is + /// A task that represents the asynchronous operation. Task result type is /// - public async Task GetDiscUsageAsync(GetDiscUsageRequest request) + public async Task ScanAsync(string fileUrl, System.Threading.CancellationToken cancellationToken = default) { + // verify the required parameter 'fileUrl' is set + if (fileUrl == null) + { + throw new ApiException(400, "Missing required parameter 'fileUrl' when calling Scan"); + } // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/disc"; + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/scan"; resourcePath = Regex .Replace(resourcePath, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); #pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); + resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fileUrl", fileUrl); #pragma warning restore CS0618 // Type or member is obsolete + string response = await _apiInvoker.InvokeApiAsync( resourcePath, "GET", @@ -110,118 +116,82 @@ public async Task GetDiscUsageAsync(GetDiscUsageRequest request) null, null); - return response == null ? null : (DiscUsage)SerializationHelper.Deserialize(response, typeof(DiscUsage)); + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; } - /// - /// Get file versions + /// Scan barcode from file in request body using POST requests with parameter in body in json or xml format. /// - /// Request. + /// Barcode scan request + /// /// - /// A task that represents the asynchronous operation. Task result type is + /// A task that represents the asynchronous operation. Task result type is /// - public async Task GetFileVersionsAsync(GetFileVersionsRequest request) + public async Task ScanBase64Async(ScanBase64Request scanBase64Request, System.Threading.CancellationToken cancellationToken = default) { - // verify the required parameter 'path' is set - if (request.path == null) + // verify the required parameter 'scanBase64Request' is set + if (scanBase64Request == null) { - throw new ApiException(400, "Missing required parameter 'path' when calling GetFileVersions"); + throw new ApiException(400, "Missing required parameter 'scanBase64Request' when calling ScanBase64"); } // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/version/{path}"; + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/scan-body"; resourcePath = Regex .Replace(resourcePath, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); -#pragma warning restore CS0618 // Type or member is obsolete + string postBody = SerializationHelper.Serialize(scanBase64Request); // http body (model) parameter string response = await _apiInvoker.InvokeApiAsync( resourcePath, - "GET", - null, + "POST", + postBody, null, null); - return response == null ? null : (FileVersions)SerializationHelper.Deserialize(response, typeof(FileVersions)); + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; } - /// - /// Check if file or folder exists + /// Scan barcode from file in request body using POST requests with parameter in multipart form. /// - /// Request. + /// Barcode image file + /// /// - /// A task that represents the asynchronous operation. Task result type is + /// A task that represents the asynchronous operation. Task result type is /// - public async Task ObjectExistsAsync(ObjectExistsRequest request) + public async Task ScanMultipartAsync(System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default) { - // verify the required parameter 'path' is set - if (request.path == null) + // verify the required parameter 'file' is set + if (file == null) { - throw new ApiException(400, "Missing required parameter 'path' when calling ObjectExists"); + throw new ApiException(400, "Missing required parameter 'file' when calling ScanMultipart"); } // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/exist/{path}"; + string resourcePath = _configuration.GetApiRootUrl() + "/barcode/scan-multipart"; resourcePath = Regex .Replace(resourcePath, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path); -#pragma warning disable CS0618 // Type or member is obsolete - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName); - - - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId); -#pragma warning restore CS0618 // Type or member is obsolete - - string response = await _apiInvoker.InvokeApiAsync( - resourcePath, - "GET", - null, - null, - null); - - return response == null ? null : (ObjectExist)SerializationHelper.Deserialize(response, typeof(ObjectExist)); - + MultipartFormDataContent multipartContent = new MultipartFormDataContent(); + if (file != null) + { - } + multipartContent.Add(new StreamContent(file), "file", "file.png"); - /// - /// Check if storage exists - /// - /// Request. - /// - /// A task that represents the asynchronous operation. Task result type is - /// - public async Task StorageExistsAsync(StorageExistsRequest request) - { - // verify the required parameter 'storageName' is set - if (request.storageName == null) - { - throw new ApiException(400, "Missing required parameter 'storageName' when calling StorageExists"); } - // create path and map variables - string resourcePath = _configuration.GetApiRootUrl() + "/barcode/storage/{storageName}/exist"; - resourcePath = Regex - .Replace(resourcePath, "\\*", string.Empty) - .Replace("&", "&") - .Replace("/?", "?"); - resourcePath = UrlHelper.AddPathParameter(resourcePath, "storageName", request.storageName); + string response = await _apiInvoker.InvokeApiAsync( resourcePath, - "GET", + "POST", null, null, - null); + multipartContent); - return response == null ? null : (StorageExist)SerializationHelper.Deserialize(response, typeof(StorageExist)); + return response != null ? (BarcodeResponseList)SerializationHelper.Deserialize(response, typeof(BarcodeResponseList)) : null; } diff --git a/src/Aspose.BarCode.Cloud.Sdk.csproj b/src/Aspose.BarCode.Cloud.Sdk.csproj index 76c482f..cd57ff1 100644 --- a/src/Aspose.BarCode.Cloud.Sdk.csproj +++ b/src/Aspose.BarCode.Cloud.Sdk.csproj @@ -3,7 +3,7 @@ netstandard2.0 true - IDE0005;IDE1006 + IDE0005;IDE0028;IDE1006; true latest-Recommended @@ -19,16 +19,16 @@ Aspose.Barcode for Cloud allows you to control all aspects of the image and barc true embedded Barcode Scan Recognize Generate QR DataMatrix AustraliaPost VIN MSI Aztec ISBN OPC Postnet Aspose Aspose.BarCode Aspose.BarCode-Cloud EAN13 ISSN PZN SingaporePost UPCA UPCE Code11 Code128 Code32 DotCode EAN14 EAN8 GS1DataMatrix - © Aspose Pty Ltd 2001-2025. All Rights Reserved. + © Aspose Pty Ltd 2001-2024. All Rights Reserved. true Aspose.BarCode-Cloud Aspose.BarCode Cloud SDK for .NET PackageIcon.png - 24.12.0 + 25.1.0 Aspose - 24.12.0.0 + 25.1.0.0 README.md - https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/releases/tag/v24.12.0 + https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/releases/tag/v25.1.0 true LICENSE.txt true diff --git a/src/GlobalSuppressions.cs b/src/GlobalSuppressions.cs index 7ddcfed..7bdc2f8 100644 --- a/src/GlobalSuppressions.cs +++ b/src/GlobalSuppressions.cs @@ -5,5 +5,4 @@ using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Naming", "CA1716:Identifiers should not match keywords", Justification = "", Scope = "type", Target = "~T:Aspose.BarCode.Cloud.Sdk.Model.Error")] [assembly: SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "", Scope = "namespaceanddescendants", Target = "~N:Aspose.BarCode.Cloud.Sdk.Model")] diff --git a/src/Interfaces/IBarcodeApi.cs b/src/Interfaces/IBarcodeApi.cs deleted file mode 100644 index 47542c8..0000000 --- a/src/Interfaces/IBarcodeApi.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Interfaces -{ - /// - /// BarcodeApi interface - /// - public interface IBarcodeApi - { - - /// - /// Generate barcode. - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task GetBarcodeGenerateAsync(GetBarcodeGenerateRequest request); - - /// - /// Recognize barcode from a file on server. - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task GetBarcodeRecognizeAsync(GetBarcodeRecognizeRequest request); - - /// - /// Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field. - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task PostBarcodeRecognizeFromUrlOrContentAsync(PostBarcodeRecognizeFromUrlOrContentRequest request); - - /// - /// Generate multiple barcodes and return in response stream - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task PostGenerateMultipleAsync(PostGenerateMultipleRequest request); - - /// - /// Generate barcode and save on server (from query params or from file with json or xml content) - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task PutBarcodeGenerateFileAsync(PutBarcodeGenerateFileRequest request); - - /// - /// Recognition of a barcode from file on server with parameters in body. - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task PutBarcodeRecognizeFromBodyAsync(PutBarcodeRecognizeFromBodyRequest request); - - /// - /// Generate image with multiple barcodes and put new file on server - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task PutGenerateMultipleAsync(PutGenerateMultipleRequest request); - - /// - /// Quickly scan a barcode from an image. - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task ScanBarcodeAsync(ScanBarcodeRequest request); - } -} diff --git a/src/Interfaces/IFileApi.cs b/src/Interfaces/IFileApi.cs deleted file mode 100644 index 95d72e7..0000000 --- a/src/Interfaces/IFileApi.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Interfaces -{ - /// - /// FileApi interface - /// - public interface IFileApi - { - - /// - /// Copy file - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task CopyFileAsync(CopyFileRequest request); - - /// - /// Delete file - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task DeleteFileAsync(DeleteFileRequest request); - - /// - /// Download file - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task DownloadFileAsync(DownloadFileRequest request); - - /// - /// Move file - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task MoveFileAsync(MoveFileRequest request); - - /// - /// Upload file - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task UploadFileAsync(UploadFileRequest request); - } -} diff --git a/src/Interfaces/IFolderApi.cs b/src/Interfaces/IFolderApi.cs deleted file mode 100644 index e3c887b..0000000 --- a/src/Interfaces/IFolderApi.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Interfaces -{ - /// - /// FolderApi interface - /// - public interface IFolderApi - { - - /// - /// Copy folder - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task CopyFolderAsync(CopyFolderRequest request); - - /// - /// Create the folder - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task CreateFolderAsync(CreateFolderRequest request); - - /// - /// Delete folder - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task DeleteFolderAsync(DeleteFolderRequest request); - - /// - /// Get all files and folders within a folder - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task GetFilesListAsync(GetFilesListRequest request); - - /// - /// Move folder - /// - /// Request. - /// - /// A task representing the asynchronous operation. - /// - Task MoveFolderAsync(MoveFolderRequest request); - } -} diff --git a/src/Interfaces/IGenerateApi.cs b/src/Interfaces/IGenerateApi.cs new file mode 100644 index 0000000..94d0af6 --- /dev/null +++ b/src/Interfaces/IGenerateApi.cs @@ -0,0 +1,71 @@ +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Model; + + +namespace Aspose.BarCode.Cloud.Sdk.Interfaces +{ + /// + /// GenerateApi interface + /// + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGenerateApi + { + /// + /// Generate barcode using GET request with parameters in route and query string. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Type of barcode to generate. + /// String represents data to encode + /// Type of data to encode. Default value: StringData. + /// Barcode output image format. Default value: png + /// Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. + /// Common Units for all measuring in query. Default units: pixel. + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + Task GenerateAsync(EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = default, BarcodeImageFormat? imageFormat = default, CodeLocation? textLocation = default, string foregroundColor = default, string backgroundColor = default, GraphicsUnit? units = default, float? resolution = default, float? imageHeight = default, float? imageWidth = default, int? rotationAngle = default, System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate barcode using POST request with parameters in body in json or xml format. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Parameters of generation + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + Task GenerateBodyAsync(GenerateParams generateParams, System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate barcode using POST request with parameters in multipart form. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// String represents data to encode + /// + /// + /// + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. + /// + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + Task GenerateMultipartAsync(EncodeBarcodeType barcodeType, string data, EncodeDataType? dataType = default, BarcodeImageFormat? imageFormat = default, CodeLocation? textLocation = default, string foregroundColor = default, string backgroundColor = default, GraphicsUnit? units = default, float? resolution = default, float? imageHeight = default, float? imageWidth = default, int? rotationAngle = default, System.Threading.CancellationToken cancellationToken = default); + } +} diff --git a/src/Interfaces/IRecognizeApi.cs b/src/Interfaces/IRecognizeApi.cs new file mode 100644 index 0000000..2ffd211 --- /dev/null +++ b/src/Interfaces/IRecognizeApi.cs @@ -0,0 +1,55 @@ +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Model; + + +namespace Aspose.BarCode.Cloud.Sdk.Interfaces +{ + /// + /// RecognizeApi interface + /// + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IRecognizeApi + { + /// + /// Recognize barcode from file on server using GET requests with parameters in route and query string. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Type of barcode to recognize + /// Url to barcode image + /// Recognition mode + /// Image kind for recognition + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task RecognizeAsync(DecodeBarcodeType barcodeType, string fileUrl, RecognitionMode? recognitionMode = default, RecognitionImageKind? recognitionImageKind = default, System.Threading.CancellationToken cancellationToken = default); + /// + /// Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Barcode recognition request + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task RecognizeBase64Async(RecognizeBase64Request recognizeBase64Request, System.Threading.CancellationToken cancellationToken = default); + /// + /// Recognize barcode from file in request body using POST requests with parameters in multipart form. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Barcode image file + /// + /// + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task RecognizeMultipartAsync(DecodeBarcodeType barcodeType, System.IO.Stream file, RecognitionMode? recognitionMode = default, RecognitionImageKind? recognitionImageKind = default, System.Threading.CancellationToken cancellationToken = default); + } +} diff --git a/src/Interfaces/IScanApi.cs b/src/Interfaces/IScanApi.cs new file mode 100644 index 0000000..74cc041 --- /dev/null +++ b/src/Interfaces/IScanApi.cs @@ -0,0 +1,49 @@ +using System.Threading.Tasks; +using Aspose.BarCode.Cloud.Sdk.Model; + + +namespace Aspose.BarCode.Cloud.Sdk.Interfaces +{ + /// + /// ScanApi interface + /// + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IScanApi + { + /// + /// Scan barcode from file on server using GET requests with parameter in query string. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Url to barcode image + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task ScanAsync(string fileUrl, System.Threading.CancellationToken cancellationToken = default); + /// + /// Scan barcode from file in request body using POST requests with parameter in body in json or xml format. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Barcode scan request + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task ScanBase64Async(ScanBase64Request scanBase64Request, System.Threading.CancellationToken cancellationToken = default); + /// + /// Scan barcode from file in request body using POST requests with parameter in multipart form. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Barcode image file + /// Cancellation Token to cancel the request. + /// Task of BarcodeResponseList + Task ScanMultipartAsync(System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default); + } +} diff --git a/src/Interfaces/IStorageApi.cs b/src/Interfaces/IStorageApi.cs deleted file mode 100644 index 11e4c9e..0000000 --- a/src/Interfaces/IStorageApi.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Threading.Tasks; -using Aspose.BarCode.Cloud.Sdk.Model; -using Aspose.BarCode.Cloud.Sdk.Model.Requests; - -namespace Aspose.BarCode.Cloud.Sdk.Interfaces -{ - /// - /// StorageApi interface - /// - public interface IStorageApi - { - - /// - /// Get disc usage - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task GetDiscUsageAsync(GetDiscUsageRequest request); - - /// - /// Get file versions - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task GetFileVersionsAsync(GetFileVersionsRequest request); - - /// - /// Check if file or folder exists - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task ObjectExistsAsync(ObjectExistsRequest request); - - /// - /// Check if storage exists - /// - /// Request. - /// - /// A task representing the asynchronous operation. The result is a . - /// - Task StorageExistsAsync(StorageExistsRequest request); - } -} diff --git a/src/Internal/ApiInvoker.cs b/src/Internal/ApiInvoker.cs index 04efdb1..f5aae2e 100644 --- a/src/Internal/ApiInvoker.cs +++ b/src/Internal/ApiInvoker.cs @@ -272,7 +272,7 @@ public async Task InvokeBinaryApiAsync(string path, string method, string body, Dictionary headerParams, - MultipartFormDataContent formParams, + HttpContent formParams, string contentType = "application/json") { Stream responseStream = await InvokeInternalAsync(path, method, true, body, headerParams, formParams, contentType) @@ -284,7 +284,7 @@ public async Task InvokeApiAsync(string path, string method, string body, Dictionary headerParams, - MultipartFormDataContent formParams, + HttpContent formParams, string contentType = "application/json") { string response = await InvokeInternalAsync(path, method, false, body, headerParams, formParams, contentType) as string; @@ -296,7 +296,7 @@ private async Task InvokeInternalAsync(string path, bool binaryResponse, string body, Dictionary headerParams, - MultipartFormDataContent formParams, + HttpContent formParams, string contentType) { if (headerParams == null) diff --git a/src/Internal/RequestHandlers/ApiExceptionRequestHandler.cs b/src/Internal/RequestHandlers/ApiExceptionRequestHandler.cs index d3b8b09..bcf0341 100644 --- a/src/Internal/RequestHandlers/ApiExceptionRequestHandler.cs +++ b/src/Internal/RequestHandlers/ApiExceptionRequestHandler.cs @@ -47,10 +47,20 @@ private static void ThrowApiException(HttpWebResponse webResponse, Stream result using (StreamReader responseReader = new StreamReader(resultStream)) { string responseData = responseReader.ReadToEnd(); - ApiErrorResponse errorResponse = (ApiErrorResponse) - SerializationHelper.Deserialize(responseData, - typeof(ApiErrorResponse)); - if (string.IsNullOrEmpty(errorResponse.Error.Code)) + ApiErrorResponse errorResponse = new ApiErrorResponse() + { + Error = new ApiError() + }; + try + { + errorResponse = (ApiErrorResponse) + SerializationHelper.Deserialize(responseData, + typeof(ApiErrorResponse)); + } + catch + { + } + if (string.IsNullOrEmpty(errorResponse.Error?.Code)) { errorResponse.Error.Message = responseData; } @@ -86,10 +96,20 @@ private static async Task ThrowApiException(HttpResponseMessage response) using (StreamReader responseReader = new StreamReader(resultStream)) { string responseData = await responseReader.ReadToEndAsync(); - ApiErrorResponse errorResponse = (ApiErrorResponse) - SerializationHelper.Deserialize(responseData, - typeof(ApiErrorResponse)); - if (string.IsNullOrEmpty(errorResponse.Error.Code)) + ApiErrorResponse errorResponse = new ApiErrorResponse() + { + Error = new ApiError() + }; + try + { + errorResponse = (ApiErrorResponse) + SerializationHelper.Deserialize(responseData, + typeof(ApiErrorResponse)); + } + catch + { + } + if (string.IsNullOrEmpty(errorResponse.Error?.Code)) { errorResponse.Error.Message = responseData; } diff --git a/src/Model/AbstractOpenAPISchema.cs b/src/Model/AbstractOpenAPISchema.cs new file mode 100644 index 0000000..48564c7 --- /dev/null +++ b/src/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,92 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2025 Aspose.BarCode for Cloud +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// -------------------------------------------------------------------------------------------------------------------- + + +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Aspose.BarCode.Cloud.Sdk.Model +{ + /// + /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// + public abstract partial class AbstractOpenAPISchema + { + /// + /// Custom JSON serializer + /// + public static readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Error, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Custom JSON serializer for objects with additional properties + /// + public static readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); + } +} diff --git a/src/Model/ApiError.cs b/src/Model/ApiError.cs index 1c03883..33dea4f 100644 --- a/src/Model/ApiError.cs +++ b/src/Model/ApiError.cs @@ -8,27 +8,27 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// Api Error. /// public class ApiError : IToString { /// - /// Gets or sets Code + /// Gets or sets api error code. /// public string Code { get; set; } /// - /// Gets or sets Message + /// Gets or sets error message. /// public string Message { get; set; } /// - /// Gets or sets Description + /// Gets or sets error description. /// public string Description { get; set; } /// - /// Gets or sets DateTime + /// Gets or sets server datetime. /// public DateTime? DateTime { get; set; } diff --git a/src/Model/ApiErrorResponse.cs b/src/Model/ApiErrorResponse.cs index 5616f46..c20d74e 100644 --- a/src/Model/ApiErrorResponse.cs +++ b/src/Model/ApiErrorResponse.cs @@ -8,12 +8,12 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// ApiError Response /// public class ApiErrorResponse : IToString { /// - /// Gets or sets RequestId + /// Gets or sets request Id. /// public string RequestId { get; set; } diff --git a/src/Model/AustralianPostParams.cs b/src/Model/AustralianPostParams.cs deleted file mode 100644 index 9ed0e0c..0000000 --- a/src/Model/AustralianPostParams.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// AustralianPost barcode parameters. - /// - public class AustralianPostParams : IToString - { - /// - /// Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other - /// - public CustomerInformationInterpretingType? EncodingTable { get; set; } - - /// - /// Short bar's height of AustralianPost barcode. - /// - public double? ShortBarHeight { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/AztecParams.cs b/src/Model/AztecParams.cs deleted file mode 100644 index d19962b..0000000 --- a/src/Model/AztecParams.cs +++ /dev/null @@ -1,74 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Aztec parameters. - /// - public class AztecParams : IToString - { - /// - /// Aztec Symbol mode. Default value: AztecSymbolMode.Auto. - /// - public AztecSymbolMode? SymbolMode { get; set; } - - /// - /// Encoding mode for Aztec barcodes. Default value: Auto - /// - public AztecEncodeMode? EncodeMode { get; set; } - - /// - /// Identifies ECI encoding. Used when AztecEncodeMode is Auto. Default value: ISO-8859-1. - /// - public ECIEncodings? ECIEncoding { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// Level of error correction of Aztec types of barcode. Value should between 10 to 95. - /// - public int? ErrorLevel { get; set; } - - /// - /// DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. - /// - [System.Obsolete("This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext.", false)] - public string TextEncoding { get; set; } - - /// - /// Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization. - /// - public bool? IsReaderInitialization { get; set; } - - /// - /// Gets or sets layers count of Aztec symbol. Layers count should be in range from 1 to 3 for Compact mode and in range from 1 to 32 for Full Range mode. Default value: 0 (auto). - /// - public int? LayersCount { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/AztecSymbolMode.cs b/src/Model/AztecSymbolMode.cs deleted file mode 100644 index fb2dcf5..0000000 --- a/src/Model/AztecSymbolMode.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AztecSymbolMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Compact - /// - Compact, - - /// - /// Enum value FullRange - /// - FullRange, - - /// - /// Enum value Rune - /// - Rune - - } -} diff --git a/src/Model/FontStyle.cs b/src/Model/BarcodeImageFormat.cs similarity index 58% rename from src/Model/FontStyle.cs rename to src/Model/BarcodeImageFormat.cs index 0e91ef7..4b2916e 100644 --- a/src/Model/FontStyle.cs +++ b/src/Model/BarcodeImageFormat.cs @@ -6,35 +6,35 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// Specifies the file format of the image. /// [JsonConverter(typeof(StringEnumConverter))] - public enum FontStyle + public enum BarcodeImageFormat { /// - /// Enum value Regular + /// Enum value Png /// - Regular, + Png, /// - /// Enum value Bold + /// Enum value Jpeg /// - Bold, + Jpeg, /// - /// Enum value Italic + /// Enum value Svg /// - Italic, + Svg, /// - /// Enum value Underline + /// Enum value Tiff /// - Underline, + Tiff, /// - /// Enum value Strikeout + /// Enum value Gif /// - Strikeout + Gif } } diff --git a/src/Model/BarcodeImageParams.cs b/src/Model/BarcodeImageParams.cs new file mode 100644 index 0000000..be92b9d --- /dev/null +++ b/src/Model/BarcodeImageParams.cs @@ -0,0 +1,78 @@ + +using System; +using System.Collections.Generic; +using Aspose.BarCode.Cloud.Sdk.Interfaces; +using Aspose.BarCode.Cloud.Sdk.Internal; + +namespace Aspose.BarCode.Cloud.Sdk.Model +{ + + /// + /// Barcode image optional parameters + /// + public class BarcodeImageParams : IToString + { + /// + /// Gets or sets ImageFormat + /// + public BarcodeImageFormat? ImageFormat { get; set; } + + /// + /// Gets or sets TextLocation + /// + public CodeLocation? TextLocation { get; set; } + + /// + /// Gets or sets Units + /// + public GraphicsUnit? Units { get; set; } + + /// + /// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black. + /// + public string ForegroundColor { get; set; } + + /// + /// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White. + /// + public string BackgroundColor { get; set; } + + /// + /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot. + /// + public float? Resolution { get; set; } + + /// + /// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// + public float? ImageHeight { get; set; } + + /// + /// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot. + /// + public float? ImageWidth { get; set; } + + /// + /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. + /// + public int? RotationAngle { get; set; } + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + return _srcString ?? SerializationHelper.Serialize(this); + } + + private string _srcString; + /// + /// Set the string presentation of the object + /// + public void SetSrcString(string value) + { + _srcString = value; + } + } +} diff --git a/src/Model/BorderDashStyle.cs b/src/Model/BorderDashStyle.cs deleted file mode 100644 index 75054b7..0000000 --- a/src/Model/BorderDashStyle.cs +++ /dev/null @@ -1,40 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BorderDashStyle - { - /// - /// Enum value Solid - /// - Solid, - - /// - /// Enum value Dash - /// - Dash, - - /// - /// Enum value Dot - /// - Dot, - - /// - /// Enum value DashDot - /// - DashDot, - - /// - /// Enum value DashDotDot - /// - DashDotDot - - } -} diff --git a/src/Model/CaptionParams.cs b/src/Model/CaptionParams.cs deleted file mode 100644 index dd37b14..0000000 --- a/src/Model/CaptionParams.cs +++ /dev/null @@ -1,68 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Caption - /// - public class CaptionParams : IToString - { - /// - /// Text alignment. - /// - public TextAlignment? Alignment { get; set; } - - /// - /// Caption text. - /// - public string Text { get; set; } - - /// - /// Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string Color { get; set; } - - /// - /// Is caption visible. - /// - public bool? Visible { get; set; } - - /// - /// Font. - /// - public FontParams Font { get; set; } - - /// - /// Padding. - /// - public Padding Padding { get; set; } - - /// - /// Specify word wraps (line breaks) within text. Default value: false. - /// - public bool? NoWrap { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/CodabarChecksumMode.cs b/src/Model/CodabarChecksumMode.cs deleted file mode 100644 index bacd3c6..0000000 --- a/src/Model/CodabarChecksumMode.cs +++ /dev/null @@ -1,25 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CodabarChecksumMode - { - /// - /// Enum value Mod10 - /// - Mod10, - - /// - /// Enum value Mod16 - /// - Mod16 - - } -} diff --git a/src/Model/CodabarParams.cs b/src/Model/CodabarParams.cs deleted file mode 100644 index 75239fe..0000000 --- a/src/Model/CodabarParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Codabar parameters. - /// - public class CodabarParams : IToString - { - /// - /// Checksum algorithm for Codabar barcodes. Default value: CodabarChecksumMode.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum. - /// - public CodabarChecksumMode? ChecksumMode { get; set; } - - /// - /// Start symbol (character) of Codabar symbology. Default value: CodabarSymbol.A - /// - public CodabarSymbol? StartSymbol { get; set; } - - /// - /// Stop symbol (character) of Codabar symbology. Default value: CodabarSymbol.A - /// - public CodabarSymbol? StopSymbol { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/CodabarSymbol.cs b/src/Model/CodabarSymbol.cs deleted file mode 100644 index f407212..0000000 --- a/src/Model/CodabarSymbol.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CodabarSymbol - { - /// - /// Enum value A - /// - A, - - /// - /// Enum value B - /// - B, - - /// - /// Enum value C - /// - C, - - /// - /// Enum value D - /// - D - - } -} diff --git a/src/Model/CodablockParams.cs b/src/Model/CodablockParams.cs deleted file mode 100644 index acb6c8a..0000000 --- a/src/Model/CodablockParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Codablock parameters. - /// - public class CodablockParams : IToString - { - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// Columns count. - /// - public int? Columns { get; set; } - - /// - /// Rows count. - /// - public int? Rows { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/Code128Emulation.cs b/src/Model/Code128Emulation.cs deleted file mode 100644 index 5973a5f..0000000 --- a/src/Model/Code128Emulation.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// DEPRECATED. This enum will be removed in future releases Function codewords for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Code128Emulation - { - /// - /// Enum value None - /// - None, - - /// - /// Enum value Code903 - /// - Code903, - - /// - /// Enum value Code904 - /// - Code904, - - /// - /// Enum value Code905 - /// - Code905 - - } -} diff --git a/src/Model/Code128EncodeMode.cs b/src/Model/Code128EncodeMode.cs deleted file mode 100644 index b65c2c8..0000000 --- a/src/Model/Code128EncodeMode.cs +++ /dev/null @@ -1,50 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Code128EncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value CodeA - /// - CodeA, - - /// - /// Enum value CodeB - /// - CodeB, - - /// - /// Enum value CodeAB - /// - CodeAB, - - /// - /// Enum value CodeC - /// - CodeC, - - /// - /// Enum value CodeAC - /// - CodeAC, - - /// - /// Enum value CodeBC - /// - CodeBC - - } -} diff --git a/src/Model/Code128Params.cs b/src/Model/Code128Params.cs deleted file mode 100644 index 3214251..0000000 --- a/src/Model/Code128Params.cs +++ /dev/null @@ -1,38 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Code128 params. - /// - public class Code128Params : IToString - { - /// - /// Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto. - /// - public Code128EncodeMode? EncodeMode { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/Code16KParams.cs b/src/Model/Code16KParams.cs deleted file mode 100644 index a878ee9..0000000 --- a/src/Model/Code16KParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Code16K parameters. - /// - public class Code16KParams : IToString - { - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// Size of the left quiet zone in xDimension. Default value: 10, meaning if xDimension = 2px than left quiet zone will be 20px. - /// - public int? QuietZoneLeftCoef { get; set; } - - /// - /// Size of the right quiet zone in xDimension. Default value: 1, meaning if xDimension = 2px than right quiet zone will be 2px. - /// - public int? QuietZoneRightCoef { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/CouponParams.cs b/src/Model/CouponParams.cs deleted file mode 100644 index a598a05..0000000 --- a/src/Model/CouponParams.cs +++ /dev/null @@ -1,38 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon. - /// - public class CouponParams : IToString - { - /// - /// Space between main the BarCode and supplement BarCode in Unit value. - /// - public double? SupplementSpace { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/CustomerInformationInterpretingType.cs b/src/Model/CustomerInformationInterpretingType.cs deleted file mode 100644 index 5c1dae5..0000000 --- a/src/Model/CustomerInformationInterpretingType.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CustomerInformationInterpretingType - { - /// - /// Enum value CTable - /// - CTable, - - /// - /// Enum value NTable - /// - NTable, - - /// - /// Enum value Other - /// - Other - - } -} diff --git a/src/Model/DataBarParams.cs b/src/Model/DataBarParams.cs deleted file mode 100644 index 117f146..0000000 --- a/src/Model/DataBarParams.cs +++ /dev/null @@ -1,58 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Databar parameters. - /// - public class DataBarParams : IToString - { - /// - /// Height/Width ratio of 2D BarCode module. Used for DataBar stacked. - /// - public double? AspectRatio { get; set; } - - /// - /// Columns count. - /// - public int? Columns { get; set; } - - /// - /// Rows count. - /// - public int? Rows { get; set; } - - /// - /// Enables flag of 2D composite component with DataBar barcode - /// - public bool? Is2DCompositeComponent { get; set; } - - /// - /// If this flag is set, it allows only GS1 encoding standard for Databar barcode types - /// - public bool? IsAllowOnlyGS1Encoding { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/DataMatrixEccType.cs b/src/Model/DataMatrixEccType.cs deleted file mode 100644 index 774805e..0000000 --- a/src/Model/DataMatrixEccType.cs +++ /dev/null @@ -1,50 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DataMatrixEccType - { - /// - /// Enum value EccAuto - /// - EccAuto, - - /// - /// Enum value Ecc000 - /// - Ecc000, - - /// - /// Enum value Ecc050 - /// - Ecc050, - - /// - /// Enum value Ecc080 - /// - Ecc080, - - /// - /// Enum value Ecc100 - /// - Ecc100, - - /// - /// Enum value Ecc140 - /// - Ecc140, - - /// - /// Enum value Ecc200 - /// - Ecc200 - - } -} diff --git a/src/Model/DataMatrixEncodeMode.cs b/src/Model/DataMatrixEncodeMode.cs deleted file mode 100644 index de7ecaf..0000000 --- a/src/Model/DataMatrixEncodeMode.cs +++ /dev/null @@ -1,60 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// DataMatrix encoder's encoding mode, default to Auto - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DataMatrixEncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value ASCII - /// - ASCII, - - /// - /// Enum value Full - /// - Full, - - /// - /// Enum value Custom - /// - Custom, - - /// - /// Enum value C40 - /// - C40, - - /// - /// Enum value Text - /// - Text, - - /// - /// Enum value EDIFACT - /// - EDIFACT, - - /// - /// Enum value ANSIX12 - /// - ANSIX12, - - /// - /// Enum value ExtendedCodetext - /// - ExtendedCodetext - - } -} diff --git a/src/Model/DataMatrixParams.cs b/src/Model/DataMatrixParams.cs deleted file mode 100644 index 792d253..0000000 --- a/src/Model/DataMatrixParams.cs +++ /dev/null @@ -1,76 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// DataMatrix parameters. - /// - public class DataMatrixParams : IToString - { - /// - /// Datamatrix ECC type. Default value: DataMatrixEccType.Ecc200. - /// - public DataMatrixEccType? DataMatrixEcc { get; set; } - - /// - /// Encode mode of Datamatrix barcode. Default value: DataMatrixEncodeMode.Auto. - /// - public DataMatrixEncodeMode? DataMatrixEncodeMode { get; set; } - - /// - /// Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. Can be used only with DataMatrixEccType.Ecc200 or DataMatrixEccType.EccAuto. Cannot be used with EncodeTypes.GS1DataMatrix Default value: MacroCharacters.None. - /// - public MacroCharacter? MacroCharacters { get; set; } - - /// - /// Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto. - /// - public DataMatrixVersion? Version { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module - /// - public double? AspectRatio { get; set; } - - /// - /// DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. - /// - [System.Obsolete("This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext.", false)] - public string TextEncoding { get; set; } - - /// - /// DEPRECATED: Will be replaced with 'DataMatrix.Version' in the next release Columns count. - /// - [System.Obsolete("Will be replaced with 'DataMatrix.Version' in the next release Columns count.", false)] - public int? Columns { get; set; } - - /// - /// DEPRECATED: Will be replaced with 'DataMatrix.Version' in the next release Rows count. - /// - [System.Obsolete("Will be replaced with 'DataMatrix.Version' in the next release Rows count.", false)] - public int? Rows { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/DataMatrixVersion.cs b/src/Model/DataMatrixVersion.cs deleted file mode 100644 index f267e70..0000000 --- a/src/Model/DataMatrixVersion.cs +++ /dev/null @@ -1,370 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DataMatrixVersion - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value RowsColumns - /// - RowsColumns, - - /// - /// Enum value ECC000_9x9 - /// - ECC000_9x9, - - /// - /// Enum value ECC000_050_11x11 - /// - ECC000_050_11x11, - - /// - /// Enum value ECC000_100_13x13 - /// - ECC000_100_13x13, - - /// - /// Enum value ECC000_100_15x15 - /// - ECC000_100_15x15, - - /// - /// Enum value ECC000_140_17x17 - /// - ECC000_140_17x17, - - /// - /// Enum value ECC000_140_19x19 - /// - ECC000_140_19x19, - - /// - /// Enum value ECC000_140_21x21 - /// - ECC000_140_21x21, - - /// - /// Enum value ECC000_140_23x23 - /// - ECC000_140_23x23, - - /// - /// Enum value ECC000_140_25x25 - /// - ECC000_140_25x25, - - /// - /// Enum value ECC000_140_27x27 - /// - ECC000_140_27x27, - - /// - /// Enum value ECC000_140_29x29 - /// - ECC000_140_29x29, - - /// - /// Enum value ECC000_140_31x31 - /// - ECC000_140_31x31, - - /// - /// Enum value ECC000_140_33x33 - /// - ECC000_140_33x33, - - /// - /// Enum value ECC000_140_35x35 - /// - ECC000_140_35x35, - - /// - /// Enum value ECC000_140_37x37 - /// - ECC000_140_37x37, - - /// - /// Enum value ECC000_140_39x39 - /// - ECC000_140_39x39, - - /// - /// Enum value ECC000_140_41x41 - /// - ECC000_140_41x41, - - /// - /// Enum value ECC000_140_43x43 - /// - ECC000_140_43x43, - - /// - /// Enum value ECC000_140_45x45 - /// - ECC000_140_45x45, - - /// - /// Enum value ECC000_140_47x47 - /// - ECC000_140_47x47, - - /// - /// Enum value ECC000_140_49x49 - /// - ECC000_140_49x49, - - /// - /// Enum value ECC200_10x10 - /// - ECC200_10x10, - - /// - /// Enum value ECC200_12x12 - /// - ECC200_12x12, - - /// - /// Enum value ECC200_14x14 - /// - ECC200_14x14, - - /// - /// Enum value ECC200_16x16 - /// - ECC200_16x16, - - /// - /// Enum value ECC200_18x18 - /// - ECC200_18x18, - - /// - /// Enum value ECC200_20x20 - /// - ECC200_20x20, - - /// - /// Enum value ECC200_22x22 - /// - ECC200_22x22, - - /// - /// Enum value ECC200_24x24 - /// - ECC200_24x24, - - /// - /// Enum value ECC200_26x26 - /// - ECC200_26x26, - - /// - /// Enum value ECC200_32x32 - /// - ECC200_32x32, - - /// - /// Enum value ECC200_36x36 - /// - ECC200_36x36, - - /// - /// Enum value ECC200_40x40 - /// - ECC200_40x40, - - /// - /// Enum value ECC200_44x44 - /// - ECC200_44x44, - - /// - /// Enum value ECC200_48x48 - /// - ECC200_48x48, - - /// - /// Enum value ECC200_52x52 - /// - ECC200_52x52, - - /// - /// Enum value ECC200_64x64 - /// - ECC200_64x64, - - /// - /// Enum value ECC200_72x72 - /// - ECC200_72x72, - - /// - /// Enum value ECC200_80x80 - /// - ECC200_80x80, - - /// - /// Enum value ECC200_88x88 - /// - ECC200_88x88, - - /// - /// Enum value ECC200_96x96 - /// - ECC200_96x96, - - /// - /// Enum value ECC200_104x104 - /// - ECC200_104x104, - - /// - /// Enum value ECC200_120x120 - /// - ECC200_120x120, - - /// - /// Enum value ECC200_132x132 - /// - ECC200_132x132, - - /// - /// Enum value ECC200_144x144 - /// - ECC200_144x144, - - /// - /// Enum value ECC200_8x18 - /// - ECC200_8x18, - - /// - /// Enum value ECC200_8x32 - /// - ECC200_8x32, - - /// - /// Enum value ECC200_12x26 - /// - ECC200_12x26, - - /// - /// Enum value ECC200_12x36 - /// - ECC200_12x36, - - /// - /// Enum value ECC200_16x36 - /// - ECC200_16x36, - - /// - /// Enum value ECC200_16x48 - /// - ECC200_16x48, - - /// - /// Enum value DMRE_8x48 - /// - DMRE_8x48, - - /// - /// Enum value DMRE_8x64 - /// - DMRE_8x64, - - /// - /// Enum value DMRE_8x80 - /// - DMRE_8x80, - - /// - /// Enum value DMRE_8x96 - /// - DMRE_8x96, - - /// - /// Enum value DMRE_8x120 - /// - DMRE_8x120, - - /// - /// Enum value DMRE_8x144 - /// - DMRE_8x144, - - /// - /// Enum value DMRE_12x64 - /// - DMRE_12x64, - - /// - /// Enum value DMRE_12x88 - /// - DMRE_12x88, - - /// - /// Enum value DMRE_16x64 - /// - DMRE_16x64, - - /// - /// Enum value DMRE_20x36 - /// - DMRE_20x36, - - /// - /// Enum value DMRE_20x44 - /// - DMRE_20x44, - - /// - /// Enum value DMRE_20x64 - /// - DMRE_20x64, - - /// - /// Enum value DMRE_22x48 - /// - DMRE_22x48, - - /// - /// Enum value DMRE_24x48 - /// - DMRE_24x48, - - /// - /// Enum value DMRE_24x64 - /// - DMRE_24x64, - - /// - /// Enum value DMRE_26x40 - /// - DMRE_26x40, - - /// - /// Enum value DMRE_26x48 - /// - DMRE_26x48, - - /// - /// Enum value DMRE_26x64 - /// - DMRE_26x64 - - } -} diff --git a/src/Model/DecodeBarcodeType.cs b/src/Model/DecodeBarcodeType.cs index 2210a9a..8291f63 100644 --- a/src/Model/DecodeBarcodeType.cs +++ b/src/Model/DecodeBarcodeType.cs @@ -6,15 +6,20 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// See DecodeType + /// See Aspose.BarCode.Aspose.BarCode.BarCodeRecognition.DecodeType /// [JsonConverter(typeof(StringEnumConverter))] public enum DecodeBarcodeType { /// - /// Enum value all + /// Enum value MostCommonlyUsed /// - all, + MostCommonlyUsed, + + /// + /// Enum value QR + /// + QR, /// /// Enum value AustraliaPost @@ -22,20 +27,25 @@ public enum DecodeBarcodeType AustraliaPost, /// - /// Enum value Aztec + /// Enum value AustralianPosteParcel /// - Aztec, + AustralianPosteParcel, /// - /// Enum value ISBN + /// Enum value Aztec /// - ISBN, + Aztec, /// /// Enum value Codabar /// Codabar, + /// + /// Enum value CodablockF + /// + CodablockF, + /// /// Enum value Code11 /// @@ -47,269 +57,264 @@ public enum DecodeBarcodeType Code128, /// - /// Enum value GS1Code128 - /// - GS1Code128, - - /// - /// Enum value Code39Extended + /// Enum value Code16K /// - Code39Extended, + Code16K, /// - /// Enum value Code39Standard + /// Enum value Code32 /// - Code39Standard, + Code32, /// - /// Enum value Code93Extended + /// Enum value Code39 /// - Code93Extended, + Code39, /// - /// Enum value Code93Standard + /// Enum value Code39FullASCII /// - Code93Standard, + Code39FullASCII, /// - /// Enum value DataMatrix + /// Enum value Code93 /// - DataMatrix, + Code93, /// - /// Enum value DeutschePostIdentcode + /// Enum value CompactPdf417 /// - DeutschePostIdentcode, + CompactPdf417, /// - /// Enum value DeutschePostLeitcode + /// Enum value DataLogic2of5 /// - DeutschePostLeitcode, + DataLogic2of5, /// - /// Enum value EAN13 + /// Enum value DataMatrix /// - EAN13, + DataMatrix, /// - /// Enum value EAN14 + /// Enum value DatabarExpanded /// - EAN14, + DatabarExpanded, /// - /// Enum value EAN8 + /// Enum value DatabarExpandedStacked /// - EAN8, + DatabarExpandedStacked, /// - /// Enum value IATA2of5 + /// Enum value DatabarLimited /// - IATA2of5, + DatabarLimited, /// - /// Enum value Interleaved2of5 + /// Enum value DatabarOmniDirectional /// - Interleaved2of5, + DatabarOmniDirectional, /// - /// Enum value ISSN + /// Enum value DatabarStacked /// - ISSN, + DatabarStacked, /// - /// Enum value ISMN + /// Enum value DatabarStackedOmniDirectional /// - ISMN, + DatabarStackedOmniDirectional, /// - /// Enum value ItalianPost25 + /// Enum value DatabarTruncated /// - ItalianPost25, + DatabarTruncated, /// - /// Enum value ITF14 + /// Enum value DeutschePostIdentcode /// - ITF14, + DeutschePostIdentcode, /// - /// Enum value ITF6 + /// Enum value DeutschePostLeitcode /// - ITF6, + DeutschePostLeitcode, /// - /// Enum value MacroPdf417 + /// Enum value DotCode /// - MacroPdf417, + DotCode, /// - /// Enum value Matrix2of5 + /// Enum value DutchKIX /// - Matrix2of5, + DutchKIX, /// - /// Enum value MSI + /// Enum value EAN13 /// - MSI, + EAN13, /// - /// Enum value OneCode + /// Enum value EAN14 /// - OneCode, + EAN14, /// - /// Enum value OPC + /// Enum value EAN8 /// - OPC, + EAN8, /// - /// Enum value PatchCode + /// Enum value GS1Aztec /// - PatchCode, + GS1Aztec, /// - /// Enum value Pdf417 + /// Enum value GS1Code128 /// - Pdf417, + GS1Code128, /// - /// Enum value MicroPdf417 + /// Enum value GS1CompositeBar /// - MicroPdf417, + GS1CompositeBar, /// - /// Enum value Planet + /// Enum value GS1DataMatrix /// - Planet, + GS1DataMatrix, /// - /// Enum value Postnet + /// Enum value GS1DotCode /// - Postnet, + GS1DotCode, /// - /// Enum value PZN + /// Enum value GS1HanXin /// - PZN, + GS1HanXin, /// - /// Enum value QR + /// Enum value GS1MicroPdf417 /// - QR, + GS1MicroPdf417, /// - /// Enum value MicroQR + /// Enum value GS1QR /// - MicroQR, + GS1QR, /// - /// Enum value RM4SCC + /// Enum value HanXin /// - RM4SCC, + HanXin, /// - /// Enum value SCC14 + /// Enum value HIBCAztecLIC /// - SCC14, + HIBCAztecLIC, /// - /// Enum value SSCC18 + /// Enum value HIBCAztecPAS /// - SSCC18, + HIBCAztecPAS, /// - /// Enum value Standard2of5 + /// Enum value HIBCCode128LIC /// - Standard2of5, + HIBCCode128LIC, /// - /// Enum value Supplement + /// Enum value HIBCCode128PAS /// - Supplement, + HIBCCode128PAS, /// - /// Enum value UPCA + /// Enum value HIBCCode39LIC /// - UPCA, + HIBCCode39LIC, /// - /// Enum value UPCE + /// Enum value HIBCCode39PAS /// - UPCE, + HIBCCode39PAS, /// - /// Enum value VIN + /// Enum value HIBCDataMatrixLIC /// - VIN, + HIBCDataMatrixLIC, /// - /// Enum value Pharmacode + /// Enum value HIBCDataMatrixPAS /// - Pharmacode, + HIBCDataMatrixPAS, /// - /// Enum value GS1DataMatrix + /// Enum value HIBCQRLIC /// - GS1DataMatrix, + HIBCQRLIC, /// - /// Enum value DatabarOmniDirectional + /// Enum value HIBCQRPAS /// - DatabarOmniDirectional, + HIBCQRPAS, /// - /// Enum value DatabarTruncated + /// Enum value IATA2of5 /// - DatabarTruncated, + IATA2of5, /// - /// Enum value DatabarLimited + /// Enum value ISBN /// - DatabarLimited, + ISBN, /// - /// Enum value DatabarExpanded + /// Enum value ISMN /// - DatabarExpanded, + ISMN, /// - /// Enum value SwissPostParcel + /// Enum value ISSN /// - SwissPostParcel, + ISSN, /// - /// Enum value AustralianPosteParcel + /// Enum value ITF14 /// - AustralianPosteParcel, + ITF14, /// - /// Enum value Code16K + /// Enum value ITF6 /// - Code16K, + ITF6, /// - /// Enum value DatabarStackedOmniDirectional + /// Enum value Interleaved2of5 /// - DatabarStackedOmniDirectional, + Interleaved2of5, /// - /// Enum value DatabarStacked + /// Enum value ItalianPost25 /// - DatabarStacked, + ItalianPost25, /// - /// Enum value DatabarExpandedStacked + /// Enum value MacroPdf417 /// - DatabarExpandedStacked, + MacroPdf417, /// - /// Enum value CompactPdf417 + /// Enum value Mailmark /// - CompactPdf417, + Mailmark, /// - /// Enum value GS1QR + /// Enum value Matrix2of5 /// - GS1QR, + Matrix2of5, /// /// Enum value MaxiCode @@ -322,119 +327,109 @@ public enum DecodeBarcodeType MicrE13B, /// - /// Enum value Code32 - /// - Code32, - - /// - /// Enum value DataLogic2of5 - /// - DataLogic2of5, - - /// - /// Enum value DotCode + /// Enum value MicroPdf417 /// - DotCode, + MicroPdf417, /// - /// Enum value DutchKIX + /// Enum value MicroQR /// - DutchKIX, + MicroQR, /// - /// Enum value CodablockF + /// Enum value MSI /// - CodablockF, + MSI, /// - /// Enum value Mailmark + /// Enum value OneCode /// - Mailmark, + OneCode, /// - /// Enum value GS1DotCode + /// Enum value OPC /// - GS1DotCode, + OPC, /// - /// Enum value HIBCCode39LIC + /// Enum value PatchCode /// - HIBCCode39LIC, + PatchCode, /// - /// Enum value HIBCCode128LIC + /// Enum value Pdf417 /// - HIBCCode128LIC, + Pdf417, /// - /// Enum value HIBCAztecLIC + /// Enum value Pharmacode /// - HIBCAztecLIC, + Pharmacode, /// - /// Enum value HIBCDataMatrixLIC + /// Enum value Planet /// - HIBCDataMatrixLIC, + Planet, /// - /// Enum value HIBCQRLIC + /// Enum value Postnet /// - HIBCQRLIC, + Postnet, /// - /// Enum value HIBCCode39PAS + /// Enum value PZN /// - HIBCCode39PAS, + PZN, /// - /// Enum value HIBCCode128PAS + /// Enum value RectMicroQR /// - HIBCCode128PAS, + RectMicroQR, /// - /// Enum value HIBCAztecPAS + /// Enum value RM4SCC /// - HIBCAztecPAS, + RM4SCC, /// - /// Enum value HIBCDataMatrixPAS + /// Enum value SCC14 /// - HIBCDataMatrixPAS, + SCC14, /// - /// Enum value HIBCQRPAS + /// Enum value SSCC18 /// - HIBCQRPAS, + SSCC18, /// - /// Enum value HanXin + /// Enum value Standard2of5 /// - HanXin, + Standard2of5, /// - /// Enum value GS1HanXin + /// Enum value Supplement /// - GS1HanXin, + Supplement, /// - /// Enum value GS1Aztec + /// Enum value SwissPostParcel /// - GS1Aztec, + SwissPostParcel, /// - /// Enum value GS1CompositeBar + /// Enum value UPCA /// - GS1CompositeBar, + UPCA, /// - /// Enum value GS1MicroPdf417 + /// Enum value UPCE /// - GS1MicroPdf417, + UPCE, /// - /// Enum value mostCommonlyUsed + /// Enum value VIN /// - mostCommonlyUsed + VIN } } diff --git a/src/Model/DiscUsage.cs b/src/Model/DiscUsage.cs deleted file mode 100644 index 4029dbc..0000000 --- a/src/Model/DiscUsage.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Class for disc space information. - /// - public class DiscUsage : IToString - { - /// - /// Application used disc space. - /// - public long? UsedSize { get; set; } - - /// - /// Total disc space. - /// - public long? TotalSize { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/DotCodeEncodeMode.cs b/src/Model/DotCodeEncodeMode.cs deleted file mode 100644 index c5a79de..0000000 --- a/src/Model/DotCodeEncodeMode.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DotCodeEncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Bytes - /// - Bytes, - - /// - /// Enum value ExtendedCodetext - /// - ExtendedCodetext - - } -} diff --git a/src/Model/DotCodeParams.cs b/src/Model/DotCodeParams.cs deleted file mode 100644 index acc9a32..0000000 --- a/src/Model/DotCodeParams.cs +++ /dev/null @@ -1,63 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// DotCode parameters. - /// - public class DotCodeParams : IToString - { - /// - /// Identifies DotCode encode mode. Default value: Auto. - /// - public DotCodeEncodeMode? EncodeMode { get; set; } - - /// - /// Identifies ECI encoding. Used when DotCodeEncodeMode is Auto. Default value: ISO-8859-1. - /// - public ECIEncodings? ECIEncoding { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// Identifies columns count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of columns must be at least 5. - /// - public int? Columns { get; set; } - - /// - /// Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader. Default value is false. - /// - public bool? IsReaderInitialization { get; set; } - - /// - /// Identifies rows count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of rows must be at least 5. - /// - public int? Rows { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/ECIEncodings.cs b/src/Model/ECIEncodings.cs deleted file mode 100644 index b42bd95..0000000 --- a/src/Model/ECIEncodings.cs +++ /dev/null @@ -1,150 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ECIEncodings - { - /// - /// Enum value NONE - /// - NONE, - - /// - /// Enum value ISO_8859_1 - /// - ISO_8859_1, - - /// - /// Enum value ISO_8859_2 - /// - ISO_8859_2, - - /// - /// Enum value ISO_8859_3 - /// - ISO_8859_3, - - /// - /// Enum value ISO_8859_4 - /// - ISO_8859_4, - - /// - /// Enum value ISO_8859_5 - /// - ISO_8859_5, - - /// - /// Enum value ISO_8859_6 - /// - ISO_8859_6, - - /// - /// Enum value ISO_8859_7 - /// - ISO_8859_7, - - /// - /// Enum value ISO_8859_8 - /// - ISO_8859_8, - - /// - /// Enum value ISO_8859_9 - /// - ISO_8859_9, - - /// - /// Enum value ISO_8859_10 - /// - ISO_8859_10, - - /// - /// Enum value ISO_8859_11 - /// - ISO_8859_11, - - /// - /// Enum value ISO_8859_13 - /// - ISO_8859_13, - - /// - /// Enum value ISO_8859_14 - /// - ISO_8859_14, - - /// - /// Enum value ISO_8859_15 - /// - ISO_8859_15, - - /// - /// Enum value ISO_8859_16 - /// - ISO_8859_16, - - /// - /// Enum value Shift_JIS - /// - Shift_JIS, - - /// - /// Enum value Win1250 - /// - Win1250, - - /// - /// Enum value Win1251 - /// - Win1251, - - /// - /// Enum value Win1252 - /// - Win1252, - - /// - /// Enum value Win1256 - /// - Win1256, - - /// - /// Enum value UTF16BE - /// - UTF16BE, - - /// - /// Enum value UTF8 - /// - UTF8, - - /// - /// Enum value US_ASCII - /// - US_ASCII, - - /// - /// Enum value Big5 - /// - Big5, - - /// - /// Enum value GB18030 - /// - GB18030, - - /// - /// Enum value EUC_KR - /// - EUC_KR - - } -} diff --git a/src/Model/EnableChecksum.cs b/src/Model/EnableChecksum.cs deleted file mode 100644 index 3580a51..0000000 --- a/src/Model/EnableChecksum.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnableChecksum - { - /// - /// Enum value Default - /// - Default, - - /// - /// Enum value Yes - /// - Yes, - - /// - /// Enum value No - /// - No - - } -} diff --git a/src/Model/EncodeBarcodeType.cs b/src/Model/EncodeBarcodeType.cs index fce88f4..138a097 100644 --- a/src/Model/EncodeBarcodeType.cs +++ b/src/Model/EncodeBarcodeType.cs @@ -6,40 +6,45 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// See EncodeTypes + /// See Aspose.BarCode.Generation.EncodeTypes /// [JsonConverter(typeof(StringEnumConverter))] public enum EncodeBarcodeType { /// - /// Enum value Codabar + /// Enum value QR /// - Codabar, + QR, /// - /// Enum value Code11 + /// Enum value AustraliaPost /// - Code11, + AustraliaPost, /// - /// Enum value Code39Standard + /// Enum value AustralianPosteParcel /// - Code39Standard, + AustralianPosteParcel, + + /// + /// Enum value Aztec + /// + Aztec, /// - /// Enum value Code39Extended + /// Enum value Codabar /// - Code39Extended, + Codabar, /// - /// Enum value Code93Standard + /// Enum value CodablockF /// - Code93Standard, + CodablockF, /// - /// Enum value Code93Extended + /// Enum value Code11 /// - Code93Extended, + Code11, /// /// Enum value Code128 @@ -47,329 +52,329 @@ public enum EncodeBarcodeType Code128, /// - /// Enum value GS1Code128 + /// Enum value Code16K /// - GS1Code128, + Code16K, /// - /// Enum value EAN8 + /// Enum value Code32 /// - EAN8, + Code32, /// - /// Enum value EAN13 + /// Enum value Code39 /// - EAN13, + Code39, /// - /// Enum value EAN14 + /// Enum value Code39FullASCII /// - EAN14, + Code39FullASCII, /// - /// Enum value SCC14 + /// Enum value Code93 /// - SCC14, + Code93, /// - /// Enum value SSCC18 + /// Enum value DataLogic2of5 /// - SSCC18, + DataLogic2of5, /// - /// Enum value UPCA + /// Enum value DataMatrix /// - UPCA, + DataMatrix, /// - /// Enum value UPCE + /// Enum value DatabarExpanded /// - UPCE, + DatabarExpanded, /// - /// Enum value ISBN + /// Enum value DatabarExpandedStacked /// - ISBN, + DatabarExpandedStacked, /// - /// Enum value ISSN + /// Enum value DatabarLimited /// - ISSN, + DatabarLimited, /// - /// Enum value ISMN + /// Enum value DatabarOmniDirectional /// - ISMN, + DatabarOmniDirectional, /// - /// Enum value Standard2of5 + /// Enum value DatabarStacked /// - Standard2of5, + DatabarStacked, /// - /// Enum value Interleaved2of5 + /// Enum value DatabarStackedOmniDirectional /// - Interleaved2of5, + DatabarStackedOmniDirectional, /// - /// Enum value Matrix2of5 + /// Enum value DatabarTruncated /// - Matrix2of5, + DatabarTruncated, /// - /// Enum value ItalianPost25 + /// Enum value DeutschePostIdentcode /// - ItalianPost25, + DeutschePostIdentcode, /// - /// Enum value IATA2of5 + /// Enum value DeutschePostLeitcode /// - IATA2of5, + DeutschePostLeitcode, /// - /// Enum value ITF14 + /// Enum value DotCode /// - ITF14, + DotCode, /// - /// Enum value ITF6 + /// Enum value DutchKIX /// - ITF6, + DutchKIX, /// - /// Enum value MSI + /// Enum value EAN13 /// - MSI, + EAN13, /// - /// Enum value VIN + /// Enum value EAN14 /// - VIN, + EAN14, /// - /// Enum value DeutschePostIdentcode + /// Enum value EAN8 /// - DeutschePostIdentcode, + EAN8, /// - /// Enum value DeutschePostLeitcode + /// Enum value GS1Aztec /// - DeutschePostLeitcode, + GS1Aztec, /// - /// Enum value OPC + /// Enum value GS1CodablockF /// - OPC, + GS1CodablockF, /// - /// Enum value PZN + /// Enum value GS1Code128 /// - PZN, + GS1Code128, /// - /// Enum value Code16K + /// Enum value GS1DataMatrix /// - Code16K, + GS1DataMatrix, /// - /// Enum value Pharmacode + /// Enum value GS1DotCode /// - Pharmacode, + GS1DotCode, /// - /// Enum value DataMatrix + /// Enum value GS1HanXin /// - DataMatrix, + GS1HanXin, /// - /// Enum value QR + /// Enum value GS1MicroPdf417 /// - QR, + GS1MicroPdf417, /// - /// Enum value Aztec + /// Enum value GS1QR /// - Aztec, + GS1QR, /// - /// Enum value Pdf417 + /// Enum value HanXin /// - Pdf417, + HanXin, /// - /// Enum value MacroPdf417 + /// Enum value IATA2of5 /// - MacroPdf417, + IATA2of5, /// - /// Enum value AustraliaPost + /// Enum value ISBN /// - AustraliaPost, + ISBN, /// - /// Enum value Postnet + /// Enum value ISMN /// - Postnet, + ISMN, /// - /// Enum value Planet + /// Enum value ISSN /// - Planet, + ISSN, /// - /// Enum value OneCode + /// Enum value ITF14 /// - OneCode, + ITF14, /// - /// Enum value RM4SCC + /// Enum value ITF6 /// - RM4SCC, + ITF6, /// - /// Enum value DatabarOmniDirectional + /// Enum value Interleaved2of5 /// - DatabarOmniDirectional, + Interleaved2of5, /// - /// Enum value DatabarTruncated + /// Enum value ItalianPost25 /// - DatabarTruncated, + ItalianPost25, /// - /// Enum value DatabarLimited + /// Enum value MSI /// - DatabarLimited, + MSI, /// - /// Enum value DatabarExpanded + /// Enum value MacroPdf417 /// - DatabarExpanded, + MacroPdf417, /// - /// Enum value SingaporePost + /// Enum value Mailmark /// - SingaporePost, + Mailmark, /// - /// Enum value GS1DataMatrix + /// Enum value Matrix2of5 /// - GS1DataMatrix, + Matrix2of5, /// - /// Enum value AustralianPosteParcel + /// Enum value MaxiCode /// - AustralianPosteParcel, + MaxiCode, /// - /// Enum value SwissPostParcel + /// Enum value MicroPdf417 /// - SwissPostParcel, + MicroPdf417, /// - /// Enum value PatchCode + /// Enum value MicroQR /// - PatchCode, + MicroQR, /// - /// Enum value DatabarExpandedStacked + /// Enum value OPC /// - DatabarExpandedStacked, + OPC, /// - /// Enum value DatabarStacked + /// Enum value OneCode /// - DatabarStacked, + OneCode, /// - /// Enum value DatabarStackedOmniDirectional + /// Enum value PZN /// - DatabarStackedOmniDirectional, + PZN, /// - /// Enum value MicroPdf417 + /// Enum value PatchCode /// - MicroPdf417, + PatchCode, /// - /// Enum value GS1QR + /// Enum value Pdf417 /// - GS1QR, + Pdf417, /// - /// Enum value MaxiCode + /// Enum value Pharmacode /// - MaxiCode, + Pharmacode, /// - /// Enum value Code32 + /// Enum value Planet /// - Code32, + Planet, /// - /// Enum value DataLogic2of5 + /// Enum value Postnet /// - DataLogic2of5, + Postnet, /// - /// Enum value DotCode + /// Enum value RM4SCC /// - DotCode, + RM4SCC, /// - /// Enum value DutchKIX + /// Enum value RectMicroQR /// - DutchKIX, + RectMicroQR, /// - /// Enum value UpcaGs1Code128Coupon + /// Enum value SCC14 /// - UpcaGs1Code128Coupon, + SCC14, /// - /// Enum value UpcaGs1DatabarCoupon + /// Enum value SSCC18 /// - UpcaGs1DatabarCoupon, + SSCC18, /// - /// Enum value CodablockF + /// Enum value SingaporePost /// - CodablockF, + SingaporePost, /// - /// Enum value GS1CodablockF + /// Enum value Standard2of5 /// - GS1CodablockF, + Standard2of5, /// - /// Enum value Mailmark + /// Enum value SwissPostParcel /// - Mailmark, + SwissPostParcel, /// - /// Enum value GS1DotCode + /// Enum value UPCA /// - GS1DotCode, + UPCA, /// - /// Enum value HanXin + /// Enum value UPCE /// - HanXin, + UPCE, /// - /// Enum value GS1HanXin + /// Enum value UpcaGs1Code128Coupon /// - GS1HanXin, + UpcaGs1Code128Coupon, /// - /// Enum value GS1Aztec + /// Enum value UpcaGs1DatabarCoupon /// - GS1Aztec, + UpcaGs1DatabarCoupon, /// - /// Enum value GS1MicroPdf417 + /// Enum value VIN /// - GS1MicroPdf417 + VIN } } diff --git a/src/Model/FilesUploadResult.cs b/src/Model/EncodeData.cs similarity index 76% rename from src/Model/FilesUploadResult.cs rename to src/Model/EncodeData.cs index 854116e..0a707b2 100644 --- a/src/Model/FilesUploadResult.cs +++ b/src/Model/EncodeData.cs @@ -8,19 +8,19 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// File upload result + /// Data to encode in barcode /// - public class FilesUploadResult : IToString + public class EncodeData : IToString { /// - /// List of uploaded file names + /// Gets or sets DataType /// - public List Uploaded { get; set; } + public EncodeDataType? DataType { get; set; } /// - /// List of errors. + /// String represents data to encode /// - public List Errors { get; set; } + public string Data { get; set; } /// /// Get the string presentation of the object diff --git a/src/Model/ChecksumValidation.cs b/src/Model/EncodeDataType.cs similarity index 57% rename from src/Model/ChecksumValidation.cs rename to src/Model/EncodeDataType.cs index 38289c7..1045a4b 100644 --- a/src/Model/ChecksumValidation.cs +++ b/src/Model/EncodeDataType.cs @@ -6,25 +6,25 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// Types of data can be encoded to barcode /// [JsonConverter(typeof(StringEnumConverter))] - public enum ChecksumValidation + public enum EncodeDataType { /// - /// Enum value Default + /// Enum value StringData /// - Default, + StringData, /// - /// Enum value On + /// Enum value Base64Bytes /// - On, + Base64Bytes, /// - /// Enum value Off + /// Enum value HexBytes /// - Off + HexBytes } } diff --git a/src/Model/Error.cs b/src/Model/Error.cs deleted file mode 100644 index 6d1eb2e..0000000 --- a/src/Model/Error.cs +++ /dev/null @@ -1,53 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Error - /// - public class Error : IToString - { - /// - /// Code - /// - public string Code { get; set; } - - /// - /// Message - /// - public string Message { get; set; } - - /// - /// Description - /// - public string Description { get; set; } - - /// - /// Inner Error - /// - public ErrorDetails InnerError { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/ErrorDetails.cs b/src/Model/ErrorDetails.cs deleted file mode 100644 index 3799f98..0000000 --- a/src/Model/ErrorDetails.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// The error details - /// - public class ErrorDetails : IToString - { - /// - /// The request id - /// - public string RequestId { get; set; } - - /// - /// Date - /// - public DateTime? Date { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/FileVersion.cs b/src/Model/FileVersion.cs deleted file mode 100644 index 96b7fc0..0000000 --- a/src/Model/FileVersion.cs +++ /dev/null @@ -1,68 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - public class FileVersion : IToString - { - /// - /// File or folder name. - /// - public string Name { get; set; } - - /// - /// True if it is a folder. - /// - public bool? IsFolder { get; set; } - - /// - /// File or folder last modified DateTime. - /// - public DateTime? ModifiedDate { get; set; } - - /// - /// File or folder size. - /// - public long? Size { get; set; } - - /// - /// File or folder path. - /// - public string Path { get; set; } - - /// - /// File Version ID. - /// - public string VersionId { get; set; } - - /// - /// Specifies whether the file is (true) or is not (false) the latest version of an file. - /// - public bool? IsLatest { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/FileVersions.cs b/src/Model/FileVersions.cs deleted file mode 100644 index 666b824..0000000 --- a/src/Model/FileVersions.cs +++ /dev/null @@ -1,38 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// File versions FileVersion. - /// - public class FileVersions : IToString - { - /// - /// File versions FileVersion. - /// - public List Value { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/FilesList.cs b/src/Model/FilesList.cs deleted file mode 100644 index 9065f75..0000000 --- a/src/Model/FilesList.cs +++ /dev/null @@ -1,38 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Files list - /// - public class FilesList : IToString - { - /// - /// Files and folders contained by folder StorageFile. - /// - public List Value { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/FontMode.cs b/src/Model/FontMode.cs deleted file mode 100644 index 9ea39a3..0000000 --- a/src/Model/FontMode.cs +++ /dev/null @@ -1,25 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FontMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Manual - /// - Manual - - } -} diff --git a/src/Model/FontParams.cs b/src/Model/FontParams.cs deleted file mode 100644 index 6c2c0c3..0000000 --- a/src/Model/FontParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Font. - /// - public class FontParams : IToString - { - /// - /// Font style. - /// - public FontStyle? Style { get; set; } - - /// - /// Font family. - /// - public string Family { get; set; } - - /// - /// Font size in units. - /// - public double? Size { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/GeneratorParamsList.cs b/src/Model/GenerateParams.cs similarity index 69% rename from src/Model/GeneratorParamsList.cs rename to src/Model/GenerateParams.cs index 0fcb8e4..ccba897 100644 --- a/src/Model/GeneratorParamsList.cs +++ b/src/Model/GenerateParams.cs @@ -8,24 +8,24 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// Represents list of barcode generators + /// Barcode generation parameters /// - public class GeneratorParamsList : IToString + public class GenerateParams : IToString { /// - /// List of barcode generators + /// Gets or sets BarcodeType /// - public List BarcodeBuilders { get; set; } + public EncodeBarcodeType? BarcodeType { get; set; } /// - /// Shift step according to X axis + /// Gets or sets EncodeData /// - public int? XStep { get; set; } + public EncodeData EncodeData { get; set; } /// - /// Shift step according to Y axis + /// Gets or sets BarcodeImageParams /// - public int? YStep { get; set; } + public BarcodeImageParams BarcodeImageParams { get; set; } /// /// Get the string presentation of the object diff --git a/src/Model/GeneratorParams.cs b/src/Model/GeneratorParams.cs deleted file mode 100644 index acaaf5a..0000000 --- a/src/Model/GeneratorParams.cs +++ /dev/null @@ -1,315 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Represents extended BarcodeGenerator params. - /// - public class GeneratorParams : IToString - { - /// - /// Type of barcode to generate. - /// - public EncodeBarcodeType? TypeOfBarcode { get; set; } - - /// - /// Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. - /// - public CodeLocation? TextLocation { get; set; } - - /// - /// Text alignment. - /// - public TextAlignment? TextAlignment { get; set; } - - /// - /// Specify FontSizeMode. If FontSizeMode is set to Auto, font size will be calculated automatically based on xDimension value. It is recommended to use FontSizeMode.Auto especially in AutoSizeMode.Nearest or AutoSizeMode.Interpolation. Default value: FontSizeMode.Auto. - /// - public FontMode? FontSizeMode { get; set; } - - /// - /// Common Units for all measuring in query. Default units: pixel. - /// - public AvailableGraphicsUnit? Units { get; set; } - - /// - /// Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. - /// - public AutoSizeMode? SizeMode { get; set; } - - /// - /// Border dash style. Default value: BorderDashStyle.Solid. - /// - public BorderDashStyle? BorderDashStyle { get; set; } - - /// - /// Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology - /// - public EnableChecksum? EnableChecksum { get; set; } - - /// - /// Text to encode. - /// - public string Text { get; set; } - - /// - /// Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode - /// - public string TwoDDisplayText { get; set; } - - /// - /// Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string TextColor { get; set; } - - /// - /// Specify the displaying Text's font. Default value: Arial 5pt regular. Ignored if FontSizeMode is set to FontSizeMode.Auto. - /// - public FontParams Font { get; set; } - - /// - /// Specify word wraps (line breaks) within text. Default value: false. - /// - public bool? NoWrap { get; set; } - - /// - /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. - /// - public double? Resolution { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionX { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionY { get; set; } - - /// - /// The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. - /// - public double? DimensionX { get; set; } - - /// - /// Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. - /// - public double? TextSpace { get; set; } - - /// - /// Height of the barcode in given units. Default units: pixel. - /// - public double? BarHeight { get; set; } - - /// - /// Height of the barcode image in given units. Default units: pixel. - /// - public double? ImageHeight { get; set; } - - /// - /// Width of the barcode image in given units. Default units: pixel. - /// - public double? ImageWidth { get; set; } - - /// - /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. - /// - public double? RotationAngle { get; set; } - - /// - /// Barcode paddings. Default value: 5pt 5pt 5pt 5pt. - /// - public Padding Padding { get; set; } - - /// - /// Additional caption above barcode. - /// - public CaptionParams CaptionAbove { get; set; } - - /// - /// Additional caption below barcode. - /// - public CaptionParams CaptionBelow { get; set; } - - /// - /// Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BackColor { get; set; } - - /// - /// Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BarColor { get; set; } - - /// - /// Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BorderColor { get; set; } - - /// - /// Border width. Default value: 0. Ignored if Visible is set to false. - /// - public double? BorderWidth { get; set; } - - /// - /// Border visibility. If false than parameter Width is always ignored (0). Default value: false. - /// - public bool? BorderVisible { get; set; } - - /// - /// Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. - /// - public bool? EnableEscape { get; set; } - - /// - /// Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. - /// - public bool? FilledBars { get; set; } - - /// - /// Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. - /// - public bool? AlwaysShowChecksum { get; set; } - - /// - /// Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard - /// - public double? WideNarrowRatio { get; set; } - - /// - /// Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. - /// - public bool? ValidateText { get; set; } - - /// - /// Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. - /// - public string SupplementData { get; set; } - - /// - /// Space between main the BarCode and supplement BarCode. - /// - public double? SupplementSpace { get; set; } - - /// - /// Bars reduction value that is used to compensate ink spread while printing. - /// - public double? BarWidthReduction { get; set; } - - /// - /// Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. - /// - public bool? UseAntiAlias { get; set; } - - /// - /// AustralianPost params. - /// - public AustralianPostParams AustralianPost { get; set; } - - /// - /// Aztec params. - /// - public AztecParams Aztec { get; set; } - - /// - /// Codabar params. - /// - public CodabarParams Codabar { get; set; } - - /// - /// Codablock params. - /// - public CodablockParams Codablock { get; set; } - - /// - /// Code16K params. - /// - public Code16KParams Code16K { get; set; } - - /// - /// Coupon params. - /// - public CouponParams Coupon { get; set; } - - /// - /// DataBar params. - /// - public DataBarParams DataBar { get; set; } - - /// - /// DataMatrix params. - /// - public DataMatrixParams DataMatrix { get; set; } - - /// - /// DotCode params. - /// - public DotCodeParams DotCode { get; set; } - - /// - /// ITF params. - /// - public ITFParams ITF { get; set; } - - /// - /// MaxiCode params. - /// - public MaxiCodeParams MaxiCode { get; set; } - - /// - /// Pdf417 params. - /// - public Pdf417Params Pdf417 { get; set; } - - /// - /// Postal params. - /// - public PostalParams Postal { get; set; } - - /// - /// QR params. - /// - public QrParams QR { get; set; } - - /// - /// PatchCode params. - /// - public PatchCodeParams PatchCode { get; set; } - - /// - /// Code128 parameters - /// - public Code128Params Code128 { get; set; } - - /// - /// HanXin params. - /// - public HanXinParams HanXin { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/AvailableGraphicsUnit.cs b/src/Model/GraphicsUnit.cs similarity index 87% rename from src/Model/AvailableGraphicsUnit.cs rename to src/Model/GraphicsUnit.cs index 96c7954..0debdc4 100644 --- a/src/Model/AvailableGraphicsUnit.cs +++ b/src/Model/GraphicsUnit.cs @@ -6,10 +6,10 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// Subset of GraphicsUnit. + /// Subset of Aspose.Drawing.GraphicsUnit. /// [JsonConverter(typeof(StringEnumConverter))] - public enum AvailableGraphicsUnit + public enum GraphicsUnit { /// /// Enum value Pixel diff --git a/src/Model/HanXinEncodeMode.cs b/src/Model/HanXinEncodeMode.cs deleted file mode 100644 index 4114477..0000000 --- a/src/Model/HanXinEncodeMode.cs +++ /dev/null @@ -1,45 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum HanXinEncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Binary - /// - Binary, - - /// - /// Enum value ECI - /// - ECI, - - /// - /// Enum value Unicode - /// - Unicode, - - /// - /// Enum value URI - /// - URI, - - /// - /// Enum value Extended - /// - Extended - - } -} diff --git a/src/Model/HanXinErrorLevel.cs b/src/Model/HanXinErrorLevel.cs deleted file mode 100644 index 0fdb789..0000000 --- a/src/Model/HanXinErrorLevel.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum HanXinErrorLevel - { - /// - /// Enum value L1 - /// - L1, - - /// - /// Enum value L2 - /// - L2, - - /// - /// Enum value L3 - /// - L3, - - /// - /// Enum value L4 - /// - L4 - - } -} diff --git a/src/Model/HanXinParams.cs b/src/Model/HanXinParams.cs deleted file mode 100644 index 326d68b..0000000 --- a/src/Model/HanXinParams.cs +++ /dev/null @@ -1,53 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// HanXin params. - /// - public class HanXinParams : IToString - { - /// - /// Encoding mode for XanXin barcodes. Default value: HanXinEncodeMode.Auto. - /// - public HanXinEncodeMode? EncodeMode { get; set; } - - /// - /// Allowed Han Xin error correction levels from L1 to L4. Default value: HanXinErrorLevel.L1. - /// - public HanXinErrorLevel? ErrorLevel { get; set; } - - /// - /// Allowed Han Xin versions, Auto and Version01 - Version84. Default value: HanXinVersion.Auto. - /// - public HanXinVersion? Version { get; set; } - - /// - /// Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Default value: ECIEncodings.ISO_8859_1 - /// - public ECIEncodings? ECIEncoding { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/HanXinVersion.cs b/src/Model/HanXinVersion.cs deleted file mode 100644 index 282079d..0000000 --- a/src/Model/HanXinVersion.cs +++ /dev/null @@ -1,440 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum HanXinVersion - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Version01 - /// - Version01, - - /// - /// Enum value Version02 - /// - Version02, - - /// - /// Enum value Version03 - /// - Version03, - - /// - /// Enum value Version04 - /// - Version04, - - /// - /// Enum value Version05 - /// - Version05, - - /// - /// Enum value Version06 - /// - Version06, - - /// - /// Enum value Version07 - /// - Version07, - - /// - /// Enum value Version08 - /// - Version08, - - /// - /// Enum value Version09 - /// - Version09, - - /// - /// Enum value Version10 - /// - Version10, - - /// - /// Enum value Version11 - /// - Version11, - - /// - /// Enum value Version12 - /// - Version12, - - /// - /// Enum value Version13 - /// - Version13, - - /// - /// Enum value Version14 - /// - Version14, - - /// - /// Enum value Version15 - /// - Version15, - - /// - /// Enum value Version16 - /// - Version16, - - /// - /// Enum value Version17 - /// - Version17, - - /// - /// Enum value Version18 - /// - Version18, - - /// - /// Enum value Version19 - /// - Version19, - - /// - /// Enum value Version20 - /// - Version20, - - /// - /// Enum value Version21 - /// - Version21, - - /// - /// Enum value Version22 - /// - Version22, - - /// - /// Enum value Version23 - /// - Version23, - - /// - /// Enum value Version24 - /// - Version24, - - /// - /// Enum value Version25 - /// - Version25, - - /// - /// Enum value Version26 - /// - Version26, - - /// - /// Enum value Version27 - /// - Version27, - - /// - /// Enum value Version28 - /// - Version28, - - /// - /// Enum value Version29 - /// - Version29, - - /// - /// Enum value Version30 - /// - Version30, - - /// - /// Enum value Version31 - /// - Version31, - - /// - /// Enum value Version32 - /// - Version32, - - /// - /// Enum value Version33 - /// - Version33, - - /// - /// Enum value Version34 - /// - Version34, - - /// - /// Enum value Version35 - /// - Version35, - - /// - /// Enum value Version36 - /// - Version36, - - /// - /// Enum value Version37 - /// - Version37, - - /// - /// Enum value Version38 - /// - Version38, - - /// - /// Enum value Version39 - /// - Version39, - - /// - /// Enum value Version40 - /// - Version40, - - /// - /// Enum value Version41 - /// - Version41, - - /// - /// Enum value Version42 - /// - Version42, - - /// - /// Enum value Version43 - /// - Version43, - - /// - /// Enum value Version44 - /// - Version44, - - /// - /// Enum value Version45 - /// - Version45, - - /// - /// Enum value Version46 - /// - Version46, - - /// - /// Enum value Version47 - /// - Version47, - - /// - /// Enum value Version48 - /// - Version48, - - /// - /// Enum value Version49 - /// - Version49, - - /// - /// Enum value Version50 - /// - Version50, - - /// - /// Enum value Version51 - /// - Version51, - - /// - /// Enum value Version52 - /// - Version52, - - /// - /// Enum value Version53 - /// - Version53, - - /// - /// Enum value Version54 - /// - Version54, - - /// - /// Enum value Version55 - /// - Version55, - - /// - /// Enum value Version56 - /// - Version56, - - /// - /// Enum value Version57 - /// - Version57, - - /// - /// Enum value Version58 - /// - Version58, - - /// - /// Enum value Version59 - /// - Version59, - - /// - /// Enum value Version60 - /// - Version60, - - /// - /// Enum value Version61 - /// - Version61, - - /// - /// Enum value Version62 - /// - Version62, - - /// - /// Enum value Version63 - /// - Version63, - - /// - /// Enum value Version64 - /// - Version64, - - /// - /// Enum value Version65 - /// - Version65, - - /// - /// Enum value Version66 - /// - Version66, - - /// - /// Enum value Version67 - /// - Version67, - - /// - /// Enum value Version68 - /// - Version68, - - /// - /// Enum value Version69 - /// - Version69, - - /// - /// Enum value Version70 - /// - Version70, - - /// - /// Enum value Version71 - /// - Version71, - - /// - /// Enum value Version72 - /// - Version72, - - /// - /// Enum value Version73 - /// - Version73, - - /// - /// Enum value Version74 - /// - Version74, - - /// - /// Enum value Version75 - /// - Version75, - - /// - /// Enum value Version76 - /// - Version76, - - /// - /// Enum value Version77 - /// - Version77, - - /// - /// Enum value Version78 - /// - Version78, - - /// - /// Enum value Version79 - /// - Version79, - - /// - /// Enum value Version80 - /// - Version80, - - /// - /// Enum value Version81 - /// - Version81, - - /// - /// Enum value Version82 - /// - Version82, - - /// - /// Enum value Version83 - /// - Version83, - - /// - /// Enum value Version84 - /// - Version84 - - } -} diff --git a/src/Model/ITF14BorderType.cs b/src/Model/ITF14BorderType.cs deleted file mode 100644 index f93046a..0000000 --- a/src/Model/ITF14BorderType.cs +++ /dev/null @@ -1,40 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ITF14BorderType - { - /// - /// Enum value None - /// - None, - - /// - /// Enum value Frame - /// - Frame, - - /// - /// Enum value Bar - /// - Bar, - - /// - /// Enum value FrameOut - /// - FrameOut, - - /// - /// Enum value BarOut - /// - BarOut - - } -} diff --git a/src/Model/ITFParams.cs b/src/Model/ITFParams.cs deleted file mode 100644 index b38c796..0000000 --- a/src/Model/ITFParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// ITF parameters. - /// - public class ITFParams : IToString - { - /// - /// Border type of ITF barcode. Default value: ITF14BorderType.Bar. - /// - public ITF14BorderType? BorderType { get; set; } - - /// - /// ITF border (bearer bar) thickness in Unit value. Default value: 12pt. - /// - public double? BorderThickness { get; set; } - - /// - /// Size of the quiet zones in xDimension. Default value: 10, meaning if xDimension = 2px than quiet zones will be 20px. - /// - public int? QuietZoneCoef { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/MacroCharacter.cs b/src/Model/MacroCharacter.cs deleted file mode 100644 index d3ec817..0000000 --- a/src/Model/MacroCharacter.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MacroCharacter - { - /// - /// Enum value None - /// - None, - - /// - /// Enum value Macro05 - /// - Macro05, - - /// - /// Enum value Macro06 - /// - Macro06 - - } -} diff --git a/src/Model/MaxiCodeEncodeMode.cs b/src/Model/MaxiCodeEncodeMode.cs deleted file mode 100644 index 923d13e..0000000 --- a/src/Model/MaxiCodeEncodeMode.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MaxiCodeEncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Bytes - /// - Bytes, - - /// - /// Enum value ExtendedCodetext - /// - ExtendedCodetext - - } -} diff --git a/src/Model/MaxiCodeMode.cs b/src/Model/MaxiCodeMode.cs deleted file mode 100644 index c4a9e9f..0000000 --- a/src/Model/MaxiCodeMode.cs +++ /dev/null @@ -1,40 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MaxiCodeMode - { - /// - /// Enum value Mode2 - /// - Mode2, - - /// - /// Enum value Mode3 - /// - Mode3, - - /// - /// Enum value Mode4 - /// - Mode4, - - /// - /// Enum value Mode5 - /// - Mode5, - - /// - /// Enum value Mode6 - /// - Mode6 - - } -} diff --git a/src/Model/MaxiCodeParams.cs b/src/Model/MaxiCodeParams.cs deleted file mode 100644 index 375c59e..0000000 --- a/src/Model/MaxiCodeParams.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// MaxiCode parameters. - /// - public class MaxiCodeParams : IToString - { - /// - /// Mode for MaxiCode barcodes. - /// - public MaxiCodeMode? Mode { get; set; } - - /// - /// Encoding mode for MaxiCode barcodes. - /// - public MaxiCodeEncodeMode? EncodeMode { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/ObjectExist.cs b/src/Model/ObjectExist.cs deleted file mode 100644 index f1dc359..0000000 --- a/src/Model/ObjectExist.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Object exists - /// - public class ObjectExist : IToString - { - /// - /// Indicates that the file or folder exists. - /// - public bool? Exists { get; set; } - - /// - /// True if it is a folder, false if it is a file. - /// - public bool? IsFolder { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/PatchCodeParams.cs b/src/Model/PatchCodeParams.cs deleted file mode 100644 index b7030f6..0000000 --- a/src/Model/PatchCodeParams.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// PatchCode parameters. - /// - public class PatchCodeParams : IToString - { - /// - /// PatchCode format. Choose PatchOnly to generate single PatchCode. Use page format to generate Patch page with PatchCodes as borders. Default value: PatchFormat.PatchOnly - /// - public PatchFormat? PatchFormat { get; set; } - - /// - /// Specifies codetext for an extra QR barcode, when PatchCode is generated in page mode. - /// - public string ExtraBarcodeText { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/PatchFormat.cs b/src/Model/PatchFormat.cs deleted file mode 100644 index c6bc828..0000000 --- a/src/Model/PatchFormat.cs +++ /dev/null @@ -1,40 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PatchFormat - { - /// - /// Enum value PatchOnly - /// - PatchOnly, - - /// - /// Enum value A4 - /// - A4, - - /// - /// Enum value A4_LANDSCAPE - /// - A4_LANDSCAPE, - - /// - /// Enum value US_Letter - /// - US_Letter, - - /// - /// Enum value US_Letter_LANDSCAPE - /// - US_Letter_LANDSCAPE - - } -} diff --git a/src/Model/Pdf417CompactionMode.cs b/src/Model/Pdf417CompactionMode.cs deleted file mode 100644 index 6d8de3a..0000000 --- a/src/Model/Pdf417CompactionMode.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Pdf417CompactionMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Text - /// - Text, - - /// - /// Enum value Numeric - /// - Numeric, - - /// - /// Enum value Binary - /// - Binary - - } -} diff --git a/src/Model/Pdf417ErrorLevel.cs b/src/Model/Pdf417ErrorLevel.cs deleted file mode 100644 index ed49de0..0000000 --- a/src/Model/Pdf417ErrorLevel.cs +++ /dev/null @@ -1,60 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Pdf417ErrorLevel - { - /// - /// Enum value Level0 - /// - Level0, - - /// - /// Enum value Level1 - /// - Level1, - - /// - /// Enum value Level2 - /// - Level2, - - /// - /// Enum value Level3 - /// - Level3, - - /// - /// Enum value Level4 - /// - Level4, - - /// - /// Enum value Level5 - /// - Level5, - - /// - /// Enum value Level6 - /// - Level6, - - /// - /// Enum value Level7 - /// - Level7, - - /// - /// Enum value Level8 - /// - Level8 - - } -} diff --git a/src/Model/Pdf417MacroTerminator.cs b/src/Model/Pdf417MacroTerminator.cs deleted file mode 100644 index 8a48a61..0000000 --- a/src/Model/Pdf417MacroTerminator.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Pdf417MacroTerminator - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value None - /// - None, - - /// - /// Enum value Set - /// - Set - - } -} diff --git a/src/Model/Pdf417Params.cs b/src/Model/Pdf417Params.cs deleted file mode 100644 index 824535c..0000000 --- a/src/Model/Pdf417Params.cs +++ /dev/null @@ -1,155 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// PDF417 parameters. - /// - public class Pdf417Params : IToString - { - /// - /// Pdf417 symbology type of BarCode's compaction mode. Default value: Pdf417CompactionMode.Auto. - /// - public Pdf417CompactionMode? CompactionMode { get; set; } - - /// - /// Pdf417 symbology type of BarCode's error correction level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture. - /// - public Pdf417ErrorLevel? ErrorLevel { get; set; } - - /// - /// Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. - /// - public ECIEncodings? Pdf417ECIEncoding { get; set; } - - /// - /// Extended Channel Interpretation Identifiers. Applies for Macro PDF417 text fields. - /// - public ECIEncodings? MacroECIEncoding { get; set; } - - /// - /// DEPRECATED: This property is obsolete and will be removed in future releases. See samples of using new parameters on https://releases.aspose.com/barcode/net/release-notes/2023/aspose-barcode-for-net-23-10-release-notes/ Function codeword for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes. - /// - [System.Obsolete("This property is obsolete and will be removed in future releases. See samples of using new parameters on https://releases.aspose.com/barcode/net/release-notes/2023/aspose-barcode-for-net-23-10-release-notes/ Function codeword for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes.", false)] - public Code128Emulation? Code128Emulation { get; set; } - - /// - /// Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417. - /// - public Pdf417MacroTerminator? Pdf417MacroTerminator { get; set; } - - /// - /// Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. Can be used only with MicroPdf417 and encodes 916 and 917 MicroPdf417 modes. Default value: MacroCharacters.None. - /// - public MacroCharacter? MacroCharacters { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. - /// - [System.Obsolete("This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext.", false)] - public string TextEncoding { get; set; } - - /// - /// Columns count. - /// - public int? Columns { get; set; } - - /// - /// Macro Pdf417 barcode's file ID. Used for MacroPdf417. - /// - public int? MacroFileID { get; set; } - - /// - /// Macro Pdf417 barcode's segment ID, which starts from 0, to MacroSegmentsCount - 1. - /// - public int? MacroSegmentID { get; set; } - - /// - /// Macro Pdf417 barcode segments count. - /// - public int? MacroSegmentsCount { get; set; } - - /// - /// Rows count. - /// - public int? Rows { get; set; } - - /// - /// Whether Pdf417 symbology type of BarCode is truncated (to reduce space). - /// - public bool? Truncate { get; set; } - - /// - /// Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization - /// - public bool? IsReaderInitialization { get; set; } - - /// - /// Macro Pdf417 barcode time stamp - /// - public DateTime? MacroTimeStamp { get; set; } - - /// - /// Macro Pdf417 barcode sender name - /// - public string MacroSender { get; set; } - - /// - /// Macro Pdf417 file size. The file size field contains the size in bytes of the entire source file - /// - public int? MacroFileSize { get; set; } - - /// - /// Macro Pdf417 barcode checksum. The checksum field contains the value of the 16-bit (2 bytes) CRC checksum using the CCITT-16 polynomial - /// - public int? MacroChecksum { get; set; } - - /// - /// Macro Pdf417 barcode file name - /// - public string MacroFileName { get; set; } - - /// - /// Macro Pdf417 barcode addressee name - /// - public string MacroAddressee { get; set; } - - /// - /// Can be used only with MicroPdf417 and encodes Code 128 emulation modes. Can encode FNC1 in second position modes 908 and 909, also can encode 910 and 911 which just indicate that recognized MicroPdf417 can be interpret as Code 128. - /// - public bool? IsCode128Emulation { get; set; } - - /// - /// Defines linked modes with GS1MicroPdf417, MicroPdf417 and Pdf417 barcodes. With GS1MicroPdf417 symbology encodes 906, 907, 912, 913, 914, 915 “Linked” UCC/EAN-128 modes. With MicroPdf417 and Pdf417 symbologies encodes 918 linkage flag to associated linear component other than an EAN.UCC. - /// - public bool? IsLinked { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/PostalParams.cs b/src/Model/PostalParams.cs deleted file mode 100644 index 441f2cd..0000000 --- a/src/Model/PostalParams.cs +++ /dev/null @@ -1,38 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Postal parameters. Used for Postnet, Planet. - /// - public class PostalParams : IToString - { - /// - /// Short bar's height of Postal barcodes. - /// - public double? ShortBarHeight { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/PresetType.cs b/src/Model/PresetType.cs deleted file mode 100644 index 149419e..0000000 --- a/src/Model/PresetType.cs +++ /dev/null @@ -1,45 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// See QualitySettings allows to configure recognition quality and speed manually. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PresetType - { - /// - /// Enum value HighPerformance - /// - HighPerformance, - - /// - /// Enum value NormalQuality - /// - NormalQuality, - - /// - /// Enum value HighQualityDetection - /// - HighQualityDetection, - - /// - /// Enum value MaxQualityDetection - /// - MaxQualityDetection, - - /// - /// Enum value HighQuality - /// - HighQuality, - - /// - /// Enum value MaxBarCodes - /// - MaxBarCodes - - } -} diff --git a/src/Model/QREncodeMode.cs b/src/Model/QREncodeMode.cs deleted file mode 100644 index 486b246..0000000 --- a/src/Model/QREncodeMode.cs +++ /dev/null @@ -1,45 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum QREncodeMode - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Bytes - /// - Bytes, - - /// - /// Enum value Utf8BOM - /// - Utf8BOM, - - /// - /// Enum value Utf16BEBOM - /// - Utf16BEBOM, - - /// - /// Enum value ECIEncoding - /// - ECIEncoding, - - /// - /// Enum value ExtendedCodetext - /// - ExtendedCodetext - - } -} diff --git a/src/Model/QREncodeType.cs b/src/Model/QREncodeType.cs deleted file mode 100644 index 728e297..0000000 --- a/src/Model/QREncodeType.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum QREncodeType - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value ForceQR - /// - ForceQR, - - /// - /// Enum value ForceMicroQR - /// - ForceMicroQR - - } -} diff --git a/src/Model/QRErrorLevel.cs b/src/Model/QRErrorLevel.cs deleted file mode 100644 index e189a7b..0000000 --- a/src/Model/QRErrorLevel.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum QRErrorLevel - { - /// - /// Enum value LevelL - /// - LevelL, - - /// - /// Enum value LevelM - /// - LevelM, - - /// - /// Enum value LevelQ - /// - LevelQ, - - /// - /// Enum value LevelH - /// - LevelH - - } -} diff --git a/src/Model/QRVersion.cs b/src/Model/QRVersion.cs deleted file mode 100644 index 9cabc4a..0000000 --- a/src/Model/QRVersion.cs +++ /dev/null @@ -1,240 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum QRVersion - { - /// - /// Enum value Auto - /// - Auto, - - /// - /// Enum value Version01 - /// - Version01, - - /// - /// Enum value Version02 - /// - Version02, - - /// - /// Enum value Version03 - /// - Version03, - - /// - /// Enum value Version04 - /// - Version04, - - /// - /// Enum value Version05 - /// - Version05, - - /// - /// Enum value Version06 - /// - Version06, - - /// - /// Enum value Version07 - /// - Version07, - - /// - /// Enum value Version08 - /// - Version08, - - /// - /// Enum value Version09 - /// - Version09, - - /// - /// Enum value Version10 - /// - Version10, - - /// - /// Enum value Version11 - /// - Version11, - - /// - /// Enum value Version12 - /// - Version12, - - /// - /// Enum value Version13 - /// - Version13, - - /// - /// Enum value Version14 - /// - Version14, - - /// - /// Enum value Version15 - /// - Version15, - - /// - /// Enum value Version16 - /// - Version16, - - /// - /// Enum value Version17 - /// - Version17, - - /// - /// Enum value Version18 - /// - Version18, - - /// - /// Enum value Version19 - /// - Version19, - - /// - /// Enum value Version20 - /// - Version20, - - /// - /// Enum value Version21 - /// - Version21, - - /// - /// Enum value Version22 - /// - Version22, - - /// - /// Enum value Version23 - /// - Version23, - - /// - /// Enum value Version24 - /// - Version24, - - /// - /// Enum value Version25 - /// - Version25, - - /// - /// Enum value Version26 - /// - Version26, - - /// - /// Enum value Version27 - /// - Version27, - - /// - /// Enum value Version28 - /// - Version28, - - /// - /// Enum value Version29 - /// - Version29, - - /// - /// Enum value Version30 - /// - Version30, - - /// - /// Enum value Version31 - /// - Version31, - - /// - /// Enum value Version32 - /// - Version32, - - /// - /// Enum value Version33 - /// - Version33, - - /// - /// Enum value Version34 - /// - Version34, - - /// - /// Enum value Version35 - /// - Version35, - - /// - /// Enum value Version36 - /// - Version36, - - /// - /// Enum value Version37 - /// - Version37, - - /// - /// Enum value Version38 - /// - Version38, - - /// - /// Enum value Version39 - /// - Version39, - - /// - /// Enum value Version40 - /// - Version40, - - /// - /// Enum value VersionM1 - /// - VersionM1, - - /// - /// Enum value VersionM2 - /// - VersionM2, - - /// - /// Enum value VersionM3 - /// - VersionM3, - - /// - /// Enum value VersionM4 - /// - VersionM4 - - } -} diff --git a/src/Model/QrParams.cs b/src/Model/QrParams.cs deleted file mode 100644 index a0cc182..0000000 --- a/src/Model/QrParams.cs +++ /dev/null @@ -1,74 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// QR parameters. - /// - public class QrParams : IToString - { - /// - /// QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR. - /// - public QREncodeType? EncodeType { get; set; } - - /// - /// Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. - /// - public ECIEncodings? ECIEncoding { get; set; } - - /// - /// QR symbology type of BarCode's encoding mode. Default value: QREncodeMode.Auto. - /// - public QREncodeMode? EncodeMode { get; set; } - - /// - /// Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel. - /// - public QRErrorLevel? ErrorLevel { get; set; } - - /// - /// Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr. Default value is QRVersion.Auto. - /// - public QRVersion? Version { get; set; } - - /// - /// Height/Width ratio of 2D BarCode module. - /// - public double? AspectRatio { get; set; } - - /// - /// DEPRECATED: This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext. - /// - [System.Obsolete("This property is obsolete and will be removed in future releases. Unicode symbols detection and encoding will be processed in Auto mode with Extended Channel Interpretation charset designator. Using of own encodings requires manual CodeText encoding into byte[] array. Sets the encoding of codetext.", false)] - public string TextEncoding { get; set; } - - /// - /// QR structured append parameters. - /// - public StructuredAppend StructuredAppend { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/ReaderParams.cs b/src/Model/ReaderParams.cs deleted file mode 100644 index 6a8028e..0000000 --- a/src/Model/ReaderParams.cs +++ /dev/null @@ -1,213 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Represents BarcodeReader object. - /// - public class ReaderParams : IToString - { - /// - /// The type of barcode to read. - /// - public DecodeBarcodeType? Type { get; set; } - - /// - /// Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies - /// - public ChecksumValidation? ChecksumValidation { get; set; } - - /// - /// Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. - /// - public PresetType? Preset { get; set; } - - /// - /// Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. - /// - public CustomerInformationInterpretingType? AustralianPostEncodingTable { get; set; } - - /// - /// Multiple barcode types to read. - /// - public List Types { get; set; } - - /// - /// A flag which force engine to detect codetext encoding for Unicode. - /// - public bool? DetectEncoding { get; set; } - - /// - /// Set X of top left corner of area for recognition. - /// - public int? RectX { get; set; } - - /// - /// Set Y of top left corner of area for recognition. - /// - public int? RectY { get; set; } - - /// - /// Set Width of area for recognition. - /// - public int? RectWidth { get; set; } - - /// - /// Set Height of area for recognition. - /// - public int? RectHeight { get; set; } - - /// - /// Value indicating whether FNC symbol strip must be done. - /// - public bool? StripFNC { get; set; } - - /// - /// Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. - /// - public int? Timeout { get; set; } - - /// - /// Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. - /// - public int? MedianSmoothingWindowSize { get; set; } - - /// - /// Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. - /// - public bool? AllowMedianSmoothing { get; set; } - - /// - /// Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. - /// - public bool? AllowComplexBackground { get; set; } - - /// - /// Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. - /// - public bool? AllowDatamatrixIndustrialBarcodes { get; set; } - - /// - /// Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. - /// - public bool? AllowDecreasedImage { get; set; } - - /// - /// Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. - /// - public bool? AllowDetectScanGap { get; set; } - - /// - /// Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. - /// - public bool? AllowIncorrectBarcodes { get; set; } - - /// - /// Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. - /// - public bool? AllowInvertImage { get; set; } - - /// - /// Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. - /// - public bool? AllowMicroWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. - /// - public bool? AllowOneDFastBarcodesDetector { get; set; } - - /// - /// Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. - /// - public bool? AllowOneDWipedBarsRestoration { get; set; } - - /// - /// Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. - /// - public bool? AllowQRMicroQrRestoration { get; set; } - - /// - /// Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. - /// - public bool? AllowRegularImage { get; set; } - - /// - /// Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. - /// - public bool? AllowSaltAndPepperFiltering { get; set; } - - /// - /// Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. - /// - public bool? AllowWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. - /// - public bool? CheckMore1DVariants { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. - /// - public bool? FastScanOnly { get; set; } - - /// - /// Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. - /// - public bool? AllowAdditionalRestorations { get; set; } - - /// - /// Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. - /// - public double? RegionLikelihoodThresholdPercent { get; set; } - - /// - /// Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. - /// - public List ScanWindowSizes { get; set; } - - /// - /// Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] - /// - public double? Similarity { get; set; } - - /// - /// Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. - /// - public bool? SkipDiagonalSearch { get; set; } - - /// - /// Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. - /// - public bool? ReadTinyBarcodes { get; set; } - - /// - /// The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". - /// - public bool? IgnoreEndingFillingPatternsForCTable { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/AztecEncodeMode.cs b/src/Model/RecognitionImageKind.cs similarity index 57% rename from src/Model/AztecEncodeMode.cs rename to src/Model/RecognitionImageKind.cs index e2b0c50..275b31e 100644 --- a/src/Model/AztecEncodeMode.cs +++ b/src/Model/RecognitionImageKind.cs @@ -6,25 +6,25 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// Kind of image to recognize /// [JsonConverter(typeof(StringEnumConverter))] - public enum AztecEncodeMode + public enum RecognitionImageKind { /// - /// Enum value Auto + /// Enum value Photo /// - Auto, + Photo, /// - /// Enum value Bytes + /// Enum value ScannedDocument /// - Bytes, + ScannedDocument, /// - /// Enum value ExtendedCodetext + /// Enum value ClearImage /// - ExtendedCodetext + ClearImage } } diff --git a/src/Model/AutoSizeMode.cs b/src/Model/RecognitionMode.cs similarity index 61% rename from src/Model/AutoSizeMode.cs rename to src/Model/RecognitionMode.cs index dcb7cfd..27def47 100644 --- a/src/Model/AutoSizeMode.cs +++ b/src/Model/RecognitionMode.cs @@ -6,25 +6,25 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// + /// Recognition mode. /// [JsonConverter(typeof(StringEnumConverter))] - public enum AutoSizeMode + public enum RecognitionMode { /// - /// Enum value None + /// Enum value Fast /// - None, + Fast, /// - /// Enum value Nearest + /// Enum value Normal /// - Nearest, + Normal, /// - /// Enum value Interpolation + /// Enum value Excellent /// - Interpolation + Excellent } } diff --git a/src/Model/Padding.cs b/src/Model/RecognizeBase64Request.cs similarity index 63% rename from src/Model/Padding.cs rename to src/Model/RecognizeBase64Request.cs index 5f957ba..3ad9324 100644 --- a/src/Model/Padding.cs +++ b/src/Model/RecognizeBase64Request.cs @@ -8,29 +8,29 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// Padding around barcode. + /// Barcode recognize request /// - public class Padding : IToString + public class RecognizeBase64Request : IToString { /// - /// Left padding. + /// Gets or sets RecognitionMode /// - public double? Left { get; set; } + public RecognitionMode? RecognitionMode { get; set; } /// - /// Right padding. + /// Gets or sets RecognitionImageKind /// - public double? Right { get; set; } + public RecognitionImageKind? RecognitionImageKind { get; set; } /// - /// Top padding. + /// Array of decode types to find on barcode /// - public double? Top { get; set; } + public List BarcodeTypes { get; set; } /// - /// Bottom padding. + /// Barcode image bytes encoded as base-64. /// - public double? Bottom { get; set; } + public string FileBase64 { get; set; } /// /// Get the string presentation of the object diff --git a/src/Model/RegionPoint.cs b/src/Model/RegionPoint.cs index ce375ea..8499c5a 100644 --- a/src/Model/RegionPoint.cs +++ b/src/Model/RegionPoint.cs @@ -15,12 +15,12 @@ public class RegionPoint : IToString /// /// X-coordinate /// - public int? X { get; set; } + public int X { get; set; } /// /// Y-coordinate /// - public int? Y { get; set; } + public int Y { get; set; } /// /// Get the string presentation of the object diff --git a/src/Model/Requests/CopyFileRequest.cs b/src/Model/Requests/CopyFileRequest.cs deleted file mode 100644 index 2fb91e4..0000000 --- a/src/Model/Requests/CopyFileRequest.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class CopyFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Source file path e.g. '/folder/file.ext' - /// Destination file path - public CopyFileRequest(string srcPath, string destPath) - { - this.srcPath = srcPath; - this.destPath = destPath; - } - - /// - /// Source file path e.g. '/folder/file.ext' - /// - public string srcPath { get; set; } - - /// - /// Destination file path - /// - public string destPath { get; set; } - - /// - /// Source storage name - /// - public string srcStorageName { get; set; } - - /// - /// Destination storage name - /// - public string destStorageName { get; set; } - - /// - /// File version ID to copy - /// - public string versionId { get; set; } - } -} diff --git a/src/Model/Requests/CopyFolderRequest.cs b/src/Model/Requests/CopyFolderRequest.cs deleted file mode 100644 index c4eb966..0000000 --- a/src/Model/Requests/CopyFolderRequest.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class CopyFolderRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Source folder path e.g. '/src' - /// Destination folder path e.g. '/dst' - public CopyFolderRequest(string srcPath, string destPath) - { - this.srcPath = srcPath; - this.destPath = destPath; - } - - /// - /// Source folder path e.g. '/src' - /// - public string srcPath { get; set; } - - /// - /// Destination folder path e.g. '/dst' - /// - public string destPath { get; set; } - - /// - /// Source storage name - /// - public string srcStorageName { get; set; } - - /// - /// Destination storage name - /// - public string destStorageName { get; set; } - } -} diff --git a/src/Model/Requests/CreateFolderRequest.cs b/src/Model/Requests/CreateFolderRequest.cs deleted file mode 100644 index d861835..0000000 --- a/src/Model/Requests/CreateFolderRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class CreateFolderRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Folder path to create e.g. 'folder_1/folder_2/' - public CreateFolderRequest(string path) - { - this.path = path; - } - - /// - /// Folder path to create e.g. 'folder_1/folder_2/' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} diff --git a/src/Model/Requests/DeleteFileRequest.cs b/src/Model/Requests/DeleteFileRequest.cs deleted file mode 100644 index b3ce6a1..0000000 --- a/src/Model/Requests/DeleteFileRequest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class DeleteFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// File path e.g. '/folder/file.ext' - public DeleteFileRequest(string path) - { - this.path = path; - } - - /// - /// File path e.g. '/folder/file.ext' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - - /// - /// File version ID to delete - /// - public string versionId { get; set; } - } -} diff --git a/src/Model/Requests/DeleteFolderRequest.cs b/src/Model/Requests/DeleteFolderRequest.cs deleted file mode 100644 index c8099d7..0000000 --- a/src/Model/Requests/DeleteFolderRequest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class DeleteFolderRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Folder path e.g. '/folder' - public DeleteFolderRequest(string path) - { - this.path = path; - } - - /// - /// Folder path e.g. '/folder' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - - /// - /// Enable to delete folders, subfolders and files - /// - public bool? recursive { get; set; } - } -} diff --git a/src/Model/Requests/DownloadFileRequest.cs b/src/Model/Requests/DownloadFileRequest.cs deleted file mode 100644 index 77b1e8c..0000000 --- a/src/Model/Requests/DownloadFileRequest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class DownloadFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// File path e.g. '/folder/file.ext' - public DownloadFileRequest(string path) - { - this.path = path; - } - - /// - /// File path e.g. '/folder/file.ext' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - - /// - /// File version ID to download - /// - public string versionId { get; set; } - } -} diff --git a/src/Model/Requests/GetBarcodeGenerateRequest.cs b/src/Model/Requests/GetBarcodeGenerateRequest.cs deleted file mode 100644 index 0424276..0000000 --- a/src/Model/Requests/GetBarcodeGenerateRequest.cs +++ /dev/null @@ -1,226 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class GetBarcodeGenerateRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Type of barcode to generate. - /// Text to encode. - public GetBarcodeGenerateRequest(string type, string text) - { - this.Type = type; - this.Text = text; - } - - /// - /// Type of barcode to generate. - /// - public string Type { get; set; } - - /// - /// Text to encode. - /// - public string Text { get; set; } - - /// - /// Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode - /// - public string TwoDDisplayText { get; set; } - - /// - /// Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. - /// - public string TextLocation { get; set; } - - /// - /// Text alignment. - /// - public string TextAlignment { get; set; } - - /// - /// Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string TextColor { get; set; } - - /// - /// Specify word wraps (line breaks) within text. Default value: false. - /// - public bool? NoWrap { get; set; } - - /// - /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. - /// - public double? Resolution { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionX { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionY { get; set; } - - /// - /// The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. - /// - public double? DimensionX { get; set; } - - /// - /// Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. - /// - public double? TextSpace { get; set; } - - /// - /// Common Units for all measuring in query. Default units: pixel. - /// - public string Units { get; set; } - - /// - /// Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. - /// - public string SizeMode { get; set; } - - /// - /// Height of the barcode in given units. Default units: pixel. - /// - public double? BarHeight { get; set; } - - /// - /// Height of the barcode image in given units. Default units: pixel. - /// - public double? ImageHeight { get; set; } - - /// - /// Width of the barcode image in given units. Default units: pixel. - /// - public double? ImageWidth { get; set; } - - /// - /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. - /// - public double? RotationAngle { get; set; } - - /// - /// Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BackColor { get; set; } - - /// - /// Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BarColor { get; set; } - - /// - /// Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BorderColor { get; set; } - - /// - /// Border width. Default value: 0. Ignored if Visible is set to false. - /// - public double? BorderWidth { get; set; } - - /// - /// Border dash style. Default value: BorderDashStyle.Solid. - /// - public string BorderDashStyle { get; set; } - - /// - /// Border visibility. If false than parameter Width is always ignored (0). Default value: false. - /// - public bool? BorderVisible { get; set; } - - /// - /// Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology - /// - public string EnableChecksum { get; set; } - - /// - /// Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. - /// - public bool? EnableEscape { get; set; } - - /// - /// Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. - /// - public bool? FilledBars { get; set; } - - /// - /// Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. - /// - public bool? AlwaysShowChecksum { get; set; } - - /// - /// Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard - /// - public double? WideNarrowRatio { get; set; } - - /// - /// Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. - /// - public bool? ValidateText { get; set; } - - /// - /// Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. - /// - public string SupplementData { get; set; } - - /// - /// Space between main the BarCode and supplement BarCode. - /// - public double? SupplementSpace { get; set; } - - /// - /// Bars reduction value that is used to compensate ink spread while printing. - /// - public double? BarWidthReduction { get; set; } - - /// - /// Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. - /// - public bool? UseAntiAlias { get; set; } - - /// - /// Result image format. - /// - public string format { get; set; } - } -} diff --git a/src/Model/Requests/GetBarcodeRecognizeRequest.cs b/src/Model/Requests/GetBarcodeRecognizeRequest.cs deleted file mode 100644 index 918891a..0000000 --- a/src/Model/Requests/GetBarcodeRecognizeRequest.cs +++ /dev/null @@ -1,242 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class GetBarcodeRecognizeRequest - { - /// - /// Initializes a new instance of the class. - /// - /// The image file name. - public GetBarcodeRecognizeRequest(string name) - { - this.name = name; - } - - /// - /// The image file name. - /// - public string name { get; set; } - - /// - /// The type of barcode to read. - /// - public string Type { get; set; } - - /// - /// Multiple barcode types to read. - /// - public List Types { get; set; } - - /// - /// Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies - /// - public string ChecksumValidation { get; set; } - - /// - /// A flag which force engine to detect codetext encoding for Unicode. - /// - public bool? DetectEncoding { get; set; } - - /// - /// Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. - /// - public string Preset { get; set; } - - /// - /// Set X of top left corner of area for recognition. - /// - public int? RectX { get; set; } - - /// - /// Set Y of top left corner of area for recognition. - /// - public int? RectY { get; set; } - - /// - /// Set Width of area for recognition. - /// - public int? RectWidth { get; set; } - - /// - /// Set Height of area for recognition. - /// - public int? RectHeight { get; set; } - - /// - /// Value indicating whether FNC symbol strip must be done. - /// - public bool? StripFNC { get; set; } - - /// - /// Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. - /// - public int? Timeout { get; set; } - - /// - /// Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. - /// - public int? MedianSmoothingWindowSize { get; set; } - - /// - /// Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. - /// - public bool? AllowMedianSmoothing { get; set; } - - /// - /// Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. - /// - public bool? AllowComplexBackground { get; set; } - - /// - /// Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. - /// - public bool? AllowDatamatrixIndustrialBarcodes { get; set; } - - /// - /// Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. - /// - public bool? AllowDecreasedImage { get; set; } - - /// - /// Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. - /// - public bool? AllowDetectScanGap { get; set; } - - /// - /// Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. - /// - public bool? AllowIncorrectBarcodes { get; set; } - - /// - /// Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. - /// - public bool? AllowInvertImage { get; set; } - - /// - /// Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. - /// - public bool? AllowMicroWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. - /// - public bool? AllowOneDFastBarcodesDetector { get; set; } - - /// - /// Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. - /// - public bool? AllowOneDWipedBarsRestoration { get; set; } - - /// - /// Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. - /// - public bool? AllowQRMicroQrRestoration { get; set; } - - /// - /// Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. - /// - public bool? AllowRegularImage { get; set; } - - /// - /// Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. - /// - public bool? AllowSaltAndPepperFiltering { get; set; } - - /// - /// Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. - /// - public bool? AllowWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. - /// - public bool? CheckMore1DVariants { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. - /// - public bool? FastScanOnly { get; set; } - - /// - /// Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. - /// - public bool? AllowAdditionalRestorations { get; set; } - - /// - /// Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. - /// - public double? RegionLikelihoodThresholdPercent { get; set; } - - /// - /// Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. - /// - public List ScanWindowSizes { get; set; } - - /// - /// Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] - /// - public double? Similarity { get; set; } - - /// - /// Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. - /// - public bool? SkipDiagonalSearch { get; set; } - - /// - /// Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. - /// - public bool? ReadTinyBarcodes { get; set; } - - /// - /// Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. - /// - public string AustralianPostEncodingTable { get; set; } - - /// - /// The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". - /// - public bool? IgnoreEndingFillingPatternsForCTable { get; set; } - - /// - /// The image storage. - /// - public string storage { get; set; } - - /// - /// The image folder. - /// - public string folder { get; set; } - } -} diff --git a/src/Model/Requests/GetDiscUsageRequest.cs b/src/Model/Requests/GetDiscUsageRequest.cs deleted file mode 100644 index 2965121..0000000 --- a/src/Model/Requests/GetDiscUsageRequest.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class GetDiscUsageRequest - { - /// - /// Initializes a new instance of the class. - /// - public GetDiscUsageRequest(string storageName = null) - { - this.storageName = storageName; - } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} diff --git a/src/Model/Requests/GetFileVersionsRequest.cs b/src/Model/Requests/GetFileVersionsRequest.cs deleted file mode 100644 index 0fef82c..0000000 --- a/src/Model/Requests/GetFileVersionsRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class GetFileVersionsRequest - { - /// - /// Initializes a new instance of the class. - /// - /// File path e.g. '/file.ext' - public GetFileVersionsRequest(string path) - { - this.path = path; - } - - /// - /// File path e.g. '/file.ext' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} diff --git a/src/Model/Requests/GetFilesListRequest.cs b/src/Model/Requests/GetFilesListRequest.cs deleted file mode 100644 index 91de09d..0000000 --- a/src/Model/Requests/GetFilesListRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class GetFilesListRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Folder path e.g. '/folder' - public GetFilesListRequest(string path) - { - this.path = path; - } - - /// - /// Folder path e.g. '/folder' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} diff --git a/src/Model/Requests/MoveFileRequest.cs b/src/Model/Requests/MoveFileRequest.cs deleted file mode 100644 index 43c0117..0000000 --- a/src/Model/Requests/MoveFileRequest.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class MoveFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Source file path e.g. '/src.ext' - /// Destination file path e.g. '/dest.ext' - public MoveFileRequest(string srcPath, string destPath) - { - this.srcPath = srcPath; - this.destPath = destPath; - } - - /// - /// Source file path e.g. '/src.ext' - /// - public string srcPath { get; set; } - - /// - /// Destination file path e.g. '/dest.ext' - /// - public string destPath { get; set; } - - /// - /// Source storage name - /// - public string srcStorageName { get; set; } - - /// - /// Destination storage name - /// - public string destStorageName { get; set; } - - /// - /// File version ID to move - /// - public string versionId { get; set; } - } -} diff --git a/src/Model/Requests/MoveFolderRequest.cs b/src/Model/Requests/MoveFolderRequest.cs deleted file mode 100644 index 63e20b8..0000000 --- a/src/Model/Requests/MoveFolderRequest.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class MoveFolderRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Folder path to move e.g. '/folder' - /// Destination folder path to move to e.g '/dst' - public MoveFolderRequest(string srcPath, string destPath) - { - this.srcPath = srcPath; - this.destPath = destPath; - } - - /// - /// Folder path to move e.g. '/folder' - /// - public string srcPath { get; set; } - - /// - /// Destination folder path to move to e.g '/dst' - /// - public string destPath { get; set; } - - /// - /// Source storage name - /// - public string srcStorageName { get; set; } - - /// - /// Destination storage name - /// - public string destStorageName { get; set; } - } -} - diff --git a/src/Model/Requests/ObjectExistsRequest.cs b/src/Model/Requests/ObjectExistsRequest.cs deleted file mode 100644 index 31f7617..0000000 --- a/src/Model/Requests/ObjectExistsRequest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class ObjectExistsRequest - { - /// - /// Initializes a new instance of the class. - /// - /// File or folder path e.g. '/file.ext' or '/folder' - public ObjectExistsRequest(string path) - { - this.path = path; - } - - /// - /// File or folder path e.g. '/file.ext' or '/folder' - /// - public string path { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - - /// - /// File version ID - /// - public string versionId { get; set; } - } -} diff --git a/src/Model/Requests/PostBarcodeRecognizeFromUrlOrContentRequest.cs b/src/Model/Requests/PostBarcodeRecognizeFromUrlOrContentRequest.cs deleted file mode 100644 index 2cc95b5..0000000 --- a/src/Model/Requests/PostBarcodeRecognizeFromUrlOrContentRequest.cs +++ /dev/null @@ -1,236 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class PostBarcodeRecognizeFromUrlOrContentRequest - { - /// - /// Initializes a new instance of the class. - /// - public PostBarcodeRecognizeFromUrlOrContentRequest(System.IO.Stream image = null) - { - this.image = image; - } - - /// - /// The type of barcode to read. - /// - public string Type { get; set; } - - /// - /// Multiple barcode types to read. - /// - public List Types { get; set; } - - /// - /// Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies - /// - public string ChecksumValidation { get; set; } - - /// - /// A flag which force engine to detect codetext encoding for Unicode. - /// - public bool? DetectEncoding { get; set; } - - /// - /// Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. - /// - public string Preset { get; set; } - - /// - /// Set X of top left corner of area for recognition. - /// - public int? RectX { get; set; } - - /// - /// Set Y of top left corner of area for recognition. - /// - public int? RectY { get; set; } - - /// - /// Set Width of area for recognition. - /// - public int? RectWidth { get; set; } - - /// - /// Set Height of area for recognition. - /// - public int? RectHeight { get; set; } - - /// - /// Value indicating whether FNC symbol strip must be done. - /// - public bool? StripFNC { get; set; } - - /// - /// Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. - /// - public int? Timeout { get; set; } - - /// - /// Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set. - /// - public int? MedianSmoothingWindowSize { get; set; } - - /// - /// Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. - /// - public bool? AllowMedianSmoothing { get; set; } - - /// - /// Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. - /// - public bool? AllowComplexBackground { get; set; } - - /// - /// Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots. - /// - public bool? AllowDatamatrixIndustrialBarcodes { get; set; } - - /// - /// Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution. - /// - public bool? AllowDecreasedImage { get; set; } - - /// - /// Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes. - /// - public bool? AllowDetectScanGap { get; set; } - - /// - /// Allows engine to recognize barcodes which has incorrect checksum or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text. - /// - public bool? AllowIncorrectBarcodes { get; set; } - - /// - /// Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background. - /// - public bool? AllowInvertImage { get; set; } - - /// - /// Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize slightly damaged Postal barcodes. - /// - public bool? AllowMicroWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet. - /// - public bool? AllowOneDFastBarcodesDetector { get; set; } - - /// - /// Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern. - /// - public bool? AllowOneDWipedBarsRestoration { get; set; } - - /// - /// Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. - /// - public bool? AllowQRMicroQrRestoration { get; set; } - - /// - /// Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is. - /// - public bool? AllowRegularImage { get; set; } - - /// - /// Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. - /// - public bool? AllowSaltAndPepperFiltering { get; set; } - - /// - /// Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. - /// - public bool? AllowWhiteSpotsRemoving { get; set; } - - /// - /// Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. - /// - public bool? CheckMore1DVariants { get; set; } - - /// - /// Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. - /// - public bool? FastScanOnly { get; set; } - - /// - /// Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. - /// - public bool? AllowAdditionalRestorations { get; set; } - - /// - /// Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. - /// - public double? RegionLikelihoodThresholdPercent { get; set; } - - /// - /// Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. - /// - public List ScanWindowSizes { get; set; } - - /// - /// Similarity coefficient depends on how homogeneous barcodes are. Use high value for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] - /// - public double? Similarity { get; set; } - - /// - /// Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. - /// - public bool? SkipDiagonalSearch { get; set; } - - /// - /// Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. - /// - public bool? ReadTinyBarcodes { get; set; } - - /// - /// Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. - /// - public string AustralianPostEncodingTable { get; set; } - - /// - /// The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequence \"333\" of filling patterns is decoded as letter \"z\". - /// - public bool? IgnoreEndingFillingPatternsForCTable { get; set; } - - /// - /// The image file url. - /// - public string url { get; set; } - - /// - /// Image data - /// - public System.IO.Stream image { get; set; } - } -} diff --git a/src/Model/Requests/PostGenerateMultipleRequest.cs b/src/Model/Requests/PostGenerateMultipleRequest.cs deleted file mode 100644 index 6721943..0000000 --- a/src/Model/Requests/PostGenerateMultipleRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class PostGenerateMultipleRequest - { - /// - /// Initializes a new instance of the class. - /// - /// List of barcodes - public PostGenerateMultipleRequest(GeneratorParamsList generatorParamsList) - { - this.generatorParamsList = generatorParamsList; - } - - /// - /// List of barcodes - /// - public GeneratorParamsList generatorParamsList { get; set; } - - /// - /// Format to return stream in - /// - public string format { get; set; } - } -} diff --git a/src/Model/Requests/PutBarcodeGenerateFileRequest.cs b/src/Model/Requests/PutBarcodeGenerateFileRequest.cs deleted file mode 100644 index 19b0cb8..0000000 --- a/src/Model/Requests/PutBarcodeGenerateFileRequest.cs +++ /dev/null @@ -1,243 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class PutBarcodeGenerateFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// The image file name. - /// Type of barcode to generate. - /// Text to encode. - public PutBarcodeGenerateFileRequest(string name, string type, string text) - { - this.name = name; - this.Type = type; - this.Text = text; - } - - /// - /// The image file name. - /// - public string name { get; set; } - - /// - /// Type of barcode to generate. - /// - public string Type { get; set; } - - /// - /// Text to encode. - /// - public string Text { get; set; } - - /// - /// Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode - /// - public string TwoDDisplayText { get; set; } - - /// - /// Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. - /// - public string TextLocation { get; set; } - - /// - /// Text alignment. - /// - public string TextAlignment { get; set; } - - /// - /// Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string TextColor { get; set; } - - /// - /// Specify word wraps (line breaks) within text. Default value: false. - /// - public bool? NoWrap { get; set; } - - /// - /// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. - /// - public double? Resolution { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionX { get; set; } - - /// - /// DEPRECATED: Use 'Resolution' instead. - /// - [System.Obsolete("Use 'Resolution' instead.", false)] - public double? ResolutionY { get; set; } - - /// - /// The smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. - /// - public double? DimensionX { get; set; } - - /// - /// Space between the CodeText and the BarCode in Unit value. Default value: 2pt. Ignored for EAN8, EAN13, UPCE, UPCA, ISBN, ISMN, ISSN, UpcaGs1DatabarCoupon. - /// - public double? TextSpace { get; set; } - - /// - /// Common Units for all measuring in query. Default units: pixel. - /// - public string Units { get; set; } - - /// - /// Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None. - /// - public string SizeMode { get; set; } - - /// - /// Height of the barcode in given units. Default units: pixel. - /// - public double? BarHeight { get; set; } - - /// - /// Height of the barcode image in given units. Default units: pixel. - /// - public double? ImageHeight { get; set; } - - /// - /// Width of the barcode image in given units. Default units: pixel. - /// - public double? ImageWidth { get; set; } - - /// - /// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. - /// - public double? RotationAngle { get; set; } - - /// - /// Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BackColor { get; set; } - - /// - /// Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BarColor { get; set; } - - /// - /// Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF - /// - public string BorderColor { get; set; } - - /// - /// Border width. Default value: 0. Ignored if Visible is set to false. - /// - public double? BorderWidth { get; set; } - - /// - /// Border dash style. Default value: BorderDashStyle.Solid. - /// - public string BorderDashStyle { get; set; } - - /// - /// Border visibility. If false than parameter Width is always ignored (0). Default value: false. - /// - public bool? BorderVisible { get; set; } - - /// - /// Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology - /// - public string EnableChecksum { get; set; } - - /// - /// Indicates whether explains the character \"\\\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, \"\\\" will be explained as a special escape character. Otherwise, \"\\\" acts as normal characters. Aspose.BarCode supports input decimal ascii code and mnemonic for ASCII control-code characters. For example, \\013 and \\\\CR stands for CR. - /// - public bool? EnableEscape { get; set; } - - /// - /// Value indicating whether bars are filled. Only for 1D barcodes. Default value: true. - /// - public bool? FilledBars { get; set; } - - /// - /// Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. - /// - public bool? AlwaysShowChecksum { get; set; } - - /// - /// Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard - /// - public double? WideNarrowRatio { get; set; } - - /// - /// Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingaporePost, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect. - /// - public bool? ValidateText { get; set; } - - /// - /// Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. - /// - public string SupplementData { get; set; } - - /// - /// Space between main the BarCode and supplement BarCode. - /// - public double? SupplementSpace { get; set; } - - /// - /// Bars reduction value that is used to compensate ink spread while printing. - /// - public double? BarWidthReduction { get; set; } - - /// - /// Indicates whether is used anti-aliasing mode to render image. Anti-aliasing mode is applied to barcode and text drawing. - /// - public bool? UseAntiAlias { get; set; } - - /// - /// Image's storage. - /// - public string storage { get; set; } - - /// - /// Image's folder. - /// - public string folder { get; set; } - - /// - /// The image format. - /// - public string format { get; set; } - } -} diff --git a/src/Model/Requests/PutBarcodeRecognizeFromBodyRequest.cs b/src/Model/Requests/PutBarcodeRecognizeFromBodyRequest.cs deleted file mode 100644 index 22835e7..0000000 --- a/src/Model/Requests/PutBarcodeRecognizeFromBodyRequest.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class PutBarcodeRecognizeFromBodyRequest - { - /// - /// Initializes a new instance of the class. - /// - /// The image file name. - /// BarcodeReader object with parameters. - public PutBarcodeRecognizeFromBodyRequest(string name, ReaderParams readerParams) - { - this.name = name; - this.readerParams = readerParams; - } - - /// - /// The image file name. - /// - public string name { get; set; } - - /// - /// BarcodeReader object with parameters. - /// - public ReaderParams readerParams { get; set; } - - /// - /// Gets or sets type - /// - public string type { get; set; } - - /// - /// The storage name - /// - public string storage { get; set; } - - /// - /// The image folder. - /// - public string folder { get; set; } - } -} diff --git a/src/Model/Requests/PutGenerateMultipleRequest.cs b/src/Model/Requests/PutGenerateMultipleRequest.cs deleted file mode 100644 index e24554b..0000000 --- a/src/Model/Requests/PutGenerateMultipleRequest.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class PutGenerateMultipleRequest - { - /// - /// Initializes a new instance of the class. - /// - /// New filename - /// List of barcodes - public PutGenerateMultipleRequest(string name, GeneratorParamsList generatorParamsList) - { - this.name = name; - this.generatorParamsList = generatorParamsList; - } - - /// - /// New filename - /// - public string name { get; set; } - - /// - /// List of barcodes - /// - public GeneratorParamsList generatorParamsList { get; set; } - - /// - /// Format of file - /// - public string format { get; set; } - - /// - /// Folder to place file to - /// - public string folder { get; set; } - - /// - /// The storage name - /// - public string storage { get; set; } - } -} diff --git a/src/Model/Requests/ScanBarcodeRequest.cs b/src/Model/Requests/ScanBarcodeRequest.cs deleted file mode 100644 index 90c0392..0000000 --- a/src/Model/Requests/ScanBarcodeRequest.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class ScanBarcodeRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Image as file - public ScanBarcodeRequest(System.IO.Stream imageFile) - { - this.imageFile = imageFile; - } - - /// - /// Image as file - /// - public System.IO.Stream imageFile { get; set; } - - /// - /// Types of barcode to recognize - /// - public List decodeTypes { get; set; } - - /// - /// Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. - /// - public int? timeout { get; set; } - - /// - /// Checksum validation setting. Default is ON. - /// - public string checksumValidation { get; set; } - } -} - diff --git a/src/Model/Requests/StorageExistsRequest.cs b/src/Model/Requests/StorageExistsRequest.cs deleted file mode 100644 index c2cb7dc..0000000 --- a/src/Model/Requests/StorageExistsRequest.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class StorageExistsRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Storage name - public StorageExistsRequest(string storageName) - { - this.storageName = storageName; - } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} - diff --git a/src/Model/Requests/UploadFileRequest.cs b/src/Model/Requests/UploadFileRequest.cs deleted file mode 100644 index 0c5b5ec..0000000 --- a/src/Model/Requests/UploadFileRequest.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2025 Aspose.BarCode for Cloud -// -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// -------------------------------------------------------------------------------------------------------------------- - - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Aspose.BarCode.Cloud.Sdk.Model.Requests -{ - /// - /// Request model for operation. - /// - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - public class UploadFileRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. - /// File to upload - public UploadFileRequest(string path, System.IO.Stream _file) - { - this.path = path; - this.File = _file; - } - - /// - /// Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. - /// - public string path { get; set; } - - /// - /// File to upload - /// - public System.IO.Stream File { get; set; } - - /// - /// Storage name - /// - public string storageName { get; set; } - } -} - diff --git a/src/Model/ResultImageInfo.cs b/src/Model/ResultImageInfo.cs deleted file mode 100644 index ce7e0da..0000000 --- a/src/Model/ResultImageInfo.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// Created image info. - /// - public class ResultImageInfo : IToString - { - /// - /// Result file size. - /// - public long? FileSize { get; set; } - - /// - /// Result image width. - /// - public int? ImageWidth { get; set; } - - /// - /// Result image height. - /// - public int? ImageHeight { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/StorageExist.cs b/src/Model/ScanBase64Request.cs similarity index 81% rename from src/Model/StorageExist.cs rename to src/Model/ScanBase64Request.cs index 8f97391..ec95d27 100644 --- a/src/Model/StorageExist.cs +++ b/src/Model/ScanBase64Request.cs @@ -8,14 +8,14 @@ namespace Aspose.BarCode.Cloud.Sdk.Model { /// - /// Storage exists + /// Scan barcode request. /// - public class StorageExist : IToString + public class ScanBase64Request : IToString { /// - /// Shows that the storage exists. + /// Barcode image bytes encoded as base-64. /// - public bool? Exists { get; set; } + public string FileBase64 { get; set; } /// /// Get the string presentation of the object diff --git a/src/Model/StorageFile.cs b/src/Model/StorageFile.cs deleted file mode 100644 index d8e3bed..0000000 --- a/src/Model/StorageFile.cs +++ /dev/null @@ -1,58 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// File or folder information - /// - public class StorageFile : IToString - { - /// - /// File or folder name. - /// - public string Name { get; set; } - - /// - /// True if it is a folder. - /// - public bool? IsFolder { get; set; } - - /// - /// File or folder last modified DateTime. - /// - public DateTime? ModifiedDate { get; set; } - - /// - /// File or folder size. - /// - public long? Size { get; set; } - - /// - /// File or folder path. - /// - public string Path { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/StructuredAppend.cs b/src/Model/StructuredAppend.cs deleted file mode 100644 index c31ecf3..0000000 --- a/src/Model/StructuredAppend.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using Aspose.BarCode.Cloud.Sdk.Interfaces; -using Aspose.BarCode.Cloud.Sdk.Internal; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// QR structured append parameters. - /// - public class StructuredAppend : IToString - { - /// - /// The index of the QR structured append mode barcode. Index starts from 0. - /// - public int? SequenceIndicator { get; set; } - - /// - /// QR structured append mode barcodes quantity. Max value is 16. - /// - public int? TotalCount { get; set; } - - /// - /// QR structured append mode parity data. - /// - public int? ParityByte { get; set; } - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - return _srcString ?? SerializationHelper.Serialize(this); - } - - private string _srcString; - /// - /// Set the string presentation of the object - /// - public void SetSrcString(string value) - { - _srcString = value; - } - } -} diff --git a/src/Model/TextAlignment.cs b/src/Model/TextAlignment.cs deleted file mode 100644 index 11ad42e..0000000 --- a/src/Model/TextAlignment.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Aspose.BarCode.Cloud.Sdk.Model -{ - - /// - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TextAlignment - { - /// - /// Enum value Left - /// - Left, - - /// - /// Enum value Center - /// - Center, - - /// - /// Enum value Right - /// - Right - - } -}