| POST | /v1/webix/gantt/tasks | ||
|---|---|---|---|
| DELETE,PUT,OPTIONS | /v1/webix/gantt/tasks/{id} |
<?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 WebixGanttTask implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id=null,
/** @var string|null */
public ?string $type=null,
/** @var string|null */
public ?string $start_date=null,
/** @var string|null */
public ?string $planned_start=null,
/** @var string|null */
public ?string $end_date=null,
/** @var string|null */
public ?string $planned_end=null,
/** @var string|null */
public ?string $text=null,
/** @var int */
public int $progress=0,
/** @var string|null */
public ?string $parent=null,
/** @var int */
public int $position=0,
/** @var int */
public int $duration=0,
/** @var int|null */
public ?int $planned_duration=null,
/** @var string|null */
public ?string $details=null,
/** @var bool|null */
public ?bool $open=null,
/** @var int */
public int $opened=0,
/** @var int|null */
public ?int $job_type_id=null,
/** @var string|null */
public ?string $job_type_name=null,
/** @var string|null */
public ?string $created_by_id=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['type'])) $this->type = $o['type'];
if (isset($o['start_date'])) $this->start_date = $o['start_date'];
if (isset($o['planned_start'])) $this->planned_start = $o['planned_start'];
if (isset($o['end_date'])) $this->end_date = $o['end_date'];
if (isset($o['planned_end'])) $this->planned_end = $o['planned_end'];
if (isset($o['text'])) $this->text = $o['text'];
if (isset($o['progress'])) $this->progress = $o['progress'];
if (isset($o['parent'])) $this->parent = $o['parent'];
if (isset($o['position'])) $this->position = $o['position'];
if (isset($o['duration'])) $this->duration = $o['duration'];
if (isset($o['planned_duration'])) $this->planned_duration = $o['planned_duration'];
if (isset($o['details'])) $this->details = $o['details'];
if (isset($o['open'])) $this->open = $o['open'];
if (isset($o['opened'])) $this->opened = $o['opened'];
if (isset($o['job_type_id'])) $this->job_type_id = $o['job_type_id'];
if (isset($o['job_type_name'])) $this->job_type_name = $o['job_type_name'];
if (isset($o['created_by_id'])) $this->created_by_id = $o['created_by_id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->type)) $o['type'] = $this->type;
if (isset($this->start_date)) $o['start_date'] = $this->start_date;
if (isset($this->planned_start)) $o['planned_start'] = $this->planned_start;
if (isset($this->end_date)) $o['end_date'] = $this->end_date;
if (isset($this->planned_end)) $o['planned_end'] = $this->planned_end;
if (isset($this->text)) $o['text'] = $this->text;
if (isset($this->progress)) $o['progress'] = $this->progress;
if (isset($this->parent)) $o['parent'] = $this->parent;
if (isset($this->position)) $o['position'] = $this->position;
if (isset($this->duration)) $o['duration'] = $this->duration;
if (isset($this->planned_duration)) $o['planned_duration'] = $this->planned_duration;
if (isset($this->details)) $o['details'] = $this->details;
if (isset($this->open)) $o['open'] = $this->open;
if (isset($this->opened)) $o['opened'] = $this->opened;
if (isset($this->job_type_id)) $o['job_type_id'] = $this->job_type_id;
if (isset($this->job_type_name)) $o['job_type_name'] = $this->job_type_name;
if (isset($this->created_by_id)) $o['created_by_id'] = $this->created_by_id;
return empty($o) ? new class(){} : $o;
}
}
class WebixGanttTaskResponse extends WebixGanttTask implements JsonSerializable
{
/**
* @param string|null $id
* @param string|null $type
* @param string|null $start_date
* @param string|null $planned_start
* @param string|null $end_date
* @param string|null $planned_end
* @param string|null $text
* @param int $progress
* @param string|null $parent
* @param int $position
* @param int $duration
* @param int|null $planned_duration
* @param string|null $details
* @param bool|null $open
* @param int $opened
* @param int|null $job_type_id
* @param string|null $job_type_name
* @param string|null $created_by_id
*/
public function __construct(
?string $id=null,
?string $type=null,
?string $start_date=null,
?string $planned_start=null,
?string $end_date=null,
?string $planned_end=null,
?string $text=null,
int $progress=0,
?string $parent=null,
int $position=0,
int $duration=0,
?int $planned_duration=null,
?string $details=null,
?bool $open=null,
int $opened=0,
?int $job_type_id=null,
?string $job_type_name=null,
?string $created_by_id=null
) {
parent::__construct($id,$type,$start_date,$planned_start,$end_date,$planned_end,$text,$progress,$parent,$position,$duration,$planned_duration,$details,$open,$opened,$job_type_id,$job_type_name,$created_by_id);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
class WebixGanttTaskChangeRequest extends WebixGanttTask implements JsonSerializable
{
/**
* @param string|null $id
* @param string|null $type
* @param string|null $start_date
* @param string|null $planned_start
* @param string|null $end_date
* @param string|null $planned_end
* @param string|null $text
* @param int $progress
* @param string|null $parent
* @param int $position
* @param int $duration
* @param int|null $planned_duration
* @param string|null $details
* @param bool|null $open
* @param int $opened
* @param int|null $job_type_id
* @param string|null $job_type_name
* @param string|null $created_by_id
*/
public function __construct(
?string $id=null,
?string $type=null,
?string $start_date=null,
?string $planned_start=null,
?string $end_date=null,
?string $planned_end=null,
?string $text=null,
int $progress=0,
?string $parent=null,
int $position=0,
int $duration=0,
?int $planned_duration=null,
?string $details=null,
?bool $open=null,
int $opened=0,
?int $job_type_id=null,
?string $job_type_name=null,
?string $created_by_id=null
) {
parent::__construct($id,$type,$start_date,$planned_start,$end_date,$planned_end,$text,$progress,$parent,$position,$duration,$planned_duration,$details,$open,$opened,$job_type_id,$job_type_name,$created_by_id);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
PHP WebixGanttTaskChangeRequest 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.
POST /v1/webix/gantt/tasks HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":"String","type":"String","start_date":"String","planned_start":"String","end_date":"String","planned_end":"String","text":"String","progress":0,"parent":"String","position":0,"duration":0,"planned_duration":0,"details":"String","open":false,"opened":0,"job_type_id":0,"job_type_name":"String","created_by_id":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","type":"String","start_date":"String","planned_start":"String","end_date":"String","planned_end":"String","text":"String","progress":0,"parent":"String","position":0,"duration":0,"planned_duration":0,"details":"String","open":false,"opened":0,"job_type_id":0,"job_type_name":"String","created_by_id":"String"}