| POST | /{Brand}/scansettings/{TemplateGuid} |
|---|
namespace ScannerVision.WebService.ServiceModel
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type Brand =
| Desktop = 0
| Hp = 1
| Kyocera = 2
| NeaScan = 3
| Samsung = 4
| FujiXerox = 5
| Ta = 6
| Utax = 7
| Epson = 8
| ScanFront400 = 9
| Sharp = 10
| Ricoh = 11
| FujiFilm = 12
[<AllowNullLiteral>]
type DtoBase() =
member val Brand:Brand = new Brand() with get,set
[<AllowNullLiteral>]
type RequestBase() =
inherit DtoBase()
type ScanColour =
| BlackAndWhite = 0
| Greyscale = 1
| Colour = 2
| Auto = 3
type ScanOrientation =
| Portrait = 0
| Landscape = 1
type ScanResolution =
| Dpi100 = 0
| Dpi200 = 1
| Dpi300 = 2
| Dpi400 = 3
| Dpi600 = 4
type ScanSide =
| Simplex = 0
| Duplex = 1
type ScanSize =
| Auto = 0
| A3 = 1
| A4 = 2
| A5 = 3
| B4 = 4
| B5 = 5
| Letter = 6
| Legal = 7
| Executive = 8
| Folio = 9
| AutoLong = 10
| A4R = 11
| A5R = 12
| A6R = 13
| B6R = 14
type ScanSource =
| Adf = 0
| Glass = 1
| Auto = 2
type ScanType =
| Text = 0
| Photo = 1
| TextAndPhoto = 2
type BoolSetting =
| True = 0
| False = 1
[<AllowNullLiteral>]
type ScanSettingsRequest() =
inherit RequestBase()
member val TemplateGuid:String = null with get,set
member val SelectedColour:ScanColour = new ScanColour() with get,set
member val SelectedOrientation:ScanOrientation = new ScanOrientation() with get,set
member val SelectedResolution:ScanResolution = new ScanResolution() with get,set
member val SelectedSides:ScanSide = new ScanSide() with get,set
member val SelectedSize:ScanSize = new ScanSize() with get,set
member val SelectedSource:ScanSource = new ScanSource() with get,set
member val SelectedType:ScanType = new ScanType() with get,set
member val SelectedScanContinuously:BoolSetting = new BoolSetting() with get,set
member val SelectedMixedSizes:BoolSetting = new BoolSetting() with get,set
[<AllowNullLiteral>]
type ResponseBase() =
inherit DtoBase()
member val SelectedUiLanguage:String = null with get,set
member val svSession:String = null with get,set
member val Title:String = null with get,set
member val PageTip:String = null with get,set
member val NewBrowser:Boolean = new Boolean() with get,set
member val ScanFront400TA:Boolean = new Boolean() with get,set
member val ScanFront400UTAX:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type ITemplateModificationInfo =
abstract Guid:String with get,set
abstract TemplateModificationDateTime:DateTime with get,set
abstract IconModificationDateTime:DateTime with get,set
[<AllowNullLiteral>]
type IClientQuestion =
abstract QuestionGuid:String with get,set
abstract ValueDisplayed:String with get,set
abstract ValueReturned:String with get,set
abstract Answered:Boolean with get,set
abstract RegexMatches:Boolean with get,set
abstract RegexHint:String with get,set
type TemplateType =
| Workflow = 0
| FreeForm = 1
type TemplateScheduleType =
| Interval = 0
| Fixed = 1
[<AllowNullLiteral>]
type ITemplateSchedule =
abstract Time:Nullable<TimeSpan> with get,set
abstract EndTime:Nullable<TimeSpan> with get,set
abstract NoEndTime:Nullable<Boolean> with get,set
abstract Type:Nullable<TemplateScheduleType> with get,set
[<AllowNullLiteral>]
type ICredentials =
abstract Username:String with get,set
abstract Password:String with get,set
[<AllowNullLiteral>]
type IRejection =
abstract RejectAfter:Nullable<Int32> with get,set
abstract RejectionPath:String with get,set
abstract ShareCredentials:ICredentials with get,set
[<AllowNullLiteral>]
type IBadDocumentRejection =
abstract RejectionPath:String with get,set
abstract ShareCredentials:ICredentials with get,set
type PdfLoadResolution =
| Default = 0
| Dpi100 = 1
| Dpi150 = 2
| Dpi200 = 3
| Dpi300 = 4
| Dpi400 = 5
| Dpi500 = 6
| Dpi600 = 7
[<AllowNullLiteral>]
type IGeneral =
abstract Name:String with get,set
abstract Description:String with get,set
abstract Icon:String with get,set
abstract Schedule:ITemplateSchedule with get,set
abstract Rejection:IRejection with get,set
abstract BadDocumentRejection:IBadDocumentRejection with get,set
abstract PdfLoadResolution:Nullable<PdfLoadResolution> with get,set
[<AllowNullLiteral>]
type ICaptureSource =
interface end
[<AllowNullLiteral>]
type ICapture =
abstract CaptureSources:ReadOnlyCollection<ICaptureSource> with get,set
[<AllowNullLiteral>]
type IStringMetadata =
abstract IsSecure:Nullable<Boolean> with get,set
abstract SampleValue:String with get,set
abstract Value:String with get,set
[<AllowNullLiteral>]
type IXmlMetadataImportTagMapping =
abstract XPathExpression:String with get,set
abstract Metadata:IStringMetadata with get,set
[<AllowNullLiteral>]
type IXmlMetadataImportNamespaceMapping =
abstract Prefix:String with get,set
abstract Name:String with get,set
[<AllowNullLiteral>]
type IXmlMetadataImport =
abstract SampleDocumentName:String with get,set
abstract TagMappings:ReadOnlyCollection<IXmlMetadataImportTagMapping> with get,set
abstract NamespaceMappings:ReadOnlyCollection<IXmlMetadataImportNamespaceMapping> with get,set
type NotificationType =
| FailureOnly = 0
| SuccessOnly = 1
| Always = 2
[<AllowNullLiteral>]
type INotification =
abstract Description:String with get,set
abstract To:String with get,set
abstract Subject:String with get,set
abstract Body:String with get,set
abstract Cc:String with get,set
abstract Bcc:String with get,set
abstract NotificationType:Nullable<NotificationType> with get,set
[<AllowNullLiteral>]
type INotifications =
abstract Notifications:ReadOnlyCollection<INotification> with get,set
[<AllowNullLiteral>]
type IValidationError =
abstract Property:String with get,set
abstract ErrorMessage:String with get,set
[<AllowNullLiteral>]
type IValidationErrors =
abstract Errors:ReadOnlyCollection<IValidationError> with get,set
[<AllowNullLiteral>]
type IValidator =
abstract ValidationErrors:IValidationErrors with get,set
abstract IsValid:Boolean with get,set
[<AllowNullLiteral>]
type ITemplate =
abstract TemplateVersion:String with get,set
abstract ScannerVisionVersion:String with get,set
abstract Guid:String with get,set
abstract BeginScript:String with get,set
abstract EndScript:String with get,set
abstract TemplateType:TemplateType with get,set
abstract General:IGeneral with get,set
abstract Capture:ICapture with get,set
abstract XmlMetadataImport:IXmlMetadataImport with get,set
abstract Notifications:INotifications with get,set
abstract Validator:IValidator with get,set
[<AllowNullLiteral>]
type IClientTemplate =
abstract Description:String with get,set
abstract Icon:Byte[] with get,set
abstract ModificationInfo:ITemplateModificationInfo with get,set
abstract Name:String with get,set
abstract Questions:IEnumerable<IClientQuestion> with get,set
abstract Template:ITemplate with get,set
abstract TemplateGuid:String with get,set
[<AllowNullLiteral>]
type ScanResponseBase() =
inherit ResponseBase()
member val Template:IClientTemplate = null with get,set
member val GlobalQuestions:IEnumerable<IClientQuestion> = null with get,set
member val CanEnableScanButton:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type GetTemplateResponse() =
inherit ScanResponseBase()
member val ServerAddress:String = null with get,set
member val ServerPort:Int32 = new Int32() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Brand}/scansettings/{TemplateGuid} HTTP/1.1
Host: buildmax.org
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"TemplateGuid":"String","SelectedColour":"BlackAndWhite","SelectedOrientation":"Portrait","SelectedResolution":"Dpi100","SelectedSides":"Simplex","SelectedSize":"Auto","SelectedSource":"Adf","SelectedType":"Text","SelectedScanContinuously":"True","SelectedMixedSizes":"True","Brand":"Desktop"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{Unable to show example output for type 'GetTemplateResponse' using the custom 'other' filter}No parameterless constructor defined for this object.