import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
class UpdateAction(str, Enum):
DO_CHECK_VERSION = 'doCheckVersion'
DO_NOTHING = 'doNothing'
DO_UPDATE = 'doUpdate'
DO_DOWNGRADE = 'doDowngrade'
SEND_VERSIONLIST = 'sendVersionlist'
DELETE = 'delete'
INSTALL = 'install'
EXECUTE = 'execute'
COPY = 'copy'
MOVE = 'move'
ERROR = 'Error'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ModulVersionsInfo:
modul: Optional[str] = None
pruef_assembly: Optional[str] = None
ist_test_version: bool = False
ist_disabled: bool = False
url: Optional[str] = None
will_test_version: bool = False
major: int = 0
minor: int = 0
build: int = 0
revision: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateActionResponse:
answer: Optional[UpdateAction] = None
answer_info1: Optional[str] = None
answer_info2: Optional[str] = None
modul_versionen: Optional[Dict[str, ModulVersionsInfo]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateActionRequest:
crypted_license_nr: Optional[str] = None
crypted_stamp: Optional[str] = None
action: Optional[UpdateAction] = None
Python UpdateActionRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /json/reply/UpdateActionRequest HTTP/1.1
Host: 52.142.207.43
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CryptedLicenseNr":"String","CryptedStamp":"String","Action":"doCheckVersion"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Answer":"doCheckVersion","AnswerInfo1":"String","AnswerInfo2":"String","ModulVersionen":{"String":{"Modul":"String","PruefAssembly":"String","istTestVersion":false,"istDisabled":false,"URL":"String","willTestVersion":false,"Major":0,"Minor":0,"Build":0,"Revision":0}}}