| DELETE,OPTIONS | /v1/dispatch/haul/offline/{OfflineWindowId} |
|---|
<?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 DispatchPackConfigView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PackId=null,
/** @var bool|null */
public ?bool $HasQuotas=null,
/** @var bool|null */
public ?bool $IsInverted=null,
/** @var int */
public int $LoadLimitMins=0,
/** @var string|null */
public ?string $TicketSource=null,
/** @var string|null */
public ?string $PayBasis=null,
/** @var string|null */
public ?string $DayBoundary=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PackId'])) $this->PackId = $o['PackId'];
if (isset($o['HasQuotas'])) $this->HasQuotas = $o['HasQuotas'];
if (isset($o['IsInverted'])) $this->IsInverted = $o['IsInverted'];
if (isset($o['LoadLimitMins'])) $this->LoadLimitMins = $o['LoadLimitMins'];
if (isset($o['TicketSource'])) $this->TicketSource = $o['TicketSource'];
if (isset($o['PayBasis'])) $this->PayBasis = $o['PayBasis'];
if (isset($o['DayBoundary'])) $this->DayBoundary = $o['DayBoundary'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PackId)) $o['PackId'] = $this->PackId;
if (isset($this->HasQuotas)) $o['HasQuotas'] = $this->HasQuotas;
if (isset($this->IsInverted)) $o['IsInverted'] = $this->IsInverted;
if (isset($this->LoadLimitMins)) $o['LoadLimitMins'] = $this->LoadLimitMins;
if (isset($this->TicketSource)) $o['TicketSource'] = $this->TicketSource;
if (isset($this->PayBasis)) $o['PayBasis'] = $this->PayBasis;
if (isset($this->DayBoundary)) $o['DayBoundary'] = $this->DayBoundary;
return empty($o) ? new class(){} : $o;
}
}
class DispatchHaulConfigView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $QueueMax=0,
/** @var int */
public int $DumpBays=0,
/** @var int */
public int $SlotCap=0,
/** @var bool|null */
public ?bool $Paused=null,
/** @var int */
public int $FeedRate=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['QueueMax'])) $this->QueueMax = $o['QueueMax'];
if (isset($o['DumpBays'])) $this->DumpBays = $o['DumpBays'];
if (isset($o['SlotCap'])) $this->SlotCap = $o['SlotCap'];
if (isset($o['Paused'])) $this->Paused = $o['Paused'];
if (isset($o['FeedRate'])) $this->FeedRate = $o['FeedRate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->QueueMax)) $o['QueueMax'] = $this->QueueMax;
if (isset($this->DumpBays)) $o['DumpBays'] = $this->DumpBays;
if (isset($this->SlotCap)) $o['SlotCap'] = $this->SlotCap;
if (isset($this->Paused)) $o['Paused'] = $this->Paused;
if (isset($this->FeedRate)) $o['FeedRate'] = $this->FeedRate;
return empty($o) ? new class(){} : $o;
}
}
class DispatchOfflineWindowView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $OfflineWindowId=0,
/** @var string|null */
public ?string $FromHour=null,
/** @var string|null */
public ?string $ToHour=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OfflineWindowId'])) $this->OfflineWindowId = $o['OfflineWindowId'];
if (isset($o['FromHour'])) $this->FromHour = $o['FromHour'];
if (isset($o['ToHour'])) $this->ToHour = $o['ToHour'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OfflineWindowId)) $o['OfflineWindowId'] = $this->OfflineWindowId;
if (isset($this->FromHour)) $o['FromHour'] = $this->FromHour;
if (isset($this->ToHour)) $o['ToHour'] = $this->ToHour;
return empty($o) ? new class(){} : $o;
}
}
class DispatchSiteView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $SiteId=0,
/** @var int */
public int $SupplierId=0,
/** @var string|null */
public ?string $SupplierCode=null,
/** @var string|null */
public ?string $Name=null,
/** @var int */
public int $Acres=0,
/** @var float */
public float $StandingVolume=0.0,
/** @var int */
public int $SortOrder=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SiteId'])) $this->SiteId = $o['SiteId'];
if (isset($o['SupplierId'])) $this->SupplierId = $o['SupplierId'];
if (isset($o['SupplierCode'])) $this->SupplierCode = $o['SupplierCode'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Acres'])) $this->Acres = $o['Acres'];
if (isset($o['StandingVolume'])) $this->StandingVolume = $o['StandingVolume'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SiteId)) $o['SiteId'] = $this->SiteId;
if (isset($this->SupplierId)) $o['SupplierId'] = $this->SupplierId;
if (isset($this->SupplierCode)) $o['SupplierCode'] = $this->SupplierCode;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Acres)) $o['Acres'] = $this->Acres;
if (isset($this->StandingVolume)) $o['StandingVolume'] = $this->StandingVolume;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
return empty($o) ? new class(){} : $o;
}
}
class DispatchSupplierView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $SupplierId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Region=null,
/** @var bool|null */
public ?bool $OwnHauler=null,
/** @var float */
public float $SeasonAllotment=0.0,
/** @var float */
public float $Delivered=0.0,
/** @var float */
public float $WeekCap=0.0,
/** @var float */
public float $WeekDelivered=0.0,
/** @var int */
public int $SortOrder=0,
/** @var array<DispatchSiteView>|null */
public ?array $Sites=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SupplierId'])) $this->SupplierId = $o['SupplierId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Region'])) $this->Region = $o['Region'];
if (isset($o['OwnHauler'])) $this->OwnHauler = $o['OwnHauler'];
if (isset($o['SeasonAllotment'])) $this->SeasonAllotment = $o['SeasonAllotment'];
if (isset($o['Delivered'])) $this->Delivered = $o['Delivered'];
if (isset($o['WeekCap'])) $this->WeekCap = $o['WeekCap'];
if (isset($o['WeekDelivered'])) $this->WeekDelivered = $o['WeekDelivered'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['Sites'])) $this->Sites = JsonConverters::fromArray('DispatchSiteView', $o['Sites']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SupplierId)) $o['SupplierId'] = $this->SupplierId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Region)) $o['Region'] = $this->Region;
if (isset($this->OwnHauler)) $o['OwnHauler'] = $this->OwnHauler;
if (isset($this->SeasonAllotment)) $o['SeasonAllotment'] = $this->SeasonAllotment;
if (isset($this->Delivered)) $o['Delivered'] = $this->Delivered;
if (isset($this->WeekCap)) $o['WeekCap'] = $this->WeekCap;
if (isset($this->WeekDelivered)) $o['WeekDelivered'] = $this->WeekDelivered;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->Sites)) $o['Sites'] = JsonConverters::toArray('DispatchSiteView', $this->Sites);
return empty($o) ? new class(){} : $o;
}
}
class DispatchTruckView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $TruckId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $DriverName=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $EmployerCode=null,
/** @var string|null */
public ?string $SupplierCode=null,
/** @var string|null */
public ?string $SiteName=null,
/** @var float */
public float $EstLoad=0.0,
/** @var string|null */
public ?string $Stage=null,
/** @var int */
public int $StageSince=0,
/** @var int|null */
public ?int $CycleStart=null,
/** @var int */
public int $StageMinsAgo=0,
/** @var int|null */
public ?int $CycleMinsAgo=null,
/** @var string|null */
public ?string $Slot=null,
/** @var int */
public int $LoadsToday=0,
/** @var float */
public float $NetToday=0.0,
/** @var int */
public int $LastPingMins=0,
/** @var string|null */
public ?string $CycleMins=null,
/** @var bool|null */
public ?bool $IsInteractive=null,
/** @var string|null */
public ?string $NextSupplierCode=null,
/** @var string|null */
public ?string $NextSiteName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TruckId'])) $this->TruckId = $o['TruckId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['DriverName'])) $this->DriverName = $o['DriverName'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['EmployerCode'])) $this->EmployerCode = $o['EmployerCode'];
if (isset($o['SupplierCode'])) $this->SupplierCode = $o['SupplierCode'];
if (isset($o['SiteName'])) $this->SiteName = $o['SiteName'];
if (isset($o['EstLoad'])) $this->EstLoad = $o['EstLoad'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['StageSince'])) $this->StageSince = $o['StageSince'];
if (isset($o['CycleStart'])) $this->CycleStart = $o['CycleStart'];
if (isset($o['StageMinsAgo'])) $this->StageMinsAgo = $o['StageMinsAgo'];
if (isset($o['CycleMinsAgo'])) $this->CycleMinsAgo = $o['CycleMinsAgo'];
if (isset($o['Slot'])) $this->Slot = $o['Slot'];
if (isset($o['LoadsToday'])) $this->LoadsToday = $o['LoadsToday'];
if (isset($o['NetToday'])) $this->NetToday = $o['NetToday'];
if (isset($o['LastPingMins'])) $this->LastPingMins = $o['LastPingMins'];
if (isset($o['CycleMins'])) $this->CycleMins = $o['CycleMins'];
if (isset($o['IsInteractive'])) $this->IsInteractive = $o['IsInteractive'];
if (isset($o['NextSupplierCode'])) $this->NextSupplierCode = $o['NextSupplierCode'];
if (isset($o['NextSiteName'])) $this->NextSiteName = $o['NextSiteName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TruckId)) $o['TruckId'] = $this->TruckId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->DriverName)) $o['DriverName'] = $this->DriverName;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->EmployerCode)) $o['EmployerCode'] = $this->EmployerCode;
if (isset($this->SupplierCode)) $o['SupplierCode'] = $this->SupplierCode;
if (isset($this->SiteName)) $o['SiteName'] = $this->SiteName;
if (isset($this->EstLoad)) $o['EstLoad'] = $this->EstLoad;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->StageSince)) $o['StageSince'] = $this->StageSince;
if (isset($this->CycleStart)) $o['CycleStart'] = $this->CycleStart;
if (isset($this->StageMinsAgo)) $o['StageMinsAgo'] = $this->StageMinsAgo;
if (isset($this->CycleMinsAgo)) $o['CycleMinsAgo'] = $this->CycleMinsAgo;
if (isset($this->Slot)) $o['Slot'] = $this->Slot;
if (isset($this->LoadsToday)) $o['LoadsToday'] = $this->LoadsToday;
if (isset($this->NetToday)) $o['NetToday'] = $this->NetToday;
if (isset($this->LastPingMins)) $o['LastPingMins'] = $this->LastPingMins;
if (isset($this->CycleMins)) $o['CycleMins'] = $this->CycleMins;
if (isset($this->IsInteractive)) $o['IsInteractive'] = $this->IsInteractive;
if (isset($this->NextSupplierCode)) $o['NextSupplierCode'] = $this->NextSupplierCode;
if (isset($this->NextSiteName)) $o['NextSiteName'] = $this->NextSiteName;
return empty($o) ? new class(){} : $o;
}
}
class DispatchSlotView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $SlotId=0,
/** @var string|null */
public ?string $Hour=null,
/** @var int */
public int $BaseBooked=0,
/** @var int */
public int $SortOrder=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SlotId'])) $this->SlotId = $o['SlotId'];
if (isset($o['Hour'])) $this->Hour = $o['Hour'];
if (isset($o['BaseBooked'])) $this->BaseBooked = $o['BaseBooked'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SlotId)) $o['SlotId'] = $this->SlotId;
if (isset($this->Hour)) $o['Hour'] = $this->Hour;
if (isset($this->BaseBooked)) $o['BaseBooked'] = $this->BaseBooked;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
return empty($o) ? new class(){} : $o;
}
}
class DispatchTicketView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $TicketId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $TruckCode=null,
/** @var string|null */
public ?string $SupplierCode=null,
/** @var float */
public float $NetQty=0.0,
/** @var DateTime */
public DateTime $TicketedAt=new DateTime(),
/** @var int */
public int $TicketedMin=0,
/** @var string|null */
public ?string $Source=null,
/** @var int */
public int $MinsAgo=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TicketId'])) $this->TicketId = $o['TicketId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['TruckCode'])) $this->TruckCode = $o['TruckCode'];
if (isset($o['SupplierCode'])) $this->SupplierCode = $o['SupplierCode'];
if (isset($o['NetQty'])) $this->NetQty = $o['NetQty'];
if (isset($o['TicketedAt'])) $this->TicketedAt = JsonConverters::from('DateTime', $o['TicketedAt']);
if (isset($o['TicketedMin'])) $this->TicketedMin = $o['TicketedMin'];
if (isset($o['Source'])) $this->Source = $o['Source'];
if (isset($o['MinsAgo'])) $this->MinsAgo = $o['MinsAgo'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TicketId)) $o['TicketId'] = $this->TicketId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->TruckCode)) $o['TruckCode'] = $this->TruckCode;
if (isset($this->SupplierCode)) $o['SupplierCode'] = $this->SupplierCode;
if (isset($this->NetQty)) $o['NetQty'] = $this->NetQty;
if (isset($this->TicketedAt)) $o['TicketedAt'] = JsonConverters::to('DateTime', $this->TicketedAt);
if (isset($this->TicketedMin)) $o['TicketedMin'] = $this->TicketedMin;
if (isset($this->Source)) $o['Source'] = $this->Source;
if (isset($this->MinsAgo)) $o['MinsAgo'] = $this->MinsAgo;
return empty($o) ? new class(){} : $o;
}
}
class DispatchLogView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $LogId=0,
/** @var DateTime */
public DateTime $LoggedAt=new DateTime(),
/** @var int */
public int $LoggedMin=0,
/** @var string|null */
public ?string $LogText=null,
/** @var string|null */
public ?string $Kind=null,
/** @var int */
public int $MinsAgo=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['LogId'])) $this->LogId = $o['LogId'];
if (isset($o['LoggedAt'])) $this->LoggedAt = JsonConverters::from('DateTime', $o['LoggedAt']);
if (isset($o['LoggedMin'])) $this->LoggedMin = $o['LoggedMin'];
if (isset($o['LogText'])) $this->LogText = $o['LogText'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['MinsAgo'])) $this->MinsAgo = $o['MinsAgo'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->LogId)) $o['LogId'] = $this->LogId;
if (isset($this->LoggedAt)) $o['LoggedAt'] = JsonConverters::to('DateTime', $this->LoggedAt);
if (isset($this->LoggedMin)) $o['LoggedMin'] = $this->LoggedMin;
if (isset($this->LogText)) $o['LogText'] = $this->LogText;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->MinsAgo)) $o['MinsAgo'] = $this->MinsAgo;
return empty($o) ? new class(){} : $o;
}
}
class DispatchAutopilotView implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $IsOn=null,
/** @var bool|null */
public ?bool $RuleSlot=null,
/** @var bool|null */
public ?bool $RuleRoute=null,
/** @var bool|null */
public ?bool $RuleRelease=null,
/** @var bool|null */
public ?bool $RuleTract=null,
/** @var bool|null */
public ?bool $RuleThrottle=null,
/** @var bool|null */
public ?bool $RuleOffline=null,
/** @var int */
public int $ThStaged=0,
/** @var int */
public int $ThWait=0,
/** @var int */
public int $ThBand=0,
/** @var int */
public int $ThStall=0,
/** @var int */
public int $ThFeed=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['IsOn'])) $this->IsOn = $o['IsOn'];
if (isset($o['RuleSlot'])) $this->RuleSlot = $o['RuleSlot'];
if (isset($o['RuleRoute'])) $this->RuleRoute = $o['RuleRoute'];
if (isset($o['RuleRelease'])) $this->RuleRelease = $o['RuleRelease'];
if (isset($o['RuleTract'])) $this->RuleTract = $o['RuleTract'];
if (isset($o['RuleThrottle'])) $this->RuleThrottle = $o['RuleThrottle'];
if (isset($o['RuleOffline'])) $this->RuleOffline = $o['RuleOffline'];
if (isset($o['ThStaged'])) $this->ThStaged = $o['ThStaged'];
if (isset($o['ThWait'])) $this->ThWait = $o['ThWait'];
if (isset($o['ThBand'])) $this->ThBand = $o['ThBand'];
if (isset($o['ThStall'])) $this->ThStall = $o['ThStall'];
if (isset($o['ThFeed'])) $this->ThFeed = $o['ThFeed'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->IsOn)) $o['IsOn'] = $this->IsOn;
if (isset($this->RuleSlot)) $o['RuleSlot'] = $this->RuleSlot;
if (isset($this->RuleRoute)) $o['RuleRoute'] = $this->RuleRoute;
if (isset($this->RuleRelease)) $o['RuleRelease'] = $this->RuleRelease;
if (isset($this->RuleTract)) $o['RuleTract'] = $this->RuleTract;
if (isset($this->RuleThrottle)) $o['RuleThrottle'] = $this->RuleThrottle;
if (isset($this->RuleOffline)) $o['RuleOffline'] = $this->RuleOffline;
if (isset($this->ThStaged)) $o['ThStaged'] = $this->ThStaged;
if (isset($this->ThWait)) $o['ThWait'] = $this->ThWait;
if (isset($this->ThBand)) $o['ThBand'] = $this->ThBand;
if (isset($this->ThStall)) $o['ThStall'] = $this->ThStall;
if (isset($this->ThFeed)) $o['ThFeed'] = $this->ThFeed;
return empty($o) ? new class(){} : $o;
}
}
class DispatchExceptionView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $Severity=null,
/** @var string|null */
public ?string $TruckCode=null,
/** @var string|null */
public ?string $SupplierCode=null,
/** @var DateTime */
public DateTime $RaisedAt=new DateTime(),
/** @var string|null */
public ?string $RaisedLabel=null,
/** @var int */
public int $MinsAgo=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['Severity'])) $this->Severity = $o['Severity'];
if (isset($o['TruckCode'])) $this->TruckCode = $o['TruckCode'];
if (isset($o['SupplierCode'])) $this->SupplierCode = $o['SupplierCode'];
if (isset($o['RaisedAt'])) $this->RaisedAt = JsonConverters::from('DateTime', $o['RaisedAt']);
if (isset($o['RaisedLabel'])) $this->RaisedLabel = $o['RaisedLabel'];
if (isset($o['MinsAgo'])) $this->MinsAgo = $o['MinsAgo'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->Severity)) $o['Severity'] = $this->Severity;
if (isset($this->TruckCode)) $o['TruckCode'] = $this->TruckCode;
if (isset($this->SupplierCode)) $o['SupplierCode'] = $this->SupplierCode;
if (isset($this->RaisedAt)) $o['RaisedAt'] = JsonConverters::to('DateTime', $this->RaisedAt);
if (isset($this->RaisedLabel)) $o['RaisedLabel'] = $this->RaisedLabel;
if (isset($this->MinsAgo)) $o['MinsAgo'] = $this->MinsAgo;
return empty($o) ? new class(){} : $o;
}
}
class DispatchFeedView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $FeedId=0,
/** @var DateTime */
public DateTime $EntryAt=new DateTime(),
/** @var string|null */
public ?string $EntryLabel=null,
/** @var string|null */
public ?string $Channel=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $TruckCode=null,
/** @var string|null */
public ?string $SupplierCode=null,
/** @var string|null */
public ?string $OverrideText=null,
/** @var int */
public int $MinsAgo=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FeedId'])) $this->FeedId = $o['FeedId'];
if (isset($o['EntryAt'])) $this->EntryAt = JsonConverters::from('DateTime', $o['EntryAt']);
if (isset($o['EntryLabel'])) $this->EntryLabel = $o['EntryLabel'];
if (isset($o['Channel'])) $this->Channel = $o['Channel'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['TruckCode'])) $this->TruckCode = $o['TruckCode'];
if (isset($o['SupplierCode'])) $this->SupplierCode = $o['SupplierCode'];
if (isset($o['OverrideText'])) $this->OverrideText = $o['OverrideText'];
if (isset($o['MinsAgo'])) $this->MinsAgo = $o['MinsAgo'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FeedId)) $o['FeedId'] = $this->FeedId;
if (isset($this->EntryAt)) $o['EntryAt'] = JsonConverters::to('DateTime', $this->EntryAt);
if (isset($this->EntryLabel)) $o['EntryLabel'] = $this->EntryLabel;
if (isset($this->Channel)) $o['Channel'] = $this->Channel;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->TruckCode)) $o['TruckCode'] = $this->TruckCode;
if (isset($this->SupplierCode)) $o['SupplierCode'] = $this->SupplierCode;
if (isset($this->OverrideText)) $o['OverrideText'] = $this->OverrideText;
if (isset($this->MinsAgo)) $o['MinsAgo'] = $this->MinsAgo;
return empty($o) ? new class(){} : $o;
}
}
class DispatchRigView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RigId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $DriverName=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $RigType=null,
/** @var bool|null */
public ?bool $IsFree=null,
/** @var int */
public int $MatchRank=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RigId'])) $this->RigId = $o['RigId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['DriverName'])) $this->DriverName = $o['DriverName'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['RigType'])) $this->RigType = $o['RigType'];
if (isset($o['IsFree'])) $this->IsFree = $o['IsFree'];
if (isset($o['MatchRank'])) $this->MatchRank = $o['MatchRank'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RigId)) $o['RigId'] = $this->RigId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->DriverName)) $o['DriverName'] = $this->DriverName;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->RigType)) $o['RigType'] = $this->RigType;
if (isset($this->IsFree)) $o['IsFree'] = $this->IsFree;
if (isset($this->MatchRank)) $o['MatchRank'] = $this->MatchRank;
return empty($o) ? new class(){} : $o;
}
}
class DispatchJobView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $JobId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Cargo=null,
/** @var string|null */
public ?string $Customer=null,
/** @var string|null */
public ?string $CustomerPhone=null,
/** @var string|null */
public ?string $HoldContact=null,
/** @var string|null */
public ?string $HoldPhone=null,
/** @var string|null */
public ?string $FromLoc=null,
/** @var string|null */
public ?string $ToLoc=null,
/** @var int */
public int $Miles=0,
/** @var string|null */
public ?string $WindowText=null,
/** @var string|null */
public ?string $Stage=null,
/** @var float|null */
public ?float $Rate=null,
/** @var string|null */
public ?string $RequiredRig=null,
/** @var string|null */
public ?string $DriverLabel=null,
/** @var string|null */
public ?string $EtaText=null,
/** @var string|null */
public ?string $OfferRigIds=null,
/** @var int|null */
public ?int $OfferExpiresMin=null,
/** @var bool|null */
public ?bool $OfferExpired=null,
/** @var bool|null */
public ?bool $Declined=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['JobId'])) $this->JobId = $o['JobId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Cargo'])) $this->Cargo = $o['Cargo'];
if (isset($o['Customer'])) $this->Customer = $o['Customer'];
if (isset($o['CustomerPhone'])) $this->CustomerPhone = $o['CustomerPhone'];
if (isset($o['HoldContact'])) $this->HoldContact = $o['HoldContact'];
if (isset($o['HoldPhone'])) $this->HoldPhone = $o['HoldPhone'];
if (isset($o['FromLoc'])) $this->FromLoc = $o['FromLoc'];
if (isset($o['ToLoc'])) $this->ToLoc = $o['ToLoc'];
if (isset($o['Miles'])) $this->Miles = $o['Miles'];
if (isset($o['WindowText'])) $this->WindowText = $o['WindowText'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['Rate'])) $this->Rate = $o['Rate'];
if (isset($o['RequiredRig'])) $this->RequiredRig = $o['RequiredRig'];
if (isset($o['DriverLabel'])) $this->DriverLabel = $o['DriverLabel'];
if (isset($o['EtaText'])) $this->EtaText = $o['EtaText'];
if (isset($o['OfferRigIds'])) $this->OfferRigIds = $o['OfferRigIds'];
if (isset($o['OfferExpiresMin'])) $this->OfferExpiresMin = $o['OfferExpiresMin'];
if (isset($o['OfferExpired'])) $this->OfferExpired = $o['OfferExpired'];
if (isset($o['Declined'])) $this->Declined = $o['Declined'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->JobId)) $o['JobId'] = $this->JobId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Cargo)) $o['Cargo'] = $this->Cargo;
if (isset($this->Customer)) $o['Customer'] = $this->Customer;
if (isset($this->CustomerPhone)) $o['CustomerPhone'] = $this->CustomerPhone;
if (isset($this->HoldContact)) $o['HoldContact'] = $this->HoldContact;
if (isset($this->HoldPhone)) $o['HoldPhone'] = $this->HoldPhone;
if (isset($this->FromLoc)) $o['FromLoc'] = $this->FromLoc;
if (isset($this->ToLoc)) $o['ToLoc'] = $this->ToLoc;
if (isset($this->Miles)) $o['Miles'] = $this->Miles;
if (isset($this->WindowText)) $o['WindowText'] = $this->WindowText;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->Rate)) $o['Rate'] = $this->Rate;
if (isset($this->RequiredRig)) $o['RequiredRig'] = $this->RequiredRig;
if (isset($this->DriverLabel)) $o['DriverLabel'] = $this->DriverLabel;
if (isset($this->EtaText)) $o['EtaText'] = $this->EtaText;
if (isset($this->OfferRigIds)) $o['OfferRigIds'] = $this->OfferRigIds;
if (isset($this->OfferExpiresMin)) $o['OfferExpiresMin'] = $this->OfferExpiresMin;
if (isset($this->OfferExpired)) $o['OfferExpired'] = $this->OfferExpired;
if (isset($this->Declined)) $o['Declined'] = $this->Declined;
return empty($o) ? new class(){} : $o;
}
}
class DispatchOdDriverView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $DriverId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Zone=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $Tier=null,
/** @var float */
public float $DistanceMi=0.0,
/** @var string|null */
public ?string $Capabilities=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DriverId'])) $this->DriverId = $o['DriverId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Zone'])) $this->Zone = $o['Zone'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Tier'])) $this->Tier = $o['Tier'];
if (isset($o['DistanceMi'])) $this->DistanceMi = $o['DistanceMi'];
if (isset($o['Capabilities'])) $this->Capabilities = $o['Capabilities'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DriverId)) $o['DriverId'] = $this->DriverId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Zone)) $o['Zone'] = $this->Zone;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Tier)) $o['Tier'] = $this->Tier;
if (isset($this->DistanceMi)) $o['DistanceMi'] = $this->DistanceMi;
if (isset($this->Capabilities)) $o['Capabilities'] = $this->Capabilities;
return empty($o) ? new class(){} : $o;
}
}
class DispatchOdRequestView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RequestId=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Address=null,
/** @var string|null */
public ?string $Zone=null,
/** @var int */
public int $Bags=0,
/** @var string|null */
public ?string $Stage=null,
/** @var string|null */
public ?string $DriverCode=null,
/** @var string|null */
public ?string $Needs=null,
/** @var string|null */
public ?string $Note=null,
/** @var int|null */
public ?int $PingExpiresMin=null,
/** @var string|null */
public ?string $TriedCodes=null,
/** @var string|null */
public ?string $CandidateCodes=null,
/** @var string|null */
public ?string $EtaText=null,
/** @var string|null */
public ?string $NoDriver=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RequestId'])) $this->RequestId = $o['RequestId'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Address'])) $this->Address = $o['Address'];
if (isset($o['Zone'])) $this->Zone = $o['Zone'];
if (isset($o['Bags'])) $this->Bags = $o['Bags'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['DriverCode'])) $this->DriverCode = $o['DriverCode'];
if (isset($o['Needs'])) $this->Needs = $o['Needs'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['PingExpiresMin'])) $this->PingExpiresMin = $o['PingExpiresMin'];
if (isset($o['TriedCodes'])) $this->TriedCodes = $o['TriedCodes'];
if (isset($o['CandidateCodes'])) $this->CandidateCodes = $o['CandidateCodes'];
if (isset($o['EtaText'])) $this->EtaText = $o['EtaText'];
if (isset($o['NoDriver'])) $this->NoDriver = $o['NoDriver'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RequestId)) $o['RequestId'] = $this->RequestId;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Address)) $o['Address'] = $this->Address;
if (isset($this->Zone)) $o['Zone'] = $this->Zone;
if (isset($this->Bags)) $o['Bags'] = $this->Bags;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->DriverCode)) $o['DriverCode'] = $this->DriverCode;
if (isset($this->Needs)) $o['Needs'] = $this->Needs;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->PingExpiresMin)) $o['PingExpiresMin'] = $this->PingExpiresMin;
if (isset($this->TriedCodes)) $o['TriedCodes'] = $this->TriedCodes;
if (isset($this->CandidateCodes)) $o['CandidateCodes'] = $this->CandidateCodes;
if (isset($this->EtaText)) $o['EtaText'] = $this->EtaText;
if (isset($this->NoDriver)) $o['NoDriver'] = $this->NoDriver;
return empty($o) ? new class(){} : $o;
}
}
class DispatchPackView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PackId=null,
/** @var bool|null */
public ?bool $HasQuotas=null,
/** @var bool|null */
public ?bool $IsInverted=null,
/** @var int */
public int $LoadLimitMins=0,
/** @var string|null */
public ?string $DayBoundary=null,
/** @var string|null */
public ?string $TicketSource=null,
/** @var string|null */
public ?string $PayBasis=null,
/** @var int */
public int $SortOrder=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PackId'])) $this->PackId = $o['PackId'];
if (isset($o['HasQuotas'])) $this->HasQuotas = $o['HasQuotas'];
if (isset($o['IsInverted'])) $this->IsInverted = $o['IsInverted'];
if (isset($o['LoadLimitMins'])) $this->LoadLimitMins = $o['LoadLimitMins'];
if (isset($o['DayBoundary'])) $this->DayBoundary = $o['DayBoundary'];
if (isset($o['TicketSource'])) $this->TicketSource = $o['TicketSource'];
if (isset($o['PayBasis'])) $this->PayBasis = $o['PayBasis'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PackId)) $o['PackId'] = $this->PackId;
if (isset($this->HasQuotas)) $o['HasQuotas'] = $this->HasQuotas;
if (isset($this->IsInverted)) $o['IsInverted'] = $this->IsInverted;
if (isset($this->LoadLimitMins)) $o['LoadLimitMins'] = $this->LoadLimitMins;
if (isset($this->DayBoundary)) $o['DayBoundary'] = $this->DayBoundary;
if (isset($this->TicketSource)) $o['TicketSource'] = $this->TicketSource;
if (isset($this->PayBasis)) $o['PayBasis'] = $this->PayBasis;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
return empty($o) ? new class(){} : $o;
}
}
class DispatchPackTermView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PackId=null,
/** @var string|null */
public ?string $Lang=null,
/** @var string|null */
public ?string $ModeName=null,
/** @var string|null */
public ?string $Facility=null,
/** @var string|null */
public ?string $FacilityShort=null,
/** @var string|null */
public ?string $SourceSite=null,
/** @var string|null */
public ?string $Supplier=null,
/** @var string|null */
public ?string $SupplierPlural=null,
/** @var string|null */
public ?string $UnloadVerb=null,
/** @var string|null */
public ?string $TicketNoun=null,
/** @var string|null */
public ?string $DayNoun=null,
/** @var string|null */
public ?string $FleetLabel=null,
/** @var string|null */
public ?string $PageSubtitle=null,
/** @var string|null */
public ?string $SeasonChip=null,
/** @var string|null */
public ?string $CampaignNoun=null,
/** @var string|null */
public ?string $BayNoun=null,
/** @var string|null */
public ?string $AssignTarget=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PackId'])) $this->PackId = $o['PackId'];
if (isset($o['Lang'])) $this->Lang = $o['Lang'];
if (isset($o['ModeName'])) $this->ModeName = $o['ModeName'];
if (isset($o['Facility'])) $this->Facility = $o['Facility'];
if (isset($o['FacilityShort'])) $this->FacilityShort = $o['FacilityShort'];
if (isset($o['SourceSite'])) $this->SourceSite = $o['SourceSite'];
if (isset($o['Supplier'])) $this->Supplier = $o['Supplier'];
if (isset($o['SupplierPlural'])) $this->SupplierPlural = $o['SupplierPlural'];
if (isset($o['UnloadVerb'])) $this->UnloadVerb = $o['UnloadVerb'];
if (isset($o['TicketNoun'])) $this->TicketNoun = $o['TicketNoun'];
if (isset($o['DayNoun'])) $this->DayNoun = $o['DayNoun'];
if (isset($o['FleetLabel'])) $this->FleetLabel = $o['FleetLabel'];
if (isset($o['PageSubtitle'])) $this->PageSubtitle = $o['PageSubtitle'];
if (isset($o['SeasonChip'])) $this->SeasonChip = $o['SeasonChip'];
if (isset($o['CampaignNoun'])) $this->CampaignNoun = $o['CampaignNoun'];
if (isset($o['BayNoun'])) $this->BayNoun = $o['BayNoun'];
if (isset($o['AssignTarget'])) $this->AssignTarget = $o['AssignTarget'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PackId)) $o['PackId'] = $this->PackId;
if (isset($this->Lang)) $o['Lang'] = $this->Lang;
if (isset($this->ModeName)) $o['ModeName'] = $this->ModeName;
if (isset($this->Facility)) $o['Facility'] = $this->Facility;
if (isset($this->FacilityShort)) $o['FacilityShort'] = $this->FacilityShort;
if (isset($this->SourceSite)) $o['SourceSite'] = $this->SourceSite;
if (isset($this->Supplier)) $o['Supplier'] = $this->Supplier;
if (isset($this->SupplierPlural)) $o['SupplierPlural'] = $this->SupplierPlural;
if (isset($this->UnloadVerb)) $o['UnloadVerb'] = $this->UnloadVerb;
if (isset($this->TicketNoun)) $o['TicketNoun'] = $this->TicketNoun;
if (isset($this->DayNoun)) $o['DayNoun'] = $this->DayNoun;
if (isset($this->FleetLabel)) $o['FleetLabel'] = $this->FleetLabel;
if (isset($this->PageSubtitle)) $o['PageSubtitle'] = $this->PageSubtitle;
if (isset($this->SeasonChip)) $o['SeasonChip'] = $this->SeasonChip;
if (isset($this->CampaignNoun)) $o['CampaignNoun'] = $this->CampaignNoun;
if (isset($this->BayNoun)) $o['BayNoun'] = $this->BayNoun;
if (isset($this->AssignTarget)) $o['AssignTarget'] = $this->AssignTarget;
return empty($o) ? new class(){} : $o;
}
}
class DispatchPackUnitView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PackId=null,
/** @var string|null */
public ?string $Unit=null,
/** @var float */
public float $LoadQty=0.0,
/** @var int */
public int $VolumeLow=0,
/** @var int */
public int $VolumeHigh=0,
/** @var float */
public float $SeasonMultiple=0.0,
/** @var float */
public float $WeeklyFraction=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PackId'])) $this->PackId = $o['PackId'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['LoadQty'])) $this->LoadQty = $o['LoadQty'];
if (isset($o['VolumeLow'])) $this->VolumeLow = $o['VolumeLow'];
if (isset($o['VolumeHigh'])) $this->VolumeHigh = $o['VolumeHigh'];
if (isset($o['SeasonMultiple'])) $this->SeasonMultiple = $o['SeasonMultiple'];
if (isset($o['WeeklyFraction'])) $this->WeeklyFraction = $o['WeeklyFraction'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PackId)) $o['PackId'] = $this->PackId;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->LoadQty)) $o['LoadQty'] = $this->LoadQty;
if (isset($this->VolumeLow)) $o['VolumeLow'] = $this->VolumeLow;
if (isset($this->VolumeHigh)) $o['VolumeHigh'] = $this->VolumeHigh;
if (isset($this->SeasonMultiple)) $o['SeasonMultiple'] = $this->SeasonMultiple;
if (isset($this->WeeklyFraction)) $o['WeeklyFraction'] = $this->WeeklyFraction;
return empty($o) ? new class(){} : $o;
}
}
class DispatchBoardView implements JsonSerializable
{
public function __construct(
/** @var DispatchPackConfigView|null */
public ?DispatchPackConfigView $Pack=null,
/** @var DispatchHaulConfigView|null */
public ?DispatchHaulConfigView $Config=null,
/** @var array<DispatchOfflineWindowView>|null */
public ?array $OfflineWindows=null,
/** @var array<DispatchSupplierView>|null */
public ?array $Suppliers=null,
/** @var array<DispatchTruckView>|null */
public ?array $Trucks=null,
/** @var array<DispatchSlotView>|null */
public ?array $Slots=null,
/** @var array<DispatchTicketView>|null */
public ?array $Tickets=null,
/** @var array<DispatchLogView>|null */
public ?array $Log=null,
/** @var DispatchAutopilotView|null */
public ?DispatchAutopilotView $Autopilot=null,
/** @var array<DispatchExceptionView>|null */
public ?array $Exceptions=null,
/** @var array<DispatchFeedView>|null */
public ?array $Feed=null,
/** @var array<DispatchRigView>|null */
public ?array $Rigs=null,
/** @var array<DispatchJobView>|null */
public ?array $Jobs=null,
/** @var array<DispatchOdDriverView>|null */
public ?array $OdDrivers=null,
/** @var array<DispatchOdRequestView>|null */
public ?array $OdRequests=null,
/** @var array<DispatchPackView>|null */
public ?array $Packs=null,
/** @var array<DispatchPackTermView>|null */
public ?array $PackTerms=null,
/** @var array<DispatchPackUnitView>|null */
public ?array $PackUnits=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Pack'])) $this->Pack = JsonConverters::from('DispatchPackConfigView', $o['Pack']);
if (isset($o['Config'])) $this->Config = JsonConverters::from('DispatchHaulConfigView', $o['Config']);
if (isset($o['OfflineWindows'])) $this->OfflineWindows = JsonConverters::fromArray('DispatchOfflineWindowView', $o['OfflineWindows']);
if (isset($o['Suppliers'])) $this->Suppliers = JsonConverters::fromArray('DispatchSupplierView', $o['Suppliers']);
if (isset($o['Trucks'])) $this->Trucks = JsonConverters::fromArray('DispatchTruckView', $o['Trucks']);
if (isset($o['Slots'])) $this->Slots = JsonConverters::fromArray('DispatchSlotView', $o['Slots']);
if (isset($o['Tickets'])) $this->Tickets = JsonConverters::fromArray('DispatchTicketView', $o['Tickets']);
if (isset($o['Log'])) $this->Log = JsonConverters::fromArray('DispatchLogView', $o['Log']);
if (isset($o['Autopilot'])) $this->Autopilot = JsonConverters::from('DispatchAutopilotView', $o['Autopilot']);
if (isset($o['Exceptions'])) $this->Exceptions = JsonConverters::fromArray('DispatchExceptionView', $o['Exceptions']);
if (isset($o['Feed'])) $this->Feed = JsonConverters::fromArray('DispatchFeedView', $o['Feed']);
if (isset($o['Rigs'])) $this->Rigs = JsonConverters::fromArray('DispatchRigView', $o['Rigs']);
if (isset($o['Jobs'])) $this->Jobs = JsonConverters::fromArray('DispatchJobView', $o['Jobs']);
if (isset($o['OdDrivers'])) $this->OdDrivers = JsonConverters::fromArray('DispatchOdDriverView', $o['OdDrivers']);
if (isset($o['OdRequests'])) $this->OdRequests = JsonConverters::fromArray('DispatchOdRequestView', $o['OdRequests']);
if (isset($o['Packs'])) $this->Packs = JsonConverters::fromArray('DispatchPackView', $o['Packs']);
if (isset($o['PackTerms'])) $this->PackTerms = JsonConverters::fromArray('DispatchPackTermView', $o['PackTerms']);
if (isset($o['PackUnits'])) $this->PackUnits = JsonConverters::fromArray('DispatchPackUnitView', $o['PackUnits']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Pack)) $o['Pack'] = JsonConverters::to('DispatchPackConfigView', $this->Pack);
if (isset($this->Config)) $o['Config'] = JsonConverters::to('DispatchHaulConfigView', $this->Config);
if (isset($this->OfflineWindows)) $o['OfflineWindows'] = JsonConverters::toArray('DispatchOfflineWindowView', $this->OfflineWindows);
if (isset($this->Suppliers)) $o['Suppliers'] = JsonConverters::toArray('DispatchSupplierView', $this->Suppliers);
if (isset($this->Trucks)) $o['Trucks'] = JsonConverters::toArray('DispatchTruckView', $this->Trucks);
if (isset($this->Slots)) $o['Slots'] = JsonConverters::toArray('DispatchSlotView', $this->Slots);
if (isset($this->Tickets)) $o['Tickets'] = JsonConverters::toArray('DispatchTicketView', $this->Tickets);
if (isset($this->Log)) $o['Log'] = JsonConverters::toArray('DispatchLogView', $this->Log);
if (isset($this->Autopilot)) $o['Autopilot'] = JsonConverters::to('DispatchAutopilotView', $this->Autopilot);
if (isset($this->Exceptions)) $o['Exceptions'] = JsonConverters::toArray('DispatchExceptionView', $this->Exceptions);
if (isset($this->Feed)) $o['Feed'] = JsonConverters::toArray('DispatchFeedView', $this->Feed);
if (isset($this->Rigs)) $o['Rigs'] = JsonConverters::toArray('DispatchRigView', $this->Rigs);
if (isset($this->Jobs)) $o['Jobs'] = JsonConverters::toArray('DispatchJobView', $this->Jobs);
if (isset($this->OdDrivers)) $o['OdDrivers'] = JsonConverters::toArray('DispatchOdDriverView', $this->OdDrivers);
if (isset($this->OdRequests)) $o['OdRequests'] = JsonConverters::toArray('DispatchOdRequestView', $this->OdRequests);
if (isset($this->Packs)) $o['Packs'] = JsonConverters::toArray('DispatchPackView', $this->Packs);
if (isset($this->PackTerms)) $o['PackTerms'] = JsonConverters::toArray('DispatchPackTermView', $this->PackTerms);
if (isset($this->PackUnits)) $o['PackUnits'] = JsonConverters::toArray('DispatchPackUnitView', $this->PackUnits);
return empty($o) ? new class(){} : $o;
}
}
class DispatchActionResponse implements JsonSerializable
{
public function __construct(
/** @var DispatchBoardView|null */
public ?DispatchBoardView $Board=null,
/** @var string|null */
public ?string $Message=null,
/** @var int */
public int $Sent=0,
/** @var int */
public int $Failed=0,
/** @var string|null */
public ?string $TicketCode=null,
/** @var float */
public float $TicketNet=0.0,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Board'])) $this->Board = JsonConverters::from('DispatchBoardView', $o['Board']);
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['Sent'])) $this->Sent = $o['Sent'];
if (isset($o['Failed'])) $this->Failed = $o['Failed'];
if (isset($o['TicketCode'])) $this->TicketCode = $o['TicketCode'];
if (isset($o['TicketNet'])) $this->TicketNet = $o['TicketNet'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Board)) $o['Board'] = JsonConverters::to('DispatchBoardView', $this->Board);
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->Sent)) $o['Sent'] = $this->Sent;
if (isset($this->Failed)) $o['Failed'] = $this->Failed;
if (isset($this->TicketCode)) $o['TicketCode'] = $this->TicketCode;
if (isset($this->TicketNet)) $o['TicketNet'] = $this->TicketNet;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class DispatchOfflineRemoveRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $OfflineWindowId=0,
/** @var string|null */
public ?string $Label=null,
/** @var int */
public int $AtMin=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OfflineWindowId'])) $this->OfflineWindowId = $o['OfflineWindowId'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['AtMin'])) $this->AtMin = $o['AtMin'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OfflineWindowId)) $o['OfflineWindowId'] = $this->OfflineWindowId;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->AtMin)) $o['AtMin'] = $this->AtMin;
return empty($o) ? new class(){} : $o;
}
}
PHP DispatchOfflineRemoveRequest 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.
DELETE /v1/dispatch/haul/offline/{OfflineWindowId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchActionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Board>
<Autopilot>
<IsOn>false</IsOn>
<RuleOffline>false</RuleOffline>
<RuleRelease>false</RuleRelease>
<RuleRoute>false</RuleRoute>
<RuleSlot>false</RuleSlot>
<RuleThrottle>false</RuleThrottle>
<RuleTract>false</RuleTract>
<ThBand>0</ThBand>
<ThFeed>0</ThFeed>
<ThStaged>0</ThStaged>
<ThStall>0</ThStall>
<ThWait>0</ThWait>
</Autopilot>
<Config>
<DumpBays>0</DumpBays>
<FeedRate>0</FeedRate>
<Paused>false</Paused>
<QueueMax>0</QueueMax>
<SlotCap>0</SlotCap>
</Config>
<Exceptions>
<DispatchExceptionView>
<Code>String</Code>
<Kind>String</Kind>
<MinsAgo>0</MinsAgo>
<RaisedAt>0001-01-01T00:00:00</RaisedAt>
<RaisedLabel>String</RaisedLabel>
<Severity>String</Severity>
<SupplierCode>String</SupplierCode>
<TruckCode>String</TruckCode>
</DispatchExceptionView>
</Exceptions>
<Feed>
<DispatchFeedView>
<Channel>String</Channel>
<EntryAt>0001-01-01T00:00:00</EntryAt>
<EntryLabel>String</EntryLabel>
<FeedId>0</FeedId>
<Kind>String</Kind>
<MinsAgo>0</MinsAgo>
<OverrideText>String</OverrideText>
<SupplierCode>String</SupplierCode>
<TruckCode>String</TruckCode>
</DispatchFeedView>
</Feed>
<Jobs>
<DispatchJobView>
<Cargo>String</Cargo>
<Code>String</Code>
<Customer>String</Customer>
<CustomerPhone>String</CustomerPhone>
<Declined>false</Declined>
<DriverLabel>String</DriverLabel>
<EtaText>String</EtaText>
<FromLoc>String</FromLoc>
<HoldContact>String</HoldContact>
<HoldPhone>String</HoldPhone>
<JobId>0</JobId>
<Miles>0</Miles>
<OfferExpired>false</OfferExpired>
<OfferExpiresMin>0</OfferExpiresMin>
<OfferRigIds>String</OfferRigIds>
<Rate>0</Rate>
<RequiredRig>String</RequiredRig>
<Stage>String</Stage>
<ToLoc>String</ToLoc>
<WindowText>String</WindowText>
</DispatchJobView>
</Jobs>
<Log>
<DispatchLogView>
<Kind>String</Kind>
<LogId>0</LogId>
<LogText>String</LogText>
<LoggedAt>0001-01-01T00:00:00</LoggedAt>
<LoggedMin>0</LoggedMin>
<MinsAgo>0</MinsAgo>
</DispatchLogView>
</Log>
<OdDrivers>
<DispatchOdDriverView>
<Capabilities>String</Capabilities>
<Code>String</Code>
<DistanceMi>0</DistanceMi>
<DriverId>0</DriverId>
<Name>String</Name>
<Phone>String</Phone>
<Status>String</Status>
<Tier>String</Tier>
<Zone>String</Zone>
</DispatchOdDriverView>
</OdDrivers>
<OdRequests>
<DispatchOdRequestView>
<Address>String</Address>
<Bags>0</Bags>
<CandidateCodes>String</CandidateCodes>
<Code>String</Code>
<DriverCode>String</DriverCode>
<EtaText>String</EtaText>
<Needs>String</Needs>
<NoDriver>String</NoDriver>
<Note>String</Note>
<PingExpiresMin>0</PingExpiresMin>
<RequestId>0</RequestId>
<Stage>String</Stage>
<TriedCodes>String</TriedCodes>
<Zone>String</Zone>
</DispatchOdRequestView>
</OdRequests>
<OfflineWindows>
<DispatchOfflineWindowView>
<FromHour>String</FromHour>
<OfflineWindowId>0</OfflineWindowId>
<ToHour>String</ToHour>
</DispatchOfflineWindowView>
</OfflineWindows>
<Pack>
<DayBoundary>String</DayBoundary>
<HasQuotas>false</HasQuotas>
<IsInverted>false</IsInverted>
<LoadLimitMins>0</LoadLimitMins>
<PackId>String</PackId>
<PayBasis>String</PayBasis>
<TicketSource>String</TicketSource>
</Pack>
<PackTerms>
<DispatchPackTermView>
<AssignTarget>String</AssignTarget>
<BayNoun>String</BayNoun>
<CampaignNoun>String</CampaignNoun>
<DayNoun>String</DayNoun>
<Facility>String</Facility>
<FacilityShort>String</FacilityShort>
<FleetLabel>String</FleetLabel>
<Lang>String</Lang>
<ModeName>String</ModeName>
<PackId>String</PackId>
<PageSubtitle>String</PageSubtitle>
<SeasonChip>String</SeasonChip>
<SourceSite>String</SourceSite>
<Supplier>String</Supplier>
<SupplierPlural>String</SupplierPlural>
<TicketNoun>String</TicketNoun>
<UnloadVerb>String</UnloadVerb>
</DispatchPackTermView>
</PackTerms>
<PackUnits>
<DispatchPackUnitView>
<LoadQty>0</LoadQty>
<PackId>String</PackId>
<SeasonMultiple>0</SeasonMultiple>
<Unit>String</Unit>
<VolumeHigh>0</VolumeHigh>
<VolumeLow>0</VolumeLow>
<WeeklyFraction>0</WeeklyFraction>
</DispatchPackUnitView>
</PackUnits>
<Packs>
<DispatchPackView>
<DayBoundary>String</DayBoundary>
<HasQuotas>false</HasQuotas>
<IsInverted>false</IsInverted>
<LoadLimitMins>0</LoadLimitMins>
<PackId>String</PackId>
<PayBasis>String</PayBasis>
<SortOrder>0</SortOrder>
<TicketSource>String</TicketSource>
</DispatchPackView>
</Packs>
<Rigs>
<DispatchRigView>
<Code>String</Code>
<DriverName>String</DriverName>
<IsFree>false</IsFree>
<MatchRank>0</MatchRank>
<Name>String</Name>
<Phone>String</Phone>
<RigId>0</RigId>
<RigType>String</RigType>
</DispatchRigView>
</Rigs>
<Slots>
<DispatchSlotView>
<BaseBooked>0</BaseBooked>
<Hour>String</Hour>
<SlotId>0</SlotId>
<SortOrder>0</SortOrder>
</DispatchSlotView>
</Slots>
<Suppliers>
<DispatchSupplierView>
<Code>String</Code>
<Delivered>0</Delivered>
<Name>String</Name>
<OwnHauler>false</OwnHauler>
<Region>String</Region>
<SeasonAllotment>0</SeasonAllotment>
<Sites>
<DispatchSiteView>
<Acres>0</Acres>
<Name>String</Name>
<SiteId>0</SiteId>
<SortOrder>0</SortOrder>
<StandingVolume>0</StandingVolume>
<SupplierCode>String</SupplierCode>
<SupplierId>0</SupplierId>
</DispatchSiteView>
</Sites>
<SortOrder>0</SortOrder>
<SupplierId>0</SupplierId>
<WeekCap>0</WeekCap>
<WeekDelivered>0</WeekDelivered>
</DispatchSupplierView>
</Suppliers>
<Tickets>
<DispatchTicketView>
<Code>String</Code>
<MinsAgo>0</MinsAgo>
<NetQty>0</NetQty>
<Source>String</Source>
<SupplierCode>String</SupplierCode>
<TicketId>0</TicketId>
<TicketedAt>0001-01-01T00:00:00</TicketedAt>
<TicketedMin>0</TicketedMin>
<TruckCode>String</TruckCode>
</DispatchTicketView>
</Tickets>
<Trucks>
<DispatchTruckView>
<Code>String</Code>
<CycleMins>String</CycleMins>
<CycleMinsAgo>0</CycleMinsAgo>
<CycleStart>0</CycleStart>
<DriverName>String</DriverName>
<EmployerCode>String</EmployerCode>
<EstLoad>0</EstLoad>
<IsInteractive>false</IsInteractive>
<LastPingMins>0</LastPingMins>
<LoadsToday>0</LoadsToday>
<NetToday>0</NetToday>
<NextSiteName>String</NextSiteName>
<NextSupplierCode>String</NextSupplierCode>
<Phone>String</Phone>
<SiteName>String</SiteName>
<Slot>String</Slot>
<Stage>String</Stage>
<StageMinsAgo>0</StageMinsAgo>
<StageSince>0</StageSince>
<SupplierCode>String</SupplierCode>
<TruckId>0</TruckId>
</DispatchTruckView>
</Trucks>
</Board>
<Failed>0</Failed>
<Message>String</Message>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Sent>0</Sent>
<TicketCode>String</TicketCode>
<TicketNet>0</TicketNet>
</DispatchActionResponse>