Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

UpdateLedProblemsStatus

Requires Authentication
The following routes are available for this service:
All Verbs/UpdateLedProblemsStatus
<?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};


// @Flags()
enum LedIssueReason : int
{
    case UNKOWN = 0;
    case MISPLACED = 1;
    case BROKEN = 2;
    case NOT_DEFINED = 3;
    case OVERLAPPING = 4;
    case MISSING = 5;
    case CS01_MISPLACED = 6;
    case CS01_NOT_DEFINED = 7;
}

// @Flags()
enum LedIssueStatus : int
{
    case NULL = 0;
    case IGNORED = 1;
    case TOBETREATED = 2;
}

class LedIssue implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0,
        /** @var int */
        public int $ReservedDateTime=0,
        /** @var int */
        public int $AreaID=0,
        /** @var string */
        public string $PositionKey='',
        /** @var string */
        public string $Note='',
        /** @var string */
        public string $Owner='',
        /** @var LedIssueReason|null */
        public ?LedIssueReason $Reason=null,
        /** @var LedIssueStatus|null */
        public ?LedIssueStatus $Status=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['ReservedDateTime'])) $this->ReservedDateTime = $o['ReservedDateTime'];
        if (isset($o['AreaID'])) $this->AreaID = $o['AreaID'];
        if (isset($o['PositionKey'])) $this->PositionKey = $o['PositionKey'];
        if (isset($o['Note'])) $this->Note = $o['Note'];
        if (isset($o['Owner'])) $this->Owner = $o['Owner'];
        if (isset($o['Reason'])) $this->Reason = JsonConverters::from('LedIssueReason', $o['Reason']);
        if (isset($o['Status'])) $this->Status = JsonConverters::from('LedIssueStatus', $o['Status']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->ReservedDateTime)) $o['ReservedDateTime'] = $this->ReservedDateTime;
        if (isset($this->AreaID)) $o['AreaID'] = $this->AreaID;
        if (isset($this->PositionKey)) $o['PositionKey'] = $this->PositionKey;
        if (isset($this->Note)) $o['Note'] = $this->Note;
        if (isset($this->Owner)) $o['Owner'] = $this->Owner;
        if (isset($this->Reason)) $o['Reason'] = JsonConverters::to('LedIssueReason', $this->Reason);
        if (isset($this->Status)) $o['Status'] = JsonConverters::to('LedIssueStatus', $this->Status);
        return empty($o) ? new class(){} : $o;
    }
}

class UpdateLedProblemsStatus implements JsonSerializable
{
    public function __construct(
        /** @description List of LedIssue to update */
        // @ApiMember(Description="List of LedIssue to update")
        /** @var array<LedIssue>|null */
        public ?array $LedIssue=null
    ) {
    }

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

PHP UpdateLedProblemsStatus DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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

POST /UpdateLedProblemsStatus HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"LedIssue":[{"ID":0,"ReservedDateTime":0,"AreaID":0,"PositionKey":"String","Note":"String","Owner":"String","Reason":0,"Status":0}]}