namespace ScannerVision.WebService.Json.Dto
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type JsonDto() =
class end
[<AllowNullLiteral>]
type GetJsonTemplateRequest() =
inherit JsonDto()
member val Guid:String = null with get,set
type QuestionType =
| Edit = 0
| List = 1
| EditList = 2
| Browse = 3
| Password = 4
| Date = 5
| Time = 6
| Boolean = 7
| Integer = 8
| Double = 9
| BrowseList = 10
[<AllowNullLiteral>]
type JsonQuestion() =
member val PlQuestionType:QuestionType = new QuestionType() with get,set
member val Question:String = null with get,set
member val TagName:String = null with get,set
member val Default:String = null with get,set
member val ToolTip:String = null with get,set
member val SampleValue:String = null with get,set
member val Regex:String = null with get,set
member val Minimum:Int32 = new Int32() with get,set
member val Maximum:Int32 = new Int32() with get,set
member val Required:Boolean = new Boolean() with get,set
member val Dynamic:Boolean = new Boolean() with get,set
member val PicklistGuid:String = null with get,set
member val TemplateGuid:String = null with get,set
member val HideDefaultValue:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type JsonScanSettings() =
member val ScanType:String = null with get,set
member val ScanTypeLocked:Boolean = new Boolean() with get,set
member val ScanColour:String = null with get,set
member val ScanColourLocked:Boolean = new Boolean() with get,set
member val ScanResolution:String = null with get,set
member val ScanResolutionLocked:Boolean = new Boolean() with get,set
member val ScanSide:String = null with get,set
member val ScanSideLocked:Boolean = new Boolean() with get,set
member val ScanSize:String = null with get,set
member val ScanSizeLocked:Boolean = new Boolean() with get,set
member val ScanOrientation:String = null with get,set
member val ScanOrientationLocked:Boolean = new Boolean() with get,set
member val ScanSource:String = null with get,set
member val ScanSourceLocked:Boolean = new Boolean() with get,set
member val ScanContinuously:Boolean = new Boolean() with get,set
member val ScanContinuouslyLocked:Boolean = new Boolean() with get,set
member val IsMixedSizes:Boolean = new Boolean() with get,set
member val IsMixedSizesLocked:Boolean = new Boolean() with get,set
member val MinimumPageCount:Int32 = new Int32() with get,set
member val MaximumPageCount:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type JsonTemplate() =
member val Name:String = null with get,set
member val Description:String = null with get,set
member val Guid:String = null with get,set
member val TemplateModificationDate:DateTime = new DateTime() with get,set
member val IconModificationDate:DateTime = new DateTime() with get,set
member val Icon:Byte[] = null with get,set
member val TemplateQuestions:JsonQuestion[] = null with get,set
member val GlobalQuestions:JsonQuestion[] = null with get,set
member val ScanSettings:JsonScanSettings = null with get,set
[<AllowNullLiteral>]
type GetJsonTemplateResponse() =
inherit JsonDto()
member val Template:JsonTemplate = null with get,set
F# GetJsonTemplateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/GetJsonTemplateRequest HTTP/1.1
Host: dmsshow.kyocerasolutions.cz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Guid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Template:
{
Name: String,
Description: String,
Guid: String,
TemplateModificationDate: 0001-01-01,
IconModificationDate: 0001-01-01,
Icon: AA==,
TemplateQuestions:
[
{
PlQuestionType: Edit,
Question: String,
TagName: String,
Default: String,
ToolTip: String,
SampleValue: String,
Regex: String,
Minimum: 0,
Maximum: 0,
Required: False,
Dynamic: False,
PicklistGuid: String,
TemplateGuid: String,
HideDefaultValue: False
}
],
GlobalQuestions:
[
{
PlQuestionType: Edit,
Question: String,
TagName: String,
Default: String,
ToolTip: String,
SampleValue: String,
Regex: String,
Minimum: 0,
Maximum: 0,
Required: False,
Dynamic: False,
PicklistGuid: String,
TemplateGuid: String,
HideDefaultValue: False
}
],
ScanSettings:
{
ScanType: String,
ScanTypeLocked: False,
ScanColour: String,
ScanColourLocked: False,
ScanResolution: String,
ScanResolutionLocked: False,
ScanSide: String,
ScanSideLocked: False,
ScanSize: String,
ScanSizeLocked: False,
ScanOrientation: String,
ScanOrientationLocked: False,
ScanSource: String,
ScanSourceLocked: False,
ScanContinuously: False,
ScanContinuouslyLocked: False,
IsMixedSizes: False,
IsMixedSizesLocked: False,
MinimumPageCount: 0,
MaximumPageCount: 0
}
}
}