/// <summary> /// Initializes a new instance of the <see cref="ConvertData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName">Name of the source file including extension (required).</param> /// <param name="SourceFileContent">Content of the file to convert (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="OutputFormat">Output format (required) (default to OutputFormatEnum.PDF).</param> /// <param name="CopyMetadata">Copy metadata (Only for SharePoint operations) (default to false).</param> /// <param name="OverrideSettings">Optional settings using Muhimbi's XML syntax.</param> /// <param name="TemplateFileContent">Optional template file content (e.g. infopath XSN file).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public ConvertData(bool?UseAsyncPattern = false, string SourceFileName = default(string), byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), OutputFormatEnum?OutputFormat = OutputFormatEnum.PDF, bool?CopyMetadata = false, string OverrideSettings = default(string), byte[] TemplateFileContent = default(byte[]), bool?FailOnError = true) { // to ensure "SourceFileName" is required (not null) if (SourceFileName == null) { throw new InvalidDataException("SourceFileName is a required property for ConvertData and cannot be null"); } else { this.SourceFileName = SourceFileName; } // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for ConvertData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "OutputFormat" is required (not null) if (OutputFormat == null) { throw new InvalidDataException("OutputFormat is a required property for ConvertData and cannot be null"); } else { this.OutputFormat = OutputFormat; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; // use default value if no "CopyMetadata" provided if (CopyMetadata == null) { this.CopyMetadata = false; } else { this.CopyMetadata = CopyMetadata; } this.OverrideSettings = OverrideSettings; this.TemplateFileContent = TemplateFileContent; // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="SecurePdfData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName">Optional file name (for logging purposes).</param> /// <param name="SourceFileContent">Content of the file to secure (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="OpenPassword">Password required to open the PDF.</param> /// <param name="OwnerPassword">Password for PDF restrictions defined below.</param> /// <param name="SecurityOptions">Print|HighResolutionPrint|ContentCopy|Annotations|FormFields|ContentAccessibility|DocumentAssembly.</param> /// <param name="FailOnError">Fail on error (default to true).</param> public SecurePdfData(bool?UseAsyncPattern = false, string SourceFileName = default(string), byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), string OpenPassword = default(string), string OwnerPassword = default(string), string SecurityOptions = default(string), bool?FailOnError = true) { // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for SecurePdfData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SourceFileName = SourceFileName; this.SharepointFile = SharepointFile; this.OpenPassword = OpenPassword; this.OwnerPassword = OwnerPassword; this.SecurityOptions = SecurityOptions; // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="LineWatermarkData" /> class. /// </summary> /// <param name="SourceFileName">Optional file name (for logging purposes).</param> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileContent">Content of the file to watermark (required).</param> /// <param name="Position">Watermark position on the page (required) (default to PositionEnum.MiddleCenter).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="X">Start X Coordinate of the line (in Pts, 1/72 of an inch) (required).</param> /// <param name="Y">Start Y Coordinate of the line (in Pts, 1/72 of an inch) (required).</param> /// <param name="EndX">End X Coordinate of the line (in Pts, 1/72 of an inch) (required).</param> /// <param name="EndY">End Y Coordinate of the line (in Pts, 1/72 of an inch) (required).</param> /// <param name="Layer">Watermark layer (default to LayerEnum.Foreground).</param> /// <param name="Rotation">Angle of rotation.</param> /// <param name="Opacity">Opacity in % (100 is fully visible and 1 is barely visible) (default to "100").</param> /// <param name="LineColor">Color in #RRGGBB notation.</param> /// <param name="LineWidth">Width of the line (in Pts, 1/72 of an inch).</param> /// <param name="StartPage">Number of the first page the watermark applies to.</param> /// <param name="EndPage">Number of the last page the watermark applies to.</param> /// <param name="PageInterval">Which pages to display the watermark on (1=every page, 2=every other, etc).</param> /// <param name="PageOrientation">Orientation of pages the watermark applies to. (default to PageOrientationEnum.Both).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public LineWatermarkData(string SourceFileName = default(string), bool?UseAsyncPattern = false, byte[] SourceFileContent = default(byte[]), PositionEnum?Position = PositionEnum.MiddleCenter, SharepointFile SharepointFile = default(SharepointFile), string X = default(string), string Y = default(string), string EndX = default(string), string EndY = default(string), LayerEnum?Layer = LayerEnum.Foreground, string Rotation = default(string), string Opacity = "100", string LineColor = default(string), string LineWidth = default(string), int?StartPage = default(int?), int?EndPage = default(int?), int?PageInterval = default(int?), PageOrientationEnum?PageOrientation = PageOrientationEnum.Both, bool?FailOnError = true) { // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for LineWatermarkData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "Position" is required (not null) if (Position == null) { throw new InvalidDataException("Position is a required property for LineWatermarkData and cannot be null"); } else { this.Position = Position; } // to ensure "X" is required (not null) if (X == null) { throw new InvalidDataException("X is a required property for LineWatermarkData and cannot be null"); } else { this.X = X; } // to ensure "Y" is required (not null) if (Y == null) { throw new InvalidDataException("Y is a required property for LineWatermarkData and cannot be null"); } else { this.Y = Y; } // to ensure "EndX" is required (not null) if (EndX == null) { throw new InvalidDataException("EndX is a required property for LineWatermarkData and cannot be null"); } else { this.EndX = EndX; } // to ensure "EndY" is required (not null) if (EndY == null) { throw new InvalidDataException("EndY is a required property for LineWatermarkData and cannot be null"); } else { this.EndY = EndY; } this.SourceFileName = SourceFileName; // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; // use default value if no "Layer" provided if (Layer == null) { this.Layer = LayerEnum.Foreground; } else { this.Layer = Layer; } this.Rotation = Rotation; // use default value if no "Opacity" provided if (Opacity == null) { this.Opacity = "100"; } else { this.Opacity = Opacity; } this.LineColor = LineColor; this.LineWidth = LineWidth; this.StartPage = StartPage; this.EndPage = EndPage; this.PageInterval = PageInterval; // use default value if no "PageOrientation" provided if (PageOrientation == null) { this.PageOrientation = PageOrientationEnum.Both; } else { this.PageOrientation = PageOrientation; } // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="QrCodeWatermarkData" /> class. /// </summary> /// <param name="SourceFileName">Optional file name (for logging purposes).</param> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileContent">Content of the file to watermark (required).</param> /// <param name="Content">Data to embed in the QR Code (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="Version">Version (required) (default to VersionEnum.Auto).</param> /// <param name="InputMode">Input mode (required) (default to InputModeEnum.Binary).</param> /// <param name="ErrorCorrectionLevel">Error correction level (required) (default to ErrorCorrectionLevelEnum.Low).</param> /// <param name="Position">Watermark position on the page (required) (default to PositionEnum.MiddleCenter).</param> /// <param name="Width">Width of the watermark (in Pts, 1/72 of an inch) (required).</param> /// <param name="Height">Height of the watermark (in Pts, 1/72 of an inch) (required).</param> /// <param name="X">X Coordinate of the watermark (in Pts, 1/72 of an inch).</param> /// <param name="Y">Y Coordinate of the watermark (in Pts, 1/72 of an inch).</param> /// <param name="Layer">Watermark layer (default to LayerEnum.Foreground).</param> /// <param name="Rotation">Angle of rotation.</param> /// <param name="Opacity">Opacity in % (100 is fully visible and 1 is barely visible) (default to "100").</param> /// <param name="FillColor">Color in #RRGGBB notation.</param> /// <param name="LineColor">Color in #RRGGBB notation.</param> /// <param name="StartPage">Number of the first page the watermark applies to.</param> /// <param name="EndPage">Number of the last page the watermark applies to.</param> /// <param name="PageInterval">Which pages to display the watermark on (1=every page, 2=every other, etc).</param> /// <param name="PageOrientation">Orientation of pages the watermark applies to. (default to PageOrientationEnum.Both).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public QrCodeWatermarkData(string SourceFileName = default(string), bool?UseAsyncPattern = false, byte[] SourceFileContent = default(byte[]), string Content = default(string), SharepointFile SharepointFile = default(SharepointFile), VersionEnum?Version = VersionEnum.Auto, InputModeEnum?InputMode = InputModeEnum.Binary, ErrorCorrectionLevelEnum?ErrorCorrectionLevel = ErrorCorrectionLevelEnum.Low, PositionEnum?Position = PositionEnum.MiddleCenter, string Width = default(string), string Height = default(string), string X = default(string), string Y = default(string), LayerEnum?Layer = LayerEnum.Foreground, string Rotation = default(string), string Opacity = "100", string FillColor = default(string), string LineColor = default(string), int?StartPage = default(int?), int?EndPage = default(int?), int?PageInterval = default(int?), PageOrientationEnum?PageOrientation = PageOrientationEnum.Both, bool?FailOnError = true) { // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for QrCodeWatermarkData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "Content" is required (not null) if (Content == null) { throw new InvalidDataException("Content is a required property for QrCodeWatermarkData and cannot be null"); } else { this.Content = Content; } // to ensure "Version" is required (not null) if (Version == null) { throw new InvalidDataException("Version is a required property for QrCodeWatermarkData and cannot be null"); } else { this.Version = Version; } // to ensure "InputMode" is required (not null) if (InputMode == null) { throw new InvalidDataException("InputMode is a required property for QrCodeWatermarkData and cannot be null"); } else { this.InputMode = InputMode; } // to ensure "ErrorCorrectionLevel" is required (not null) if (ErrorCorrectionLevel == null) { throw new InvalidDataException("ErrorCorrectionLevel is a required property for QrCodeWatermarkData and cannot be null"); } else { this.ErrorCorrectionLevel = ErrorCorrectionLevel; } // to ensure "Position" is required (not null) if (Position == null) { throw new InvalidDataException("Position is a required property for QrCodeWatermarkData and cannot be null"); } else { this.Position = Position; } // to ensure "Width" is required (not null) if (Width == null) { throw new InvalidDataException("Width is a required property for QrCodeWatermarkData and cannot be null"); } else { this.Width = Width; } // to ensure "Height" is required (not null) if (Height == null) { throw new InvalidDataException("Height is a required property for QrCodeWatermarkData and cannot be null"); } else { this.Height = Height; } this.SourceFileName = SourceFileName; // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; this.X = X; this.Y = Y; // use default value if no "Layer" provided if (Layer == null) { this.Layer = LayerEnum.Foreground; } else { this.Layer = Layer; } this.Rotation = Rotation; // use default value if no "Opacity" provided if (Opacity == null) { this.Opacity = "100"; } else { this.Opacity = Opacity; } this.FillColor = FillColor; this.LineColor = LineColor; this.StartPage = StartPage; this.EndPage = EndPage; this.PageInterval = PageInterval; // use default value if no "PageOrientation" provided if (PageOrientation == null) { this.PageOrientation = PageOrientationEnum.Both; } else { this.PageOrientation = PageOrientation; } // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="SplitPdfData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName">Name of the source file including extension (required).</param> /// <param name="SourceFileContent">Content of the file to split (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="FileNameTemplate">File name template for returned files.</param> /// <param name="FileSplitBy">Split by option (required) (default to FileSplitByEnum.NumberofPages).</param> /// <param name="SplitParameter">Split parameter (number of pages or level) (required) (default to 1).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public SplitPdfData(bool?UseAsyncPattern = false, string SourceFileName = default(string), byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), string FileNameTemplate = default(string), FileSplitByEnum?FileSplitBy = FileSplitByEnum.NumberofPages, int?SplitParameter = 1, bool?FailOnError = true) { // to ensure "SourceFileName" is required (not null) if (SourceFileName == null) { throw new InvalidDataException("SourceFileName is a required property for SplitPdfData and cannot be null"); } else { this.SourceFileName = SourceFileName; } // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for SplitPdfData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "FileSplitBy" is required (not null) if (FileSplitBy == null) { throw new InvalidDataException("FileSplitBy is a required property for SplitPdfData and cannot be null"); } else { this.FileSplitBy = FileSplitBy; } // to ensure "SplitParameter" is required (not null) if (SplitParameter == null) { throw new InvalidDataException("SplitParameter is a required property for SplitPdfData and cannot be null"); } else { this.SplitParameter = SplitParameter; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; this.FileNameTemplate = FileNameTemplate; // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="TextWatermarkData" /> class. /// </summary> /// <param name="SourceFileName">Optional file name (for logging purposes).</param> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileContent">Content of the file to watermark (required).</param> /// <param name="Content">Watermark text (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="FontFamilyName">Name of the font, e.g. Arial, Times New Roman, Calibri (required).</param> /// <param name="FontSize">Size of the font in Pt (required) (default to "12").</param> /// <param name="FillColor">Color in #RRGGBB notation (required) (default to "#000000").</param> /// <param name="Alignment">Text alignment (required) (default to AlignmentEnum.TopLeft).</param> /// <param name="WordWrap">Spcifies if wordwrap text (required) (default to WordWrapEnum.Word).</param> /// <param name="Position">Watermark position on the page (required) (default to PositionEnum.MiddleCenter).</param> /// <param name="Width">Width of the watermark (in Pts, 1/72 of an inch) (required).</param> /// <param name="Height">Height of the watermark (in Pts, 1/72 of an inch) (required).</param> /// <param name="X">X Coordinate of the watermark (in Pts, 1/72 of an inch).</param> /// <param name="Y">Y Coordinate of the watermark (in Pts, 1/72 of an inch).</param> /// <param name="Layer">Watermark layer (default to LayerEnum.Foreground).</param> /// <param name="Rotation">Angle of rotation.</param> /// <param name="Opacity">Opacity in % (100 is fully visible and 1 is barely visible) (default to "100").</param> /// <param name="FontStyle">One or more styles, e.g. bold|italic|underline|strikeout.</param> /// <param name="LineColor">Color in #RRGGBB notation.</param> /// <param name="LineWidth">Width of the font outline (in Pts, 1/72 of an inch).</param> /// <param name="StartPage">Number of the first page the watermark applies to.</param> /// <param name="EndPage">Number of the last page the watermark applies to.</param> /// <param name="PageInterval">Which pages to display the watermark on (1=every page, 2=every other, etc).</param> /// <param name="PageOrientation">Orientation of pages the watermark applies to. (default to PageOrientationEnum.Both).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public TextWatermarkData(string SourceFileName = default(string), bool?UseAsyncPattern = false, byte[] SourceFileContent = default(byte[]), string Content = default(string), SharepointFile SharepointFile = default(SharepointFile), string FontFamilyName = default(string), string FontSize = "12", string FillColor = "#000000", AlignmentEnum?Alignment = AlignmentEnum.TopLeft, WordWrapEnum?WordWrap = WordWrapEnum.Word, PositionEnum?Position = PositionEnum.MiddleCenter, string Width = default(string), string Height = default(string), string X = default(string), string Y = default(string), LayerEnum?Layer = LayerEnum.Foreground, string Rotation = default(string), string Opacity = "100", string FontStyle = default(string), string LineColor = default(string), string LineWidth = default(string), int?StartPage = default(int?), int?EndPage = default(int?), int?PageInterval = default(int?), PageOrientationEnum?PageOrientation = PageOrientationEnum.Both, bool?FailOnError = true) { // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for TextWatermarkData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "Content" is required (not null) if (Content == null) { throw new InvalidDataException("Content is a required property for TextWatermarkData and cannot be null"); } else { this.Content = Content; } // to ensure "FontFamilyName" is required (not null) if (FontFamilyName == null) { throw new InvalidDataException("FontFamilyName is a required property for TextWatermarkData and cannot be null"); } else { this.FontFamilyName = FontFamilyName; } // to ensure "FontSize" is required (not null) if (FontSize == null) { throw new InvalidDataException("FontSize is a required property for TextWatermarkData and cannot be null"); } else { this.FontSize = FontSize; } // to ensure "FillColor" is required (not null) if (FillColor == null) { throw new InvalidDataException("FillColor is a required property for TextWatermarkData and cannot be null"); } else { this.FillColor = FillColor; } // to ensure "Alignment" is required (not null) if (Alignment == null) { throw new InvalidDataException("Alignment is a required property for TextWatermarkData and cannot be null"); } else { this.Alignment = Alignment; } // to ensure "WordWrap" is required (not null) if (WordWrap == null) { throw new InvalidDataException("WordWrap is a required property for TextWatermarkData and cannot be null"); } else { this.WordWrap = WordWrap; } // to ensure "Position" is required (not null) if (Position == null) { throw new InvalidDataException("Position is a required property for TextWatermarkData and cannot be null"); } else { this.Position = Position; } // to ensure "Width" is required (not null) if (Width == null) { throw new InvalidDataException("Width is a required property for TextWatermarkData and cannot be null"); } else { this.Width = Width; } // to ensure "Height" is required (not null) if (Height == null) { throw new InvalidDataException("Height is a required property for TextWatermarkData and cannot be null"); } else { this.Height = Height; } this.SourceFileName = SourceFileName; // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; this.X = X; this.Y = Y; // use default value if no "Layer" provided if (Layer == null) { this.Layer = LayerEnum.Foreground; } else { this.Layer = Layer; } this.Rotation = Rotation; // use default value if no "Opacity" provided if (Opacity == null) { this.Opacity = "100"; } else { this.Opacity = Opacity; } this.FontStyle = FontStyle; this.LineColor = LineColor; this.LineWidth = LineWidth; this.StartPage = StartPage; this.EndPage = EndPage; this.PageInterval = PageInterval; // use default value if no "PageOrientation" provided if (PageOrientation == null) { this.PageOrientation = PageOrientationEnum.Both; } else { this.PageOrientation = PageOrientation; } // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="CompositeWatermarkData" /> class. /// </summary> /// <param name="SourceFileName">Optional file name (for logging purposes).</param> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileContent">Content of the file to watermark (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="WatermarkData">Watermark data in Muhimbi XML format (required).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public CompositeWatermarkData(string SourceFileName = default(string), bool?UseAsyncPattern = false, byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), string WatermarkData = default(string), bool?FailOnError = true) { // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for CompositeWatermarkData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // to ensure "WatermarkData" is required (not null) if (WatermarkData == null) { throw new InvalidDataException("WatermarkData is a required property for CompositeWatermarkData and cannot be null"); } else { this.WatermarkData = WatermarkData; } this.SourceFileName = SourceFileName; // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="OcrPdfData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName">Name of the source file including extension (required).</param> /// <param name="SourceFileContent">Content of the file to OCR (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="CopyMetadata">Copy metadata (For SharePoint only) (default to false).</param> /// <param name="Language">Language (default to LanguageEnum.English).</param> /// <param name="Performance">Performance (default to PerformanceEnum.Slowbutaccurate).</param> /// <param name="CharactersOption">Characters option (default to CharactersOptionEnum.None).</param> /// <param name="Characters">Characters to blacklist or whitelist.</param> /// <param name="Paginate">Paginate (default to false).</param> /// <param name="Regions">Limit the area to OCR to one or more specific areas.</param> /// <param name="FailOnError">Fail on error (default to true).</param> public OcrPdfData(bool?UseAsyncPattern = false, string SourceFileName = default(string), byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), bool?CopyMetadata = false, LanguageEnum?Language = LanguageEnum.English, PerformanceEnum?Performance = PerformanceEnum.Slowbutaccurate, CharactersOptionEnum?CharactersOption = CharactersOptionEnum.None, string Characters = default(string), bool?Paginate = false, string Regions = default(string), bool?FailOnError = true) { // to ensure "SourceFileName" is required (not null) if (SourceFileName == null) { throw new InvalidDataException("SourceFileName is a required property for OcrPdfData and cannot be null"); } else { this.SourceFileName = SourceFileName; } // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for OcrPdfData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; // use default value if no "CopyMetadata" provided if (CopyMetadata == null) { this.CopyMetadata = false; } else { this.CopyMetadata = CopyMetadata; } // use default value if no "Language" provided if (Language == null) { this.Language = LanguageEnum.English; } else { this.Language = Language; } // use default value if no "Performance" provided if (Performance == null) { this.Performance = PerformanceEnum.Slowbutaccurate; } else { this.Performance = Performance; } // use default value if no "CharactersOption" provided if (CharactersOption == null) { this.CharactersOption = CharactersOptionEnum.None; } else { this.CharactersOption = CharactersOption; } this.Characters = Characters; // use default value if no "Paginate" provided if (Paginate == null) { this.Paginate = false; } else { this.Paginate = Paginate; } this.Regions = Regions; // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="OcrTextData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName">Name of the source file including extension (required).</param> /// <param name="SourceFileContent">Content of the file to OCR (required).</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="Language">Languate (default to LanguageEnum.English).</param> /// <param name="X">X Coordinate (in Pts, 1/72 of an inch).</param> /// <param name="Y">Y Coordinate (in Pts, 1/72 of an inch).</param> /// <param name="Width">Width of the OCR area (in Pts, 1/72 of an inch).</param> /// <param name="Height">Height of the OCR area (in Pts, 1/72 of an inch).</param> /// <param name="PageNumber">Page number (leave blank to OCR all pages) (default to "").</param> /// <param name="Performance">Performance () (default to PerformanceEnum.Slowbutaccurate).</param> /// <param name="CharactersOption">Characters option (default to CharactersOptionEnum.None).</param> /// <param name="Characters">Characters to blacklist or whitelist.</param> /// <param name="Paginate">Paginate (default to false).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public OcrTextData(bool?UseAsyncPattern = false, string SourceFileName = default(string), byte[] SourceFileContent = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), LanguageEnum?Language = LanguageEnum.English, string X = default(string), string Y = default(string), string Width = default(string), string Height = default(string), string PageNumber = "", PerformanceEnum?Performance = PerformanceEnum.Slowbutaccurate, CharactersOptionEnum?CharactersOption = CharactersOptionEnum.None, string Characters = default(string), bool?Paginate = false, bool?FailOnError = true) { // to ensure "SourceFileName" is required (not null) if (SourceFileName == null) { throw new InvalidDataException("SourceFileName is a required property for OcrTextData and cannot be null"); } else { this.SourceFileName = SourceFileName; } // to ensure "SourceFileContent" is required (not null) if (SourceFileContent == null) { throw new InvalidDataException("SourceFileContent is a required property for OcrTextData and cannot be null"); } else { this.SourceFileContent = SourceFileContent; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SharepointFile = SharepointFile; // use default value if no "Language" provided if (Language == null) { this.Language = LanguageEnum.English; } else { this.Language = Language; } this.X = X; this.Y = Y; this.Width = Width; this.Height = Height; // use default value if no "PageNumber" provided if (PageNumber == null) { this.PageNumber = ""; } else { this.PageNumber = PageNumber; } // use default value if no "Performance" provided if (Performance == null) { this.Performance = PerformanceEnum.Slowbutaccurate; } else { this.Performance = Performance; } // use default value if no "CharactersOption" provided if (CharactersOption == null) { this.CharactersOption = CharactersOptionEnum.None; } else { this.CharactersOption = CharactersOption; } this.Characters = Characters; // use default value if no "Paginate" provided if (Paginate == null) { this.Paginate = false; } else { this.Paginate = Paginate; } // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }
/// <summary> /// Initializes a new instance of the <see cref="MergeToPdfData" /> class. /// </summary> /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param> /// <param name="SourceFileName1">Name of the source file including extension (required).</param> /// <param name="SourceFileContent1">Content of the file to merge (required).</param> /// <param name="SourceFileName2">Name of the source file including extension (required).</param> /// <param name="SourceFileContent2">Content of the file to merge (required).</param> /// <param name="SourceFileName3">Name of the source file including extension.</param> /// <param name="SourceFileContent3">Content of the file to merge.</param> /// <param name="SourceFileName4">Name of the source file including extension.</param> /// <param name="SourceFileContent4">Content of the file to merge.</param> /// <param name="SourceFileName5">Name of the source file including extension.</param> /// <param name="SourceFileContent5">Content of the file to merge.</param> /// <param name="SharepointFile">SharepointFile.</param> /// <param name="SharepointFieldName">Bookmark field name (For SharePoint only).</param> /// <param name="DocumentStartPage">Document start page (default to DocumentStartPageEnum.Nextpage).</param> /// <param name="FailOnError">Fail on error (default to true).</param> public MergeToPdfData(bool?UseAsyncPattern = false, string SourceFileName1 = default(string), byte[] SourceFileContent1 = default(byte[]), string SourceFileName2 = default(string), byte[] SourceFileContent2 = default(byte[]), string SourceFileName3 = default(string), byte[] SourceFileContent3 = default(byte[]), string SourceFileName4 = default(string), byte[] SourceFileContent4 = default(byte[]), string SourceFileName5 = default(string), byte[] SourceFileContent5 = default(byte[]), SharepointFile SharepointFile = default(SharepointFile), string SharepointFieldName = default(string), DocumentStartPageEnum?DocumentStartPage = DocumentStartPageEnum.Nextpage, bool?FailOnError = true) { // to ensure "SourceFileName1" is required (not null) if (SourceFileName1 == null) { throw new InvalidDataException("SourceFileName1 is a required property for MergeToPdfData and cannot be null"); } else { this.SourceFileName1 = SourceFileName1; } // to ensure "SourceFileContent1" is required (not null) if (SourceFileContent1 == null) { throw new InvalidDataException("SourceFileContent1 is a required property for MergeToPdfData and cannot be null"); } else { this.SourceFileContent1 = SourceFileContent1; } // to ensure "SourceFileName2" is required (not null) if (SourceFileName2 == null) { throw new InvalidDataException("SourceFileName2 is a required property for MergeToPdfData and cannot be null"); } else { this.SourceFileName2 = SourceFileName2; } // to ensure "SourceFileContent2" is required (not null) if (SourceFileContent2 == null) { throw new InvalidDataException("SourceFileContent2 is a required property for MergeToPdfData and cannot be null"); } else { this.SourceFileContent2 = SourceFileContent2; } // use default value if no "UseAsyncPattern" provided if (UseAsyncPattern == null) { this.UseAsyncPattern = false; } else { this.UseAsyncPattern = UseAsyncPattern; } this.SourceFileName3 = SourceFileName3; this.SourceFileContent3 = SourceFileContent3; this.SourceFileName4 = SourceFileName4; this.SourceFileContent4 = SourceFileContent4; this.SourceFileName5 = SourceFileName5; this.SourceFileContent5 = SourceFileContent5; this.SharepointFile = SharepointFile; this.SharepointFieldName = SharepointFieldName; // use default value if no "DocumentStartPage" provided if (DocumentStartPage == null) { this.DocumentStartPage = DocumentStartPageEnum.Nextpage; } else { this.DocumentStartPage = DocumentStartPage; } // use default value if no "FailOnError" provided if (FailOnError == null) { this.FailOnError = true; } else { this.FailOnError = FailOnError; } }