| POST | /{Brand}/resetscansettings/{TemplateGuid} |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ScannerVision.WebService.ServiceModel;
using ScannerVision.SystemTypes.SvMain.Interfaces;
using ScannerVision.Template.Interfaces;
using ScannerVision.Template;
using ScannerVision.CSCommon.Types.Interfaces;
using ScannerVision.Types;
using ScannerVision.WebService.ServiceModel.Interfaces;
using ScannerVision.Web.Types;
namespace ScannerVision.CSCommon.Types.Interfaces
{
public partial interface IValidator
{
IValidationErrors ValidationErrors { get; set; }
bool IsValid { get; set; }
}
}
namespace ScannerVision.SystemTypes.SvMain.Interfaces
{
public partial interface IClientQuestion
: ITemplateQuestion
{
string QuestionGuid { get; set; }
string ValueDisplayed { get; set; }
string ValueReturned { get; set; }
bool Answered { get; set; }
bool RegexMatches { get; set; }
string RegexHint { get; set; }
}
public partial interface IClientTemplate
{
string Description { get; set; }
byte[] Icon { get; set; }
ITemplateModificationInfo ModificationInfo { get; set; }
string Name { get; set; }
IEnumerable<IClientQuestion> Questions { get; set; }
ITemplate Template { get; set; }
string TemplateGuid { get; set; }
}
public partial interface ITemplateModificationInfo
{
string Guid { get; set; }
DateTime TemplateModificationDateTime { get; set; }
DateTime IconModificationDateTime { get; set; }
}
}
namespace ScannerVision.Template
{
public enum NotificationType
{
FailureOnly,
SuccessOnly,
Always,
}
public enum PdfLoadResolution
{
Default,
Dpi100,
Dpi150,
Dpi200,
Dpi300,
Dpi400,
Dpi500,
Dpi600,
}
public enum ScanColour
{
BlackAndWhite,
Greyscale,
Colour,
Auto,
}
public enum ScanOrientation
{
Portrait,
Landscape,
}
public enum ScanResolution
{
Dpi100,
Dpi200,
Dpi300,
Dpi400,
Dpi600,
}
public enum ScanSide
{
Simplex,
Duplex,
}
public enum ScanSize
{
Auto,
A3,
A4,
A5,
B4,
B5,
Letter,
Legal,
Executive,
Folio,
AutoLong,
A4R,
A5R,
A6R,
B6R,
}
public enum ScanSource
{
Adf,
Glass,
Auto,
}
public enum ScanType
{
Text,
Photo,
TextAndPhoto,
}
public enum TemplateScheduleType
{
Interval,
Fixed,
}
public enum TemplateType
{
Workflow,
FreeForm,
}
}
namespace ScannerVision.Template.Interfaces
{
public partial interface IBadDocumentRejection
: IStatus
{
string RejectionPath { get; set; }
ICredentials ShareCredentials { get; set; }
}
public partial interface ICapture
: IInterface
{
ReadOnlyCollection<ICaptureSource> CaptureSources { get; set; }
}
public partial interface ICaptureSource
: IStatus
{
}
public partial interface ICredentials
: IInterface
{
string Username { get; set; }
string Password { get; set; }
}
public partial interface IGeneral
: IInterface
{
string Name { get; set; }
string Description { get; set; }
string Icon { get; set; }
ITemplateSchedule Schedule { get; set; }
IRejection Rejection { get; set; }
IBadDocumentRejection BadDocumentRejection { get; set; }
PdfLoadResolution? PdfLoadResolution { get; set; }
}
public partial interface INotification
: IStatus
{
string Description { get; set; }
string To { get; set; }
string Subject { get; set; }
string Body { get; set; }
string Cc { get; set; }
string Bcc { get; set; }
NotificationType? NotificationType { get; set; }
}
public partial interface INotifications
: IStatus
{
ReadOnlyCollection<INotification> Notifications { get; set; }
}
public partial interface IRejection
{
int? RejectAfter { get; set; }
string RejectionPath { get; set; }
ICredentials ShareCredentials { get; set; }
}
public partial interface IStringMetadata
: IMetadata
{
bool? IsSecure { get; set; }
string SampleValue { get; set; }
string Value { get; set; }
}
public partial interface ITemplate
: IStatus
{
string TemplateVersion { get; set; }
string ScannerVisionVersion { get; set; }
string Guid { get; set; }
string BeginScript { get; set; }
string EndScript { get; set; }
TemplateType TemplateType { get; set; }
IGeneral General { get; set; }
ICapture Capture { get; set; }
IXmlMetadataImport XmlMetadataImport { get; set; }
INotifications Notifications { get; set; }
IValidator Validator { get; set; }
}
public partial interface ITemplateSchedule
: IInterface
{
TimeSpan? Time { get; set; }
TimeSpan? EndTime { get; set; }
bool? NoEndTime { get; set; }
TemplateScheduleType? Type { get; set; }
}
public partial interface IXmlMetadataImport
: IStatus
{
string SampleDocumentName { get; set; }
ReadOnlyCollection<IXmlMetadataImportTagMapping> TagMappings { get; set; }
ReadOnlyCollection<IXmlMetadataImportNamespaceMapping> NamespaceMappings { get; set; }
}
public partial interface IXmlMetadataImportNamespaceMapping
: IInterface
{
string Prefix { get; set; }
string Name { get; set; }
}
public partial interface IXmlMetadataImportTagMapping
: IInterface
{
string XPathExpression { get; set; }
IStringMetadata Metadata { get; set; }
}
}
namespace ScannerVision.Types
{
public partial interface IValidationError
{
string Property { get; set; }
string ErrorMessage { get; set; }
}
public partial interface IValidationErrors
{
ReadOnlyCollection<IValidationError> Errors { get; set; }
}
}
namespace ScannerVision.Web.Types
{
public enum BoolSetting
{
True,
False,
}
}
namespace ScannerVision.WebService.ServiceModel
{
public enum Brand
{
Desktop,
Hp,
Kyocera,
NeaScan,
Samsung,
FujiXerox,
Ta,
Utax,
Epson,
ScanFront400,
Sharp,
Ricoh,
FujiFilm,
}
public partial class DtoBase
{
public virtual Brand Brand { get; set; }
}
public partial class GetScanSettingsResponse
: GetTemplateResponse
{
public virtual IScanSettings ScanSettings { get; set; }
public virtual string ColourLabel { get; set; }
public virtual string OrientationLabel { get; set; }
public virtual string ResolutionLabel { get; set; }
public virtual string SidesLabel { get; set; }
public virtual string SizeLabel { get; set; }
public virtual string SourceLabel { get; set; }
public virtual string TypeLabel { get; set; }
public virtual string ScanContinuouslyLabel { get; set; }
public virtual string MixedSizesLabel { get; set; }
}
public partial class GetTemplateResponse
: ScanResponseBase
{
public virtual string ServerAddress { get; set; }
public virtual int ServerPort { get; set; }
}
public partial class RequestBase
: DtoBase
{
}
public partial class ResetScanSettingsRequest
: RequestBase
{
public virtual string TemplateGuid { get; set; }
}
public partial class ResponseBase
: DtoBase
{
public virtual string SelectedUiLanguage { get; set; }
public virtual string svSession { get; set; }
public virtual string Title { get; set; }
public virtual string PageTip { get; set; }
public virtual bool NewBrowser { get; set; }
public virtual bool ScanFront400TA { get; set; }
public virtual bool ScanFront400UTAX { get; set; }
}
public partial class ScanResponseBase
: ResponseBase
{
public virtual IClientTemplate Template { get; set; }
public virtual IEnumerable<IClientQuestion> GlobalQuestions { get; set; }
public virtual bool CanEnableScanButton { get; set; }
}
}
namespace ScannerVision.WebService.ServiceModel.Interfaces
{
public partial interface IScanSetting<T>
{
bool IsLocked { get; set; }
IList<IScanSettingItem<T>> Items { get; set; }
string SelectedItem { get; set; }
}
public partial interface IScanSettings
{
IScanSetting<ScanColour> Colour { get; set; }
IScanSetting<ScanOrientation> Orientation { get; set; }
IScanSetting<ScanResolution> Resolution { get; set; }
IScanSetting<ScanSide> Sides { get; set; }
IScanSetting<ScanSize> Size { get; set; }
IScanSetting<ScanSource> Source { get; set; }
IScanSetting<ScanType> Type { get; set; }
IScanSetting<BoolSetting> ScanContinuously { get; set; }
IScanSetting<BoolSetting> MixedSizes { get; set; }
}
}
C# ResetScanSettingsRequest DTOs
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}/resetscansettings/{TemplateGuid} HTTP/1.1
Host: buildmax.org
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"TemplateGuid":"String","Brand":"Desktop"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{Unable to show example output for type 'GetScanSettingsResponse' using the custom 'other' filter}No parameterless constructor defined for this object.