| PUT | /App/{UserId}/Nutzeinheit |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
// @DataContract
class Eras2AppServiceModelBase implements JsonSerializable
{
public function __construct(
// @DataMember(Name="UserId")
/** @var string */
public string $UserId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
return empty($o) ? new class(){} : $o;
}
}
class UpdateNutzeinheitResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class Address implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="Straße")
/** @var string|null */
public ?string $Stra_e=null,
// @DataMember(Name="Straße2")
/** @var string|null */
public ?string $Stra_e2=null,
// @DataMember(Name="Hausnummer")
/** @var string|null */
public ?string $Hausnummer=null,
// @DataMember(Name="Postleitzahl")
/** @var string|null */
public ?string $Postleitzahl=null,
// @DataMember(Name="Ort")
/** @var string|null */
public ?string $Ort=null,
// @DataMember(Name="Postfach")
/** @var string|null */
public ?string $Postfach=null,
// @DataMember(Name="Adresszusatz")
/** @var string|null */
public ?string $Adresszusatz=null,
// @DataMember(Name="Breitengrad")
/** @var float */
public float $Breitengrad=0.0,
// @DataMember(Name="Laengengrad")
/** @var float */
public float $Laengengrad=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['Stra_e'])) $this->Stra_e = $o['Stra_e'];
if (isset($o['Stra_e2'])) $this->Stra_e2 = $o['Stra_e2'];
if (isset($o['Hausnummer'])) $this->Hausnummer = $o['Hausnummer'];
if (isset($o['Postleitzahl'])) $this->Postleitzahl = $o['Postleitzahl'];
if (isset($o['Ort'])) $this->Ort = $o['Ort'];
if (isset($o['Postfach'])) $this->Postfach = $o['Postfach'];
if (isset($o['Adresszusatz'])) $this->Adresszusatz = $o['Adresszusatz'];
if (isset($o['Breitengrad'])) $this->Breitengrad = $o['Breitengrad'];
if (isset($o['Laengengrad'])) $this->Laengengrad = $o['Laengengrad'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->Stra_e)) $o['Stra_e'] = $this->Stra_e;
if (isset($this->Stra_e2)) $o['Stra_e2'] = $this->Stra_e2;
if (isset($this->Hausnummer)) $o['Hausnummer'] = $this->Hausnummer;
if (isset($this->Postleitzahl)) $o['Postleitzahl'] = $this->Postleitzahl;
if (isset($this->Ort)) $o['Ort'] = $this->Ort;
if (isset($this->Postfach)) $o['Postfach'] = $this->Postfach;
if (isset($this->Adresszusatz)) $o['Adresszusatz'] = $this->Adresszusatz;
if (isset($this->Breitengrad)) $o['Breitengrad'] = $this->Breitengrad;
if (isset($this->Laengengrad)) $o['Laengengrad'] = $this->Laengengrad;
return empty($o) ? new class(){} : $o;
}
}
enum UnitKind : string
{
case L = 'L';
case Kg = 'Kg';
case CBM = 'CBM';
case Stck = 'Stck';
case KWH = 'KWH';
case MWH = 'MWH';
case GWH = 'GWH';
case T = 'T';
case RM = 'RM';
case Einheit = 'Einheit';
case Qm = 'Qm';
case GJ = 'GJ';
case MJ = 'MJ';
case Null = 'Null';
}
enum EstimationKind : string
{
case Null = 'Null';
case S1 = 'S1';
case S2 = 'S2';
case S3 = 'S3';
case S4 = 'S4';
case S5 = 'S5';
case N1 = 'N1';
case N2 = 'N2';
}
enum DeviceConsumptionState : string
{
case Null = 'Null';
case RMInOrdnung = 'RMInOrdnung';
case RMFehler = 'RMFehler';
case RMNichtGepr = 'RMNichtGepr';
case RMFehlerTausch = 'RMFehlerTausch';
case KeinWohnungszutritt = 'KeinWohnungszutritt';
case Defekt = 'Defekt';
case FalschLaufend = 'FalschLaufend';
case Überlauf = 'Überlauf';
case EichungBeachten = 'EichungBeachten';
case ProbeEntnommen = 'ProbeEntnommen';
case ProbeZumLabor = 'ProbeZumLabor';
case ProbePositiv = 'ProbePositiv';
case ProbeNegativ = 'ProbeNegativ';
}
enum DeviceConsumptionOrigin : string
{
case Unbekannt = 'Unbekannt';
case Manual = 'Manual';
case Emr = 'Emr';
case Walkby = 'Walkby';
case Deleted = 'Deleted';
}
// @DataContract
class DeviceConsumption implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="Ablesedatum")
/** @var DateTime|null */
public ?DateTime $Ablesedatum=null,
// @DataMember(Name="Faktor")
/** @var float */
public float $Faktor=0.0,
// @DataMember(Name="Ablesung")
/** @var float|null */
public ?float $Ablesung=null,
// @DataMember(Name="Verbrauch")
/** @var float|null */
public ?float $Verbrauch=null,
// @DataMember(Name="Aenderungsdatum")
/** @var DateTime|null */
public ?DateTime $Aenderungsdatum=null,
// @DataMember(Name="Schaetzung")
/** @var EstimationKind|null */
public ?EstimationKind $Schaetzung=null,
// @DataMember(Name="Status")
/** @var DeviceConsumptionState|null */
public ?DeviceConsumptionState $Status=null,
// @DataMember(Name="Anmerkung")
/** @var string|null */
public ?string $Anmerkung=null,
// @DataMember(Name="IstRekonstruiert")
/** @var bool|null */
public ?bool $IstRekonstruiert=null,
// @DataMember(Name="Manuell")
/** @var float|null */
public ?float $Manuell=null,
// @DataMember(Name="Herkunft")
/** @var DeviceConsumptionOrigin|null */
public ?DeviceConsumptionOrigin $Herkunft=null,
// @DataMember(Name="Lufttemperatur")
/** @var float|null */
public ?float $Lufttemperatur=null,
// @DataMember(Name="HeizkörperTemperatur")
/** @var float|null */
public ?float $Heizk_rperTemperatur=null,
// @DataMember(Name="LetzterfehlerDatum")
/** @var DateTime|null */
public ?DateTime $LetzterfehlerDatum=null,
// @DataMember(Name="Fehler")
/** @var string|null */
public ?string $Fehler=null,
// @DataMember(Name="Ampullenfarbe")
/** @var string|null */
public ?string $Ampullenfarbe=null,
// @DataMember(Name="AbleseartGuid")
/** @var string */
public string $AbleseartGuid=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['Ablesedatum'])) $this->Ablesedatum = JsonConverters::from('DateTime', $o['Ablesedatum']);
if (isset($o['Faktor'])) $this->Faktor = $o['Faktor'];
if (isset($o['Ablesung'])) $this->Ablesung = $o['Ablesung'];
if (isset($o['Verbrauch'])) $this->Verbrauch = $o['Verbrauch'];
if (isset($o['Aenderungsdatum'])) $this->Aenderungsdatum = JsonConverters::from('DateTime', $o['Aenderungsdatum']);
if (isset($o['Schaetzung'])) $this->Schaetzung = JsonConverters::from('EstimationKind', $o['Schaetzung']);
if (isset($o['Status'])) $this->Status = JsonConverters::from('DeviceConsumptionState', $o['Status']);
if (isset($o['Anmerkung'])) $this->Anmerkung = $o['Anmerkung'];
if (isset($o['IstRekonstruiert'])) $this->IstRekonstruiert = $o['IstRekonstruiert'];
if (isset($o['Manuell'])) $this->Manuell = $o['Manuell'];
if (isset($o['Herkunft'])) $this->Herkunft = JsonConverters::from('DeviceConsumptionOrigin', $o['Herkunft']);
if (isset($o['Lufttemperatur'])) $this->Lufttemperatur = $o['Lufttemperatur'];
if (isset($o['Heizk_rperTemperatur'])) $this->Heizk_rperTemperatur = $o['Heizk_rperTemperatur'];
if (isset($o['LetzterfehlerDatum'])) $this->LetzterfehlerDatum = JsonConverters::from('DateTime', $o['LetzterfehlerDatum']);
if (isset($o['Fehler'])) $this->Fehler = $o['Fehler'];
if (isset($o['Ampullenfarbe'])) $this->Ampullenfarbe = $o['Ampullenfarbe'];
if (isset($o['AbleseartGuid'])) $this->AbleseartGuid = $o['AbleseartGuid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->Ablesedatum)) $o['Ablesedatum'] = JsonConverters::to('DateTime', $this->Ablesedatum);
if (isset($this->Faktor)) $o['Faktor'] = $this->Faktor;
if (isset($this->Ablesung)) $o['Ablesung'] = $this->Ablesung;
if (isset($this->Verbrauch)) $o['Verbrauch'] = $this->Verbrauch;
if (isset($this->Aenderungsdatum)) $o['Aenderungsdatum'] = JsonConverters::to('DateTime', $this->Aenderungsdatum);
if (isset($this->Schaetzung)) $o['Schaetzung'] = JsonConverters::to('EstimationKind', $this->Schaetzung);
if (isset($this->Status)) $o['Status'] = JsonConverters::to('DeviceConsumptionState', $this->Status);
if (isset($this->Anmerkung)) $o['Anmerkung'] = $this->Anmerkung;
if (isset($this->IstRekonstruiert)) $o['IstRekonstruiert'] = $this->IstRekonstruiert;
if (isset($this->Manuell)) $o['Manuell'] = $this->Manuell;
if (isset($this->Herkunft)) $o['Herkunft'] = JsonConverters::to('DeviceConsumptionOrigin', $this->Herkunft);
if (isset($this->Lufttemperatur)) $o['Lufttemperatur'] = $this->Lufttemperatur;
if (isset($this->Heizk_rperTemperatur)) $o['Heizk_rperTemperatur'] = $this->Heizk_rperTemperatur;
if (isset($this->LetzterfehlerDatum)) $o['LetzterfehlerDatum'] = JsonConverters::to('DateTime', $this->LetzterfehlerDatum);
if (isset($this->Fehler)) $o['Fehler'] = $this->Fehler;
if (isset($this->Ampullenfarbe)) $o['Ampullenfarbe'] = $this->Ampullenfarbe;
if (isset($this->AbleseartGuid)) $o['AbleseartGuid'] = $this->AbleseartGuid;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class Photo implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="Timestamp")
/** @var DateTime */
public DateTime $Timestamp=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['Timestamp'])) $this->Timestamp = JsonConverters::from('DateTime', $o['Timestamp']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->Timestamp)) $o['Timestamp'] = JsonConverters::to('DateTime', $this->Timestamp);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class DeviceAdditionalArticle implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="Menge")
/** @var float|null */
public ?float $Menge=null,
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['Menge'])) $this->Menge = $o['Menge'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->Menge)) $o['Menge'] = $this->Menge;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class Device implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="Geraetenummer")
/** @var string|null */
public ?string $Geraetenummer=null,
// @DataMember(Name="Bezeichnung")
/** @var string|null */
public ?string $Bezeichnung=null,
// @DataMember(Name="Beschreibung")
/** @var string|null */
public ?string $Beschreibung=null,
// @DataMember(Name="Einbaudatum")
/** @var DateTime */
public DateTime $Einbaudatum=new DateTime(),
// @DataMember(Name="Ausbaudatum")
/** @var DateTime|null */
public ?DateTime $Ausbaudatum=null,
// @DataMember(Name="Eichdatum")
/** @var DateTime|null */
public ?DateTime $Eichdatum=null,
// @DataMember(Name="Einheit")
/** @var UnitKind|null */
public ?UnitKind $Einheit=null,
// @DataMember(Name="Memo")
/** @var string|null */
public ?string $Memo=null,
// @DataMember(Name="Abzug")
/** @var bool|null */
public ?bool $Abzug=null,
// @DataMember(Name="GrpKennung")
/** @var string|null */
public ?string $GrpKennung=null,
// @DataMember(Name="Dauerschaetzung")
/** @var EstimationKind|null */
public ?EstimationKind $Dauerschaetzung=null,
// @DataMember(Name="ErstInbetriebnahme")
/** @var DateTime|null */
public ?DateTime $ErstInbetriebnahme=null,
// @DataMember(Name="FirmwareVersion")
/** @var string|null */
public ?string $FirmwareVersion=null,
// @DataMember(Name="RaumGuid")
/** @var string */
public string $RaumGuid='',
// @DataMember(Name="LaufendeNummer")
/** @var string|null */
public ?string $LaufendeNummer=null,
// @DataMember(Name="Gemietet")
/** @var bool|null */
public ?bool $Gemietet=null,
// @DataMember(Name="Gewartet")
/** @var bool|null */
public ?bool $Gewartet=null,
// @DataMember(Name="GeraeteKatalogGuid")
/** @var string */
public string $GeraeteKatalogGuid='',
// @DataMember(Name="Verbraeuche")
/** @var array<DeviceConsumption>|null */
public ?array $Verbraeuche=null,
// @DataMember(Name="Fotos")
/** @var array<Photo>|null */
public ?array $Fotos=null,
// @DataMember(Name="ZusatzArtikel")
/** @var array<DeviceAdditionalArticle>|null */
public ?array $ZusatzArtikel=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['Geraetenummer'])) $this->Geraetenummer = $o['Geraetenummer'];
if (isset($o['Bezeichnung'])) $this->Bezeichnung = $o['Bezeichnung'];
if (isset($o['Beschreibung'])) $this->Beschreibung = $o['Beschreibung'];
if (isset($o['Einbaudatum'])) $this->Einbaudatum = JsonConverters::from('DateTime', $o['Einbaudatum']);
if (isset($o['Ausbaudatum'])) $this->Ausbaudatum = JsonConverters::from('DateTime', $o['Ausbaudatum']);
if (isset($o['Eichdatum'])) $this->Eichdatum = JsonConverters::from('DateTime', $o['Eichdatum']);
if (isset($o['Einheit'])) $this->Einheit = JsonConverters::from('UnitKind', $o['Einheit']);
if (isset($o['Memo'])) $this->Memo = $o['Memo'];
if (isset($o['Abzug'])) $this->Abzug = $o['Abzug'];
if (isset($o['GrpKennung'])) $this->GrpKennung = $o['GrpKennung'];
if (isset($o['Dauerschaetzung'])) $this->Dauerschaetzung = JsonConverters::from('EstimationKind', $o['Dauerschaetzung']);
if (isset($o['ErstInbetriebnahme'])) $this->ErstInbetriebnahme = JsonConverters::from('DateTime', $o['ErstInbetriebnahme']);
if (isset($o['FirmwareVersion'])) $this->FirmwareVersion = $o['FirmwareVersion'];
if (isset($o['RaumGuid'])) $this->RaumGuid = $o['RaumGuid'];
if (isset($o['LaufendeNummer'])) $this->LaufendeNummer = $o['LaufendeNummer'];
if (isset($o['Gemietet'])) $this->Gemietet = $o['Gemietet'];
if (isset($o['Gewartet'])) $this->Gewartet = $o['Gewartet'];
if (isset($o['GeraeteKatalogGuid'])) $this->GeraeteKatalogGuid = $o['GeraeteKatalogGuid'];
if (isset($o['Verbraeuche'])) $this->Verbraeuche = JsonConverters::fromArray('DeviceConsumption', $o['Verbraeuche']);
if (isset($o['Fotos'])) $this->Fotos = JsonConverters::fromArray('Photo', $o['Fotos']);
if (isset($o['ZusatzArtikel'])) $this->ZusatzArtikel = JsonConverters::fromArray('DeviceAdditionalArticle', $o['ZusatzArtikel']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->Geraetenummer)) $o['Geraetenummer'] = $this->Geraetenummer;
if (isset($this->Bezeichnung)) $o['Bezeichnung'] = $this->Bezeichnung;
if (isset($this->Beschreibung)) $o['Beschreibung'] = $this->Beschreibung;
if (isset($this->Einbaudatum)) $o['Einbaudatum'] = JsonConverters::to('DateTime', $this->Einbaudatum);
if (isset($this->Ausbaudatum)) $o['Ausbaudatum'] = JsonConverters::to('DateTime', $this->Ausbaudatum);
if (isset($this->Eichdatum)) $o['Eichdatum'] = JsonConverters::to('DateTime', $this->Eichdatum);
if (isset($this->Einheit)) $o['Einheit'] = JsonConverters::to('UnitKind', $this->Einheit);
if (isset($this->Memo)) $o['Memo'] = $this->Memo;
if (isset($this->Abzug)) $o['Abzug'] = $this->Abzug;
if (isset($this->GrpKennung)) $o['GrpKennung'] = $this->GrpKennung;
if (isset($this->Dauerschaetzung)) $o['Dauerschaetzung'] = JsonConverters::to('EstimationKind', $this->Dauerschaetzung);
if (isset($this->ErstInbetriebnahme)) $o['ErstInbetriebnahme'] = JsonConverters::to('DateTime', $this->ErstInbetriebnahme);
if (isset($this->FirmwareVersion)) $o['FirmwareVersion'] = $this->FirmwareVersion;
if (isset($this->RaumGuid)) $o['RaumGuid'] = $this->RaumGuid;
if (isset($this->LaufendeNummer)) $o['LaufendeNummer'] = $this->LaufendeNummer;
if (isset($this->Gemietet)) $o['Gemietet'] = $this->Gemietet;
if (isset($this->Gewartet)) $o['Gewartet'] = $this->Gewartet;
if (isset($this->GeraeteKatalogGuid)) $o['GeraeteKatalogGuid'] = $this->GeraeteKatalogGuid;
if (isset($this->Verbraeuche)) $o['Verbraeuche'] = JsonConverters::toArray('DeviceConsumption', $this->Verbraeuche);
if (isset($this->Fotos)) $o['Fotos'] = JsonConverters::toArray('Photo', $this->Fotos);
if (isset($this->ZusatzArtikel)) $o['ZusatzArtikel'] = JsonConverters::toArray('DeviceAdditionalArticle', $this->ZusatzArtikel);
return empty($o) ? new class(){} : $o;
}
}
enum NutzerKind : string
{
case Leerstand = 'Leerstand';
case Gewerblich = 'Gewerblich';
case Privat = 'Privat';
case AllgemeineNutzung = 'AllgemeineNutzung';
}
// @DataContract
class NutzerCommunication implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="Adresse")
/** @var string|null */
public ?string $Adresse=null,
// @DataMember(Name="Anmerkung")
/** @var string|null */
public ?string $Anmerkung=null,
// @DataMember(Name="KommunikationsFunktionGuid")
/** @var string */
public string $KommunikationsFunktionGuid=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['Adresse'])) $this->Adresse = $o['Adresse'];
if (isset($o['Anmerkung'])) $this->Anmerkung = $o['Anmerkung'];
if (isset($o['KommunikationsFunktionGuid'])) $this->KommunikationsFunktionGuid = $o['KommunikationsFunktionGuid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->Adresse)) $o['Adresse'] = $this->Adresse;
if (isset($this->Anmerkung)) $o['Anmerkung'] = $this->Anmerkung;
if (isset($this->KommunikationsFunktionGuid)) $o['KommunikationsFunktionGuid'] = $this->KommunikationsFunktionGuid;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class NutzerPersonen implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="Personen")
/** @var int|null */
public ?int $Personen=null,
// @DataMember(Name="Von")
/** @var DateTime */
public DateTime $Von=new DateTime(),
// @DataMember(Name="Bis")
/** @var DateTime|null */
public ?DateTime $Bis=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['Personen'])) $this->Personen = $o['Personen'];
if (isset($o['Von'])) $this->Von = JsonConverters::from('DateTime', $o['Von']);
if (isset($o['Bis'])) $this->Bis = JsonConverters::from('DateTime', $o['Bis']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->Personen)) $o['Personen'] = $this->Personen;
if (isset($this->Von)) $o['Von'] = JsonConverters::to('DateTime', $this->Von);
if (isset($this->Bis)) $o['Bis'] = JsonConverters::to('DateTime', $this->Bis);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class NutzerCoOwnership implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="ShareValue")
/** @var float|null */
public ?float $ShareValue=null,
// @DataMember(Name="Von")
/** @var DateTime */
public DateTime $Von=new DateTime(),
// @DataMember(Name="Bis")
/** @var DateTime|null */
public ?DateTime $Bis=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['ShareValue'])) $this->ShareValue = $o['ShareValue'];
if (isset($o['Von'])) $this->Von = JsonConverters::from('DateTime', $o['Von']);
if (isset($o['Bis'])) $this->Bis = JsonConverters::from('DateTime', $o['Bis']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->ShareValue)) $o['ShareValue'] = $this->ShareValue;
if (isset($this->Von)) $o['Von'] = JsonConverters::to('DateTime', $this->Von);
if (isset($this->Bis)) $o['Bis'] = JsonConverters::to('DateTime', $this->Bis);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class NutzerQuadratmeter implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="Quadratmeter_Hzg")
/** @var float|null */
public ?float $Quadratmeter_Hzg=null,
// @DataMember(Name="Quadratmeter_Ww")
/** @var float|null */
public ?float $Quadratmeter_Ww=null,
// @DataMember(Name="Quadratmeter_Nk")
/** @var float|null */
public ?float $Quadratmeter_Nk=null,
// @DataMember(Name="Von")
/** @var DateTime */
public DateTime $Von=new DateTime(),
// @DataMember(Name="Bis")
/** @var DateTime|null */
public ?DateTime $Bis=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['Quadratmeter_Hzg'])) $this->Quadratmeter_Hzg = $o['Quadratmeter_Hzg'];
if (isset($o['Quadratmeter_Ww'])) $this->Quadratmeter_Ww = $o['Quadratmeter_Ww'];
if (isset($o['Quadratmeter_Nk'])) $this->Quadratmeter_Nk = $o['Quadratmeter_Nk'];
if (isset($o['Von'])) $this->Von = JsonConverters::from('DateTime', $o['Von']);
if (isset($o['Bis'])) $this->Bis = JsonConverters::from('DateTime', $o['Bis']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->Quadratmeter_Hzg)) $o['Quadratmeter_Hzg'] = $this->Quadratmeter_Hzg;
if (isset($this->Quadratmeter_Ww)) $o['Quadratmeter_Ww'] = $this->Quadratmeter_Ww;
if (isset($this->Quadratmeter_Nk)) $o['Quadratmeter_Nk'] = $this->Quadratmeter_Nk;
if (isset($this->Von)) $o['Von'] = JsonConverters::to('DateTime', $this->Von);
if (isset($this->Bis)) $o['Bis'] = JsonConverters::to('DateTime', $this->Bis);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class Nutzer implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="ArtDerNutzung")
/** @var NutzerKind|null */
public ?NutzerKind $ArtDerNutzung=null,
// @DataMember(Name="Einzug")
/** @var DateTime|null */
public ?DateTime $Einzug=null,
// @DataMember(Name="Auszug")
/** @var DateTime|null */
public ?DateTime $Auszug=null,
// @DataMember(Name="Name1")
/** @var string|null */
public ?string $Name1=null,
// @DataMember(Name="Name2")
/** @var string|null */
public ?string $Name2=null,
// @DataMember(Name="Name3")
/** @var string|null */
public ?string $Name3=null,
// @DataMember(Name="Name4")
/** @var string|null */
public ?string $Name4=null,
// @DataMember(Name="Anmerkung")
/** @var string|null */
public ?string $Anmerkung=null,
// @DataMember(Name="NaechsterTermin")
/** @var DateTime|null */
public ?DateTime $NaechsterTermin=null,
// @DataMember(Name="Anrede")
/** @var string|null */
public ?string $Anrede=null,
// @DataMember(Name="Titel")
/** @var string|null */
public ?string $Titel=null,
// @DataMember(Name="NutzerKommunikationen")
/** @var array<NutzerCommunication>|null */
public ?array $NutzerKommunikationen=null,
// @DataMember(Name="NutzerPersonen")
/** @var array<NutzerPersonen>|null */
public ?array $NutzerPersonen=null,
// @DataMember(Name="NutzerCoOwnership")
/** @var array<NutzerCoOwnership>|null */
public ?array $NutzerCoOwnership=null,
// @DataMember(Name="NutzerQuadratmeter")
/** @var array<NutzerQuadratmeter>|null */
public ?array $NutzerQuadratmeter=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['ArtDerNutzung'])) $this->ArtDerNutzung = JsonConverters::from('NutzerKind', $o['ArtDerNutzung']);
if (isset($o['Einzug'])) $this->Einzug = JsonConverters::from('DateTime', $o['Einzug']);
if (isset($o['Auszug'])) $this->Auszug = JsonConverters::from('DateTime', $o['Auszug']);
if (isset($o['Name1'])) $this->Name1 = $o['Name1'];
if (isset($o['Name2'])) $this->Name2 = $o['Name2'];
if (isset($o['Name3'])) $this->Name3 = $o['Name3'];
if (isset($o['Name4'])) $this->Name4 = $o['Name4'];
if (isset($o['Anmerkung'])) $this->Anmerkung = $o['Anmerkung'];
if (isset($o['NaechsterTermin'])) $this->NaechsterTermin = JsonConverters::from('DateTime', $o['NaechsterTermin']);
if (isset($o['Anrede'])) $this->Anrede = $o['Anrede'];
if (isset($o['Titel'])) $this->Titel = $o['Titel'];
if (isset($o['NutzerKommunikationen'])) $this->NutzerKommunikationen = JsonConverters::fromArray('NutzerCommunication', $o['NutzerKommunikationen']);
if (isset($o['NutzerPersonen'])) $this->NutzerPersonen = JsonConverters::fromArray('NutzerPersonen', $o['NutzerPersonen']);
if (isset($o['NutzerCoOwnership'])) $this->NutzerCoOwnership = JsonConverters::fromArray('NutzerCoOwnership', $o['NutzerCoOwnership']);
if (isset($o['NutzerQuadratmeter'])) $this->NutzerQuadratmeter = JsonConverters::fromArray('NutzerQuadratmeter', $o['NutzerQuadratmeter']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->ArtDerNutzung)) $o['ArtDerNutzung'] = JsonConverters::to('NutzerKind', $this->ArtDerNutzung);
if (isset($this->Einzug)) $o['Einzug'] = JsonConverters::to('DateTime', $this->Einzug);
if (isset($this->Auszug)) $o['Auszug'] = JsonConverters::to('DateTime', $this->Auszug);
if (isset($this->Name1)) $o['Name1'] = $this->Name1;
if (isset($this->Name2)) $o['Name2'] = $this->Name2;
if (isset($this->Name3)) $o['Name3'] = $this->Name3;
if (isset($this->Name4)) $o['Name4'] = $this->Name4;
if (isset($this->Anmerkung)) $o['Anmerkung'] = $this->Anmerkung;
if (isset($this->NaechsterTermin)) $o['NaechsterTermin'] = JsonConverters::to('DateTime', $this->NaechsterTermin);
if (isset($this->Anrede)) $o['Anrede'] = $this->Anrede;
if (isset($this->Titel)) $o['Titel'] = $this->Titel;
if (isset($this->NutzerKommunikationen)) $o['NutzerKommunikationen'] = JsonConverters::toArray('NutzerCommunication', $this->NutzerKommunikationen);
if (isset($this->NutzerPersonen)) $o['NutzerPersonen'] = JsonConverters::toArray('NutzerPersonen', $this->NutzerPersonen);
if (isset($this->NutzerCoOwnership)) $o['NutzerCoOwnership'] = JsonConverters::toArray('NutzerCoOwnership', $this->NutzerCoOwnership);
if (isset($this->NutzerQuadratmeter)) $o['NutzerQuadratmeter'] = JsonConverters::toArray('NutzerQuadratmeter', $this->NutzerQuadratmeter);
return empty($o) ? new class(){} : $o;
}
}
class Nutzeinheit implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Guid")
/** @var string */
public string $Guid='',
// @DataMember(Name="LastModified")
/** @var DateTime|null */
public ?DateTime $LastModified=null,
// @DataMember(Name="NeNummerInt")
/** @var string|null */
public ?string $NeNummerInt=null,
// @DataMember(Name="Lage")
/** @var string|null */
public ?string $Lage=null,
// @DataMember(Name="BegeReihenfolge")
/** @var string|null */
public ?string $BegeReihenfolge=null,
// @DataMember(Name="Anmerkung")
/** @var string|null */
public ?string $Anmerkung=null,
// @DataMember(Name="AbrechnungseinheitGuid")
/** @var string */
public string $AbrechnungseinheitGuid='',
// @DataMember(Name="Adresse")
/** @var Address|null */
public ?Address $Adresse=null,
// @DataMember(Name="Geraete")
/** @var array<Device>|null */
public ?array $Geraete=null,
// @DataMember(Name="Nutzer")
/** @var array<Nutzer>|null */
public ?array $Nutzer=null,
// @DataMember(Name="Fotos")
/** @var array<Photo>|null */
public ?array $Fotos=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['LastModified'])) $this->LastModified = JsonConverters::from('DateTime', $o['LastModified']);
if (isset($o['NeNummerInt'])) $this->NeNummerInt = $o['NeNummerInt'];
if (isset($o['Lage'])) $this->Lage = $o['Lage'];
if (isset($o['BegeReihenfolge'])) $this->BegeReihenfolge = $o['BegeReihenfolge'];
if (isset($o['Anmerkung'])) $this->Anmerkung = $o['Anmerkung'];
if (isset($o['AbrechnungseinheitGuid'])) $this->AbrechnungseinheitGuid = $o['AbrechnungseinheitGuid'];
if (isset($o['Adresse'])) $this->Adresse = JsonConverters::from('Address', $o['Adresse']);
if (isset($o['Geraete'])) $this->Geraete = JsonConverters::fromArray('Device', $o['Geraete']);
if (isset($o['Nutzer'])) $this->Nutzer = JsonConverters::fromArray('Nutzer', $o['Nutzer']);
if (isset($o['Fotos'])) $this->Fotos = JsonConverters::fromArray('Photo', $o['Fotos']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->LastModified)) $o['LastModified'] = JsonConverters::to('DateTime', $this->LastModified);
if (isset($this->NeNummerInt)) $o['NeNummerInt'] = $this->NeNummerInt;
if (isset($this->Lage)) $o['Lage'] = $this->Lage;
if (isset($this->BegeReihenfolge)) $o['BegeReihenfolge'] = $this->BegeReihenfolge;
if (isset($this->Anmerkung)) $o['Anmerkung'] = $this->Anmerkung;
if (isset($this->AbrechnungseinheitGuid)) $o['AbrechnungseinheitGuid'] = $this->AbrechnungseinheitGuid;
if (isset($this->Adresse)) $o['Adresse'] = JsonConverters::to('Address', $this->Adresse);
if (isset($this->Geraete)) $o['Geraete'] = JsonConverters::toArray('Device', $this->Geraete);
if (isset($this->Nutzer)) $o['Nutzer'] = JsonConverters::toArray('Nutzer', $this->Nutzer);
if (isset($this->Fotos)) $o['Fotos'] = JsonConverters::toArray('Photo', $this->Fotos);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class UpdateNutzeinheit extends Eras2AppServiceModelBase implements JsonSerializable
{
/**
* @param string $UserId
*/
public function __construct(
string $UserId='',
// @DataMember(Name="Nutzeinheit")
/** @var Nutzeinheit|null */
public ?Nutzeinheit $Nutzeinheit=null
) {
parent::__construct($UserId);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Nutzeinheit'])) $this->Nutzeinheit = JsonConverters::from('Nutzeinheit', $o['Nutzeinheit']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Nutzeinheit)) $o['Nutzeinheit'] = JsonConverters::to('Nutzeinheit', $this->Nutzeinheit);
return empty($o) ? new class(){} : $o;
}
}
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.
PUT /App/{UserId}/Nutzeinheit HTTP/1.1
Host: immo-account-servamw.eras-online.de
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Nutzeinheit:
{
Guid: 00000000000000000000000000000000,
LastModified: 0001-01-01T00:00:00Z,
NeNummerInt: String,
Lage: String,
BegeReihenfolge: String,
Anmerkung: String,
AbrechnungseinheitGuid: 00000000000000000000000000000000,
Adresse:
{
Guid: 00000000000000000000000000000000,
Straße: String,
Straße2: String,
Hausnummer: String,
Postleitzahl: String,
Ort: String,
Postfach: String,
Adresszusatz: String,
Breitengrad: 0,
Laengengrad: 0
}
},
UserId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}