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 .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/UpdateActionRequest HTTP/1.1
Host: 52.142.207.43
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ecUpdaterLicenseCommModel.UpdateActionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EndianUpdaterLicenser">
<Action>doCheckVersion</Action>
<CryptedLicenseNr>String</CryptedLicenseNr>
<CryptedStamp>String</CryptedStamp>
</ecUpdaterLicenseCommModel.UpdateActionRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ecUpdaterLicenseCommModel.UpdateActionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EndianUpdaterLicenser">
<Answer>doCheckVersion</Answer>
<AnswerInfo1>String</AnswerInfo1>
<AnswerInfo2>String</AnswerInfo2>
<ModulVersionen xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringecUpdaterLicenseCommModel.ModulVersionsInfoFZISSfTN>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<Build>0</Build>
<Major>0</Major>
<Minor>0</Minor>
<Modul>String</Modul>
<PruefAssembly>String</PruefAssembly>
<Revision>0</Revision>
<URL>String</URL>
<istDisabled>false</istDisabled>
<istTestVersion>false</istTestVersion>
<willTestVersion>false</willTestVersion>
</d2p1:Value>
</d2p1:KeyValueOfstringecUpdaterLicenseCommModel.ModulVersionsInfoFZISSfTN>
</ModulVersionen>
</ecUpdaterLicenseCommModel.UpdateActionResponse>