| GET | /ref_tournees_chauffeurs/{date_tournee} |
|---|
<?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 _ref_tournee_chauffeur implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id_tournee=null,
/** @var string|null */
public ?string $id_chauffeur=null,
/** @var string|null */
public ?string $libelle_tournee=null,
/** @var string|null */
public ?string $libelle_chauffeur=null,
/** @var int */
public int $statut_cl=0,
/** @var string|null */
public ?string $id_cl=null,
/** @var int */
public int $statut_cr=0,
/** @var string|null */
public ?string $id_cr=null,
/** @var int */
public int $statut_cd=0,
/** @var string|null */
public ?string $id_cd=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id_tournee'])) $this->id_tournee = $o['id_tournee'];
if (isset($o['id_chauffeur'])) $this->id_chauffeur = $o['id_chauffeur'];
if (isset($o['libelle_tournee'])) $this->libelle_tournee = $o['libelle_tournee'];
if (isset($o['libelle_chauffeur'])) $this->libelle_chauffeur = $o['libelle_chauffeur'];
if (isset($o['statut_cl'])) $this->statut_cl = $o['statut_cl'];
if (isset($o['id_cl'])) $this->id_cl = $o['id_cl'];
if (isset($o['statut_cr'])) $this->statut_cr = $o['statut_cr'];
if (isset($o['id_cr'])) $this->id_cr = $o['id_cr'];
if (isset($o['statut_cd'])) $this->statut_cd = $o['statut_cd'];
if (isset($o['id_cd'])) $this->id_cd = $o['id_cd'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id_tournee)) $o['id_tournee'] = $this->id_tournee;
if (isset($this->id_chauffeur)) $o['id_chauffeur'] = $this->id_chauffeur;
if (isset($this->libelle_tournee)) $o['libelle_tournee'] = $this->libelle_tournee;
if (isset($this->libelle_chauffeur)) $o['libelle_chauffeur'] = $this->libelle_chauffeur;
if (isset($this->statut_cl)) $o['statut_cl'] = $this->statut_cl;
if (isset($this->id_cl)) $o['id_cl'] = $this->id_cl;
if (isset($this->statut_cr)) $o['statut_cr'] = $this->statut_cr;
if (isset($this->id_cr)) $o['id_cr'] = $this->id_cr;
if (isset($this->statut_cd)) $o['statut_cd'] = $this->statut_cd;
if (isset($this->id_cd)) $o['id_cd'] = $this->id_cd;
return empty($o) ? new class(){} : $o;
}
}
class ref_tournees_chauffeursResponse implements JsonSerializable
{
public function __construct(
/** @var array<_ref_tournee_chauffeur>|null */
public ?array $ref_tournees_chauffeurs=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ref_tournees_chauffeurs'])) $this->ref_tournees_chauffeurs = JsonConverters::fromArray('_ref_tournee_chauffeur', $o['ref_tournees_chauffeurs']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ref_tournees_chauffeurs)) $o['ref_tournees_chauffeurs'] = JsonConverters::toArray('_ref_tournee_chauffeur', $this->ref_tournees_chauffeurs);
return empty($o) ? new class(){} : $o;
}
}
class ref_tournees_chauffeursRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $date_tournee=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['date_tournee'])) $this->date_tournee = $o['date_tournee'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->date_tournee)) $o['date_tournee'] = $this->date_tournee;
return empty($o) ? new class(){} : $o;
}
}
PHP ref_tournees_chauffeursRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /ref_tournees_chauffeurs/{date_tournee} HTTP/1.1
Host: freemotion-staging.milliet.paris
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ref_tournees_chauffeurs":[{"id_tournee":"String","id_chauffeur":"String","libelle_tournee":"String","libelle_chauffeur":"String","statut_cl":0,"id_cl":"String","statut_cr":0,"id_cr":"String","statut_cd":0,"id_cd":"String"}]}