| GET | /debrief/meetings/{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 ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, JsonSerializable
{
public function __construct(
/** @description The API Key required for authentication */
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
/** @var string */
public string $apiKey='',
/** @description Latitude of the user making this request */
// @ApiMember(DataType="double", Description="Latitude of the user making this request")
/** @var float */
public float $latitude=0.0,
/** @description Longitude of the user making this request */
// @ApiMember(DataType="double", Description="Longitude of the user making this request")
/** @var float */
public float $longitude=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['apiKey'])) $this->apiKey = $o['apiKey'];
if (isset($o['latitude'])) $this->latitude = $o['latitude'];
if (isset($o['longitude'])) $this->longitude = $o['longitude'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->apiKey)) $o['apiKey'] = $this->apiKey;
if (isset($this->latitude)) $o['latitude'] = $this->latitude;
if (isset($this->longitude)) $o['longitude'] = $this->longitude;
return empty($o) ? new class(){} : $o;
}
}
class ApiServiceResponse implements IServiceResponse, JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $heading=null,
/** @var bool|null */
public ?bool $wasSuccessful=null,
/** @var Object|null */
public ?Object $modelState=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['heading'])) $this->heading = $o['heading'];
if (isset($o['wasSuccessful'])) $this->wasSuccessful = $o['wasSuccessful'];
if (isset($o['modelState'])) $this->modelState = JsonConverters::from('Object', $o['modelState']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->heading)) $o['heading'] = $this->heading;
if (isset($this->wasSuccessful)) $o['wasSuccessful'] = $this->wasSuccessful;
if (isset($this->modelState)) $o['modelState'] = JsonConverters::to('Object', $this->modelState);
return empty($o) ? new class(){} : $o;
}
}
class MeetingData implements JsonSerializable
{
public function __construct(
/** @var int */
public int $meetingId=0,
/** @var string|null */
public ?string $startTime=null,
/** @var string|null */
public ?string $arrivalTime=null,
/** @var string|null */
public ?string $leftTime=null,
/** @var string|null */
public ?string $duration=null,
/** @var bool|null */
public ?bool $showTimeFields=null,
/** @var string|null */
public ?string $arrivalStatus=null,
/** @var string|null */
public ?string $email=null,
/** @var bool|null */
public ?bool $hasEmail=null,
/** @var string|null */
public ?string $contactName=null,
/** @var float */
public float $latitude=0.0,
/** @var float */
public float $longitude=0.0,
/** @var string|null */
public ?string $location=null,
/** @var string|null */
public ?string $address=null,
/** @var string|null */
public ?string $subject=null,
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $endTime=null,
/** @var string|null */
public ?string $company=null,
/** @var string|null */
public ?string $contactNumber=null,
/** @var bool|null */
public ?bool $hasContactNumber=null,
/** @var bool|null */
public ?bool $hasLocation=null,
/** @var string|null */
public ?string $setBy=null,
/** @var string|null */
public ?string $virtualOrInPerson=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['meetingId'])) $this->meetingId = $o['meetingId'];
if (isset($o['startTime'])) $this->startTime = $o['startTime'];
if (isset($o['arrivalTime'])) $this->arrivalTime = $o['arrivalTime'];
if (isset($o['leftTime'])) $this->leftTime = $o['leftTime'];
if (isset($o['duration'])) $this->duration = $o['duration'];
if (isset($o['showTimeFields'])) $this->showTimeFields = $o['showTimeFields'];
if (isset($o['arrivalStatus'])) $this->arrivalStatus = $o['arrivalStatus'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['hasEmail'])) $this->hasEmail = $o['hasEmail'];
if (isset($o['contactName'])) $this->contactName = $o['contactName'];
if (isset($o['latitude'])) $this->latitude = $o['latitude'];
if (isset($o['longitude'])) $this->longitude = $o['longitude'];
if (isset($o['location'])) $this->location = $o['location'];
if (isset($o['address'])) $this->address = $o['address'];
if (isset($o['subject'])) $this->subject = $o['subject'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['endTime'])) $this->endTime = $o['endTime'];
if (isset($o['company'])) $this->company = $o['company'];
if (isset($o['contactNumber'])) $this->contactNumber = $o['contactNumber'];
if (isset($o['hasContactNumber'])) $this->hasContactNumber = $o['hasContactNumber'];
if (isset($o['hasLocation'])) $this->hasLocation = $o['hasLocation'];
if (isset($o['setBy'])) $this->setBy = $o['setBy'];
if (isset($o['virtualOrInPerson'])) $this->virtualOrInPerson = $o['virtualOrInPerson'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->meetingId)) $o['meetingId'] = $this->meetingId;
if (isset($this->startTime)) $o['startTime'] = $this->startTime;
if (isset($this->arrivalTime)) $o['arrivalTime'] = $this->arrivalTime;
if (isset($this->leftTime)) $o['leftTime'] = $this->leftTime;
if (isset($this->duration)) $o['duration'] = $this->duration;
if (isset($this->showTimeFields)) $o['showTimeFields'] = $this->showTimeFields;
if (isset($this->arrivalStatus)) $o['arrivalStatus'] = $this->arrivalStatus;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->hasEmail)) $o['hasEmail'] = $this->hasEmail;
if (isset($this->contactName)) $o['contactName'] = $this->contactName;
if (isset($this->latitude)) $o['latitude'] = $this->latitude;
if (isset($this->longitude)) $o['longitude'] = $this->longitude;
if (isset($this->location)) $o['location'] = $this->location;
if (isset($this->address)) $o['address'] = $this->address;
if (isset($this->subject)) $o['subject'] = $this->subject;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->endTime)) $o['endTime'] = $this->endTime;
if (isset($this->company)) $o['company'] = $this->company;
if (isset($this->contactNumber)) $o['contactNumber'] = $this->contactNumber;
if (isset($this->hasContactNumber)) $o['hasContactNumber'] = $this->hasContactNumber;
if (isset($this->hasLocation)) $o['hasLocation'] = $this->hasLocation;
if (isset($this->setBy)) $o['setBy'] = $this->setBy;
if (isset($this->virtualOrInPerson)) $o['virtualOrInPerson'] = $this->virtualOrInPerson;
return empty($o) ? new class(){} : $o;
}
}
class GetDebriefMeetingListResponse extends ApiServiceResponse implements JsonSerializable
{
/**
* @param string|null $description
* @param string|null $heading
* @param bool|null $wasSuccessful
* @param Object|null $modelState
*/
public function __construct(
?string $description=null,
?string $heading=null,
?bool $wasSuccessful=null,
?Object $modelState=null,
/** @var array<MeetingData>|null */
public ?array $meetings=null
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['meetings'])) $this->meetings = JsonConverters::fromArray('MeetingData', $o['meetings']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->meetings)) $o['meetings'] = JsonConverters::toArray('MeetingData', $this->meetings);
return empty($o) ? new class(){} : $o;
}
}
class GetDebriefMeetingList extends ApiServiceRequest implements JsonSerializable
{
/**
* @param string $apiKey
* @param float $latitude
* @param float $longitude
*/
public function __construct(
string $apiKey='',
float $latitude=0.0,
float $longitude=0.0,
/** @var int */
public int $debriefId=0
) {
parent::__construct($apiKey,$latitude,$longitude);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['debriefId'])) $this->debriefId = $o['debriefId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->debriefId)) $o['debriefId'] = $this->debriefId;
return empty($o) ? new class(){} : $o;
}
}
PHP GetDebriefMeetingList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /debrief/meetings/{Id} HTTP/1.1
Host: cochraneplus-api-dev.happen.zone
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
meetings:
[
{
meetingId: 0,
startTime: String,
arrivalTime: String,
leftTime: String,
duration: String,
showTimeFields: False,
arrivalStatus: String,
email: String,
hasEmail: True,
contactName: String,
latitude: 0,
longitude: 0,
location: String,
address: String,
subject: String,
description: String,
endTime: String,
company: String,
contactNumber: String,
hasContactNumber: True,
hasLocation: False,
setBy: String,
virtualOrInPerson: String
}
],
description: String,
heading: String,
wasSuccessful: False,
modelState: {}
}