| GET | /debrief/{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 NewContactData implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $jobTitle=null,
/** @var string|null */
public ?string $companyName=null,
/** @var string|null */
public ?string $emailAddress=null,
/** @var string|null */
public ?string $contactNumber=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['jobTitle'])) $this->jobTitle = $o['jobTitle'];
if (isset($o['companyName'])) $this->companyName = $o['companyName'];
if (isset($o['emailAddress'])) $this->emailAddress = $o['emailAddress'];
if (isset($o['contactNumber'])) $this->contactNumber = $o['contactNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->jobTitle)) $o['jobTitle'] = $this->jobTitle;
if (isset($this->companyName)) $o['companyName'] = $this->companyName;
if (isset($this->emailAddress)) $o['emailAddress'] = $this->emailAddress;
if (isset($this->contactNumber)) $o['contactNumber'] = $this->contactNumber;
return empty($o) ? new class(){} : $o;
}
}
class DebriefRatingCommentDetail implements JsonSerializable
{
public function __construct(
/** @var int */
public int $managerId=0,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $title=null,
/** @var string|null */
public ?string $reviewedDate=null,
/** @var int */
public int $rating=0,
/** @var string|null */
public ?string $comments=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['managerId'])) $this->managerId = $o['managerId'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['reviewedDate'])) $this->reviewedDate = $o['reviewedDate'];
if (isset($o['rating'])) $this->rating = $o['rating'];
if (isset($o['comments'])) $this->comments = $o['comments'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->managerId)) $o['managerId'] = $this->managerId;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->reviewedDate)) $o['reviewedDate'] = $this->reviewedDate;
if (isset($this->rating)) $o['rating'] = $this->rating;
if (isset($this->comments)) $o['comments'] = $this->comments;
return empty($o) ? new class(){} : $o;
}
}
class DebriefData implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $hasAiPermissions=null,
/** @var int */
public int $id=0,
/** @var MeetingData|null */
public ?MeetingData $meeting=null,
/** @var string|null */
public ?string $dateCreated=null,
/** @var string|null */
public ?string $lastUpdated=null,
/** @var bool|null */
public ?bool $completed=null,
/** @var bool|null */
public ?bool $hasAudio=null,
/** @var string|null */
public ?string $companyName=null,
/** @var string|null */
public ?string $meetingTime=null,
/** @var string|null */
public ?string $address=null,
/** @var string|null */
public ?string $feedback=null,
/** @var string|null */
public ?string $research=null,
/** @var string|null */
public ?string $nextSteps=null,
/** @var string|null */
public ?string $opportunities=null,
/** @var string|null */
public ?string $personnel=null,
/** @var string|null */
public ?string $group=null,
/** @var string|null */
public ?string $industry=null,
/** @var array<NewContactData>|null */
public ?array $newContacts=null,
/** @var array<DebriefRatingCommentDetail>|null */
public ?array $ratingCommentDetails=null,
/** @var bool|null */
public ?bool $hasComments=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['hasAiPermissions'])) $this->hasAiPermissions = $o['hasAiPermissions'];
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['meeting'])) $this->meeting = JsonConverters::from('MeetingData', $o['meeting']);
if (isset($o['dateCreated'])) $this->dateCreated = $o['dateCreated'];
if (isset($o['lastUpdated'])) $this->lastUpdated = $o['lastUpdated'];
if (isset($o['completed'])) $this->completed = $o['completed'];
if (isset($o['hasAudio'])) $this->hasAudio = $o['hasAudio'];
if (isset($o['companyName'])) $this->companyName = $o['companyName'];
if (isset($o['meetingTime'])) $this->meetingTime = $o['meetingTime'];
if (isset($o['address'])) $this->address = $o['address'];
if (isset($o['feedback'])) $this->feedback = $o['feedback'];
if (isset($o['research'])) $this->research = $o['research'];
if (isset($o['nextSteps'])) $this->nextSteps = $o['nextSteps'];
if (isset($o['opportunities'])) $this->opportunities = $o['opportunities'];
if (isset($o['personnel'])) $this->personnel = $o['personnel'];
if (isset($o['group'])) $this->group = $o['group'];
if (isset($o['industry'])) $this->industry = $o['industry'];
if (isset($o['newContacts'])) $this->newContacts = JsonConverters::fromArray('NewContactData', $o['newContacts']);
if (isset($o['ratingCommentDetails'])) $this->ratingCommentDetails = JsonConverters::fromArray('DebriefRatingCommentDetail', $o['ratingCommentDetails']);
if (isset($o['hasComments'])) $this->hasComments = $o['hasComments'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->hasAiPermissions)) $o['hasAiPermissions'] = $this->hasAiPermissions;
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->meeting)) $o['meeting'] = JsonConverters::to('MeetingData', $this->meeting);
if (isset($this->dateCreated)) $o['dateCreated'] = $this->dateCreated;
if (isset($this->lastUpdated)) $o['lastUpdated'] = $this->lastUpdated;
if (isset($this->completed)) $o['completed'] = $this->completed;
if (isset($this->hasAudio)) $o['hasAudio'] = $this->hasAudio;
if (isset($this->companyName)) $o['companyName'] = $this->companyName;
if (isset($this->meetingTime)) $o['meetingTime'] = $this->meetingTime;
if (isset($this->address)) $o['address'] = $this->address;
if (isset($this->feedback)) $o['feedback'] = $this->feedback;
if (isset($this->research)) $o['research'] = $this->research;
if (isset($this->nextSteps)) $o['nextSteps'] = $this->nextSteps;
if (isset($this->opportunities)) $o['opportunities'] = $this->opportunities;
if (isset($this->personnel)) $o['personnel'] = $this->personnel;
if (isset($this->group)) $o['group'] = $this->group;
if (isset($this->industry)) $o['industry'] = $this->industry;
if (isset($this->newContacts)) $o['newContacts'] = JsonConverters::toArray('NewContactData', $this->newContacts);
if (isset($this->ratingCommentDetails)) $o['ratingCommentDetails'] = JsonConverters::toArray('DebriefRatingCommentDetail', $this->ratingCommentDetails);
if (isset($this->hasComments)) $o['hasComments'] = $this->hasComments;
return empty($o) ? new class(){} : $o;
}
}
class GetDebriefResponse 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<DebriefData>|null */
public ?array $debriefs=null
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['debriefs'])) $this->debriefs = JsonConverters::fromArray('DebriefData', $o['debriefs']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->debriefs)) $o['debriefs'] = JsonConverters::toArray('DebriefData', $this->debriefs);
return empty($o) ? new class(){} : $o;
}
}
class GetDebrief 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 $id=0
) {
parent::__construct($apiKey,$latitude,$longitude);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['id'])) $this->id = $o['id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->id)) $o['id'] = $this->id;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /debrief/{Id} HTTP/1.1
Host: cochraneplus-api-dev.happen.zone
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"debriefs":[{}],"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}