WebService

<back to all web services

GetKiSchemaBeispieleRequest

<?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};


class KiDiffBeispiel implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AnalyseID=0,
        /** @var string|null */
        public ?string $UrspruenglicheFehlerMeldung=null,
        /** @var string|null */
        public ?string $UrspruenglicheWarnungen=null,
        /** @var string|null */
        public ?string $KIAnalyse=null,
        /** @var int */
        public int $Rating=0,
        /** @var string|null */
        public ?string $FeedbackKommentar=null,
        /** @var string|null */
        public ?string $KategorieName=null,
        /** @var int */
        public int $DiffID=0,
        /** @var string|null */
        public ?string $GeaenderteFelder=null,
        /** @var string|null */
        public ?string $Aenderungstyp=null,
        /** @var string|null */
        public ?string $VorSnapshotJSON=null,
        /** @var string|null */
        public ?string $NachSnapshotJSON=null,
        /** @var int */
        public int $Haeufigkeit=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AnalyseID'])) $this->AnalyseID = $o['AnalyseID'];
        if (isset($o['UrspruenglicheFehlerMeldung'])) $this->UrspruenglicheFehlerMeldung = $o['UrspruenglicheFehlerMeldung'];
        if (isset($o['UrspruenglicheWarnungen'])) $this->UrspruenglicheWarnungen = $o['UrspruenglicheWarnungen'];
        if (isset($o['KIAnalyse'])) $this->KIAnalyse = $o['KIAnalyse'];
        if (isset($o['Rating'])) $this->Rating = $o['Rating'];
        if (isset($o['FeedbackKommentar'])) $this->FeedbackKommentar = $o['FeedbackKommentar'];
        if (isset($o['KategorieName'])) $this->KategorieName = $o['KategorieName'];
        if (isset($o['DiffID'])) $this->DiffID = $o['DiffID'];
        if (isset($o['GeaenderteFelder'])) $this->GeaenderteFelder = $o['GeaenderteFelder'];
        if (isset($o['Aenderungstyp'])) $this->Aenderungstyp = $o['Aenderungstyp'];
        if (isset($o['VorSnapshotJSON'])) $this->VorSnapshotJSON = $o['VorSnapshotJSON'];
        if (isset($o['NachSnapshotJSON'])) $this->NachSnapshotJSON = $o['NachSnapshotJSON'];
        if (isset($o['Haeufigkeit'])) $this->Haeufigkeit = $o['Haeufigkeit'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AnalyseID)) $o['AnalyseID'] = $this->AnalyseID;
        if (isset($this->UrspruenglicheFehlerMeldung)) $o['UrspruenglicheFehlerMeldung'] = $this->UrspruenglicheFehlerMeldung;
        if (isset($this->UrspruenglicheWarnungen)) $o['UrspruenglicheWarnungen'] = $this->UrspruenglicheWarnungen;
        if (isset($this->KIAnalyse)) $o['KIAnalyse'] = $this->KIAnalyse;
        if (isset($this->Rating)) $o['Rating'] = $this->Rating;
        if (isset($this->FeedbackKommentar)) $o['FeedbackKommentar'] = $this->FeedbackKommentar;
        if (isset($this->KategorieName)) $o['KategorieName'] = $this->KategorieName;
        if (isset($this->DiffID)) $o['DiffID'] = $this->DiffID;
        if (isset($this->GeaenderteFelder)) $o['GeaenderteFelder'] = $this->GeaenderteFelder;
        if (isset($this->Aenderungstyp)) $o['Aenderungstyp'] = $this->Aenderungstyp;
        if (isset($this->VorSnapshotJSON)) $o['VorSnapshotJSON'] = $this->VorSnapshotJSON;
        if (isset($this->NachSnapshotJSON)) $o['NachSnapshotJSON'] = $this->NachSnapshotJSON;
        if (isset($this->Haeufigkeit)) $o['Haeufigkeit'] = $this->Haeufigkeit;
        return empty($o) ? new class(){} : $o;
    }
}

class GetKiSchemaBeispieleResponse implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Status=null,
        /** @var array<KiDiffBeispiel>|null */
        public ?array $Beispiele=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Beispiele'])) $this->Beispiele = JsonConverters::fromArray('KiDiffBeispiel', $o['Beispiele']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Beispiele)) $o['Beispiele'] = JsonConverters::toArray('KiDiffBeispiel', $this->Beispiele);
        return empty($o) ? new class(){} : $o;
    }
}

class GetKiSchemaBeispieleRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Lizenz=null,
        /** @var string|null */
        public ?string $FehlerklasseId=null,
        /** @var int */
        public int $MaxAnzahl=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Lizenz'])) $this->Lizenz = $o['Lizenz'];
        if (isset($o['FehlerklasseId'])) $this->FehlerklasseId = $o['FehlerklasseId'];
        if (isset($o['MaxAnzahl'])) $this->MaxAnzahl = $o['MaxAnzahl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Lizenz)) $o['Lizenz'] = $this->Lizenz;
        if (isset($this->FehlerklasseId)) $o['FehlerklasseId'] = $this->FehlerklasseId;
        if (isset($this->MaxAnzahl)) $o['MaxAnzahl'] = $this->MaxAnzahl;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetKiSchemaBeispieleRequest 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/GetKiSchemaBeispieleRequest HTTP/1.1 
Host: 52.142.207.43 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Lizenz":"String","FehlerklasseId":"String","MaxAnzahl":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Status":false,"Beispiele":[{"AnalyseID":0,"UrspruenglicheFehlerMeldung":"String","UrspruenglicheWarnungen":"String","KIAnalyse":"String","Rating":0,"FeedbackKommentar":"String","KategorieName":"String","DiffID":0,"GeaenderteFelder":"String","Aenderungstyp":"String","VorSnapshotJSON":"String","NachSnapshotJSON":"String","Haeufigkeit":0}]}