All Verbs | /overview |
---|
<?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 UserInfo implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $userName=null,
/** @var string|null */
public ?string $avatarUrl=null,
/** @var int */
public int $stacksCount=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['userName'])) $this->userName = $o['userName'];
if (isset($o['avatarUrl'])) $this->avatarUrl = $o['avatarUrl'];
if (isset($o['stacksCount'])) $this->stacksCount = $o['stacksCount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->userName)) $o['userName'] = $this->userName;
if (isset($this->avatarUrl)) $o['avatarUrl'] = $this->avatarUrl;
if (isset($this->stacksCount)) $o['stacksCount'] = $this->stacksCount;
return empty($o) ? new class(){} : $o;
}
}
enum TechnologyTier : string
{
case ProgrammingLanguage = 'ProgrammingLanguage';
case Client = 'Client';
case Http = 'Http';
case Server = 'Server';
case Data = 'Data';
case SoftwareInfrastructure = 'SoftwareInfrastructure';
case OperatingSystem = 'OperatingSystem';
case HardwareInfrastructure = 'HardwareInfrastructure';
case ThirdPartyServices = 'ThirdPartyServices';
}
class TechnologyInfo implements JsonSerializable
{
public function __construct(
/** @var TechnologyTier|null */
public ?TechnologyTier $tier=null,
/** @var string|null */
public ?string $slug=null,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $logoUrl=null,
/** @var int */
public int $stacksCount=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['tier'])) $this->tier = JsonConverters::from('TechnologyTier', $o['tier']);
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['logoUrl'])) $this->logoUrl = $o['logoUrl'];
if (isset($o['stacksCount'])) $this->stacksCount = $o['stacksCount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->tier)) $o['tier'] = JsonConverters::to('TechnologyTier', $this->tier);
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->logoUrl)) $o['logoUrl'] = $this->logoUrl;
if (isset($this->stacksCount)) $o['stacksCount'] = $this->stacksCount;
return empty($o) ? new class(){} : $o;
}
}
class TechnologyStackBase implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $vendorName=null,
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $appUrl=null,
/** @var string|null */
public ?string $screenshotUrl=null,
/** @var DateTime */
public DateTime $created=new DateTime(),
/** @var string|null */
public ?string $createdBy=null,
/** @var DateTime */
public DateTime $lastModified=new DateTime(),
/** @var string|null */
public ?string $lastModifiedBy=null,
/** @var bool|null */
public ?bool $isLocked=null,
/** @var string|null */
public ?string $ownerId=null,
/** @var string|null */
public ?string $slug=null,
// @StringLength(2147483647)
/** @var string|null */
public ?string $details=null,
// @StringLength(2147483647)
/** @var string|null */
public ?string $detailsHtml=null,
/** @var DateTime|null */
public ?DateTime $lastStatusUpdate=null,
/** @var int|null */
public ?int $organizationId=null,
/** @var int|null */
public ?int $commentsPostId=null,
/** @var int */
public int $viewCount=0,
/** @var int */
public int $favCount=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['vendorName'])) $this->vendorName = $o['vendorName'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['appUrl'])) $this->appUrl = $o['appUrl'];
if (isset($o['screenshotUrl'])) $this->screenshotUrl = $o['screenshotUrl'];
if (isset($o['created'])) $this->created = JsonConverters::from('DateTime', $o['created']);
if (isset($o['createdBy'])) $this->createdBy = $o['createdBy'];
if (isset($o['lastModified'])) $this->lastModified = JsonConverters::from('DateTime', $o['lastModified']);
if (isset($o['lastModifiedBy'])) $this->lastModifiedBy = $o['lastModifiedBy'];
if (isset($o['isLocked'])) $this->isLocked = $o['isLocked'];
if (isset($o['ownerId'])) $this->ownerId = $o['ownerId'];
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['details'])) $this->details = $o['details'];
if (isset($o['detailsHtml'])) $this->detailsHtml = $o['detailsHtml'];
if (isset($o['lastStatusUpdate'])) $this->lastStatusUpdate = JsonConverters::from('DateTime', $o['lastStatusUpdate']);
if (isset($o['organizationId'])) $this->organizationId = $o['organizationId'];
if (isset($o['commentsPostId'])) $this->commentsPostId = $o['commentsPostId'];
if (isset($o['viewCount'])) $this->viewCount = $o['viewCount'];
if (isset($o['favCount'])) $this->favCount = $o['favCount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->vendorName)) $o['vendorName'] = $this->vendorName;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->appUrl)) $o['appUrl'] = $this->appUrl;
if (isset($this->screenshotUrl)) $o['screenshotUrl'] = $this->screenshotUrl;
if (isset($this->created)) $o['created'] = JsonConverters::to('DateTime', $this->created);
if (isset($this->createdBy)) $o['createdBy'] = $this->createdBy;
if (isset($this->lastModified)) $o['lastModified'] = JsonConverters::to('DateTime', $this->lastModified);
if (isset($this->lastModifiedBy)) $o['lastModifiedBy'] = $this->lastModifiedBy;
if (isset($this->isLocked)) $o['isLocked'] = $this->isLocked;
if (isset($this->ownerId)) $o['ownerId'] = $this->ownerId;
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->details)) $o['details'] = $this->details;
if (isset($this->detailsHtml)) $o['detailsHtml'] = $this->detailsHtml;
if (isset($this->lastStatusUpdate)) $o['lastStatusUpdate'] = JsonConverters::to('DateTime', $this->lastStatusUpdate);
if (isset($this->organizationId)) $o['organizationId'] = $this->organizationId;
if (isset($this->commentsPostId)) $o['commentsPostId'] = $this->commentsPostId;
if (isset($this->viewCount)) $o['viewCount'] = $this->viewCount;
if (isset($this->favCount)) $o['favCount'] = $this->favCount;
return empty($o) ? new class(){} : $o;
}
}
class TechnologyBase implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $vendorName=null,
/** @var string|null */
public ?string $vendorUrl=null,
/** @var string|null */
public ?string $productUrl=null,
/** @var string|null */
public ?string $logoUrl=null,
/** @var string|null */
public ?string $description=null,
/** @var DateTime */
public DateTime $created=new DateTime(),
/** @var string|null */
public ?string $createdBy=null,
/** @var DateTime */
public DateTime $lastModified=new DateTime(),
/** @var string|null */
public ?string $lastModifiedBy=null,
/** @var string|null */
public ?string $ownerId=null,
/** @var string|null */
public ?string $slug=null,
/** @var bool|null */
public ?bool $logoApproved=null,
/** @var bool|null */
public ?bool $isLocked=null,
/** @var TechnologyTier|null */
public ?TechnologyTier $tier=null,
/** @var DateTime|null */
public ?DateTime $lastStatusUpdate=null,
/** @var int|null */
public ?int $organizationId=null,
/** @var int|null */
public ?int $commentsPostId=null,
/** @var int */
public int $viewCount=0,
/** @var int */
public int $favCount=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['vendorName'])) $this->vendorName = $o['vendorName'];
if (isset($o['vendorUrl'])) $this->vendorUrl = $o['vendorUrl'];
if (isset($o['productUrl'])) $this->productUrl = $o['productUrl'];
if (isset($o['logoUrl'])) $this->logoUrl = $o['logoUrl'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['created'])) $this->created = JsonConverters::from('DateTime', $o['created']);
if (isset($o['createdBy'])) $this->createdBy = $o['createdBy'];
if (isset($o['lastModified'])) $this->lastModified = JsonConverters::from('DateTime', $o['lastModified']);
if (isset($o['lastModifiedBy'])) $this->lastModifiedBy = $o['lastModifiedBy'];
if (isset($o['ownerId'])) $this->ownerId = $o['ownerId'];
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['logoApproved'])) $this->logoApproved = $o['logoApproved'];
if (isset($o['isLocked'])) $this->isLocked = $o['isLocked'];
if (isset($o['tier'])) $this->tier = JsonConverters::from('TechnologyTier', $o['tier']);
if (isset($o['lastStatusUpdate'])) $this->lastStatusUpdate = JsonConverters::from('DateTime', $o['lastStatusUpdate']);
if (isset($o['organizationId'])) $this->organizationId = $o['organizationId'];
if (isset($o['commentsPostId'])) $this->commentsPostId = $o['commentsPostId'];
if (isset($o['viewCount'])) $this->viewCount = $o['viewCount'];
if (isset($o['favCount'])) $this->favCount = $o['favCount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->vendorName)) $o['vendorName'] = $this->vendorName;
if (isset($this->vendorUrl)) $o['vendorUrl'] = $this->vendorUrl;
if (isset($this->productUrl)) $o['productUrl'] = $this->productUrl;
if (isset($this->logoUrl)) $o['logoUrl'] = $this->logoUrl;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->created)) $o['created'] = JsonConverters::to('DateTime', $this->created);
if (isset($this->createdBy)) $o['createdBy'] = $this->createdBy;
if (isset($this->lastModified)) $o['lastModified'] = JsonConverters::to('DateTime', $this->lastModified);
if (isset($this->lastModifiedBy)) $o['lastModifiedBy'] = $this->lastModifiedBy;
if (isset($this->ownerId)) $o['ownerId'] = $this->ownerId;
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->logoApproved)) $o['logoApproved'] = $this->logoApproved;
if (isset($this->isLocked)) $o['isLocked'] = $this->isLocked;
if (isset($this->tier)) $o['tier'] = JsonConverters::to('TechnologyTier', $this->tier);
if (isset($this->lastStatusUpdate)) $o['lastStatusUpdate'] = JsonConverters::to('DateTime', $this->lastStatusUpdate);
if (isset($this->organizationId)) $o['organizationId'] = $this->organizationId;
if (isset($this->commentsPostId)) $o['commentsPostId'] = $this->commentsPostId;
if (isset($this->viewCount)) $o['viewCount'] = $this->viewCount;
if (isset($this->favCount)) $o['favCount'] = $this->favCount;
return empty($o) ? new class(){} : $o;
}
}
class TechnologyInStack extends TechnologyBase implements JsonSerializable
{
/**
* @param int $id
* @param string|null $name
* @param string|null $vendorName
* @param string|null $vendorUrl
* @param string|null $productUrl
* @param string|null $logoUrl
* @param string|null $description
* @param DateTime $created
* @param string|null $createdBy
* @param DateTime $lastModified
* @param string|null $lastModifiedBy
* @param string|null $ownerId
* @param string|null $slug
* @param bool|null $logoApproved
* @param bool|null $isLocked
* @param TechnologyTier|null $tier
* @param DateTime|null $lastStatusUpdate
* @param int|null $organizationId
* @param int|null $commentsPostId
* @param int $viewCount
* @param int $favCount
*/
public function __construct(
int $id=0,
?string $name=null,
?string $vendorName=null,
?string $vendorUrl=null,
?string $productUrl=null,
?string $logoUrl=null,
?string $description=null,
DateTime $created=new DateTime(),
?string $createdBy=null,
DateTime $lastModified=new DateTime(),
?string $lastModifiedBy=null,
?string $ownerId=null,
?string $slug=null,
?bool $logoApproved=null,
?bool $isLocked=null,
?TechnologyTier $tier=null,
?DateTime $lastStatusUpdate=null,
?int $organizationId=null,
?int $commentsPostId=null,
int $viewCount=0,
int $favCount=0,
/** @var int */
public int $technologyId=0,
/** @var int */
public int $technologyStackId=0,
/** @var string|null */
public ?string $justification=null
) {
parent::__construct($id,$name,$vendorName,$vendorUrl,$productUrl,$logoUrl,$description,$created,$createdBy,$lastModified,$lastModifiedBy,$ownerId,$slug,$logoApproved,$isLocked,$tier,$lastStatusUpdate,$organizationId,$commentsPostId,$viewCount,$favCount);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['technologyId'])) $this->technologyId = $o['technologyId'];
if (isset($o['technologyStackId'])) $this->technologyStackId = $o['technologyStackId'];
if (isset($o['justification'])) $this->justification = $o['justification'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->technologyId)) $o['technologyId'] = $this->technologyId;
if (isset($this->technologyStackId)) $o['technologyStackId'] = $this->technologyStackId;
if (isset($this->justification)) $o['justification'] = $this->justification;
return empty($o) ? new class(){} : $o;
}
}
class TechStackDetails extends TechnologyStackBase implements JsonSerializable
{
/**
* @param int $id
* @param string|null $name
* @param string|null $vendorName
* @param string|null $description
* @param string|null $appUrl
* @param string|null $screenshotUrl
* @param DateTime $created
* @param string|null $createdBy
* @param DateTime $lastModified
* @param string|null $lastModifiedBy
* @param bool|null $isLocked
* @param string|null $ownerId
* @param string|null $slug
* @param string|null $details
* @param string|null $detailsHtml
* @param DateTime|null $lastStatusUpdate
* @param int|null $organizationId
* @param int|null $commentsPostId
* @param int $viewCount
* @param int $favCount
*/
public function __construct(
int $id=0,
?string $name=null,
?string $vendorName=null,
?string $description=null,
?string $appUrl=null,
?string $screenshotUrl=null,
DateTime $created=new DateTime(),
?string $createdBy=null,
DateTime $lastModified=new DateTime(),
?string $lastModifiedBy=null,
?bool $isLocked=null,
?string $ownerId=null,
?string $slug=null,
?string $details=null,
?string $detailsHtml=null,
?DateTime $lastStatusUpdate=null,
?int $organizationId=null,
?int $commentsPostId=null,
int $viewCount=0,
int $favCount=0,
/** @var array<TechnologyInStack>|null */
public ?array $technologyChoices=null
) {
parent::__construct($id,$name,$vendorName,$description,$appUrl,$screenshotUrl,$created,$createdBy,$lastModified,$lastModifiedBy,$isLocked,$ownerId,$slug,$details,$detailsHtml,$lastStatusUpdate,$organizationId,$commentsPostId,$viewCount,$favCount);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['technologyChoices'])) $this->technologyChoices = JsonConverters::fromArray('TechnologyInStack', $o['technologyChoices']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->technologyChoices)) $o['technologyChoices'] = JsonConverters::toArray('TechnologyInStack', $this->technologyChoices);
return empty($o) ? new class(){} : $o;
}
}
class TechnologyStack extends TechnologyStackBase implements JsonSerializable
{
/**
* @param int $id
* @param string|null $name
* @param string|null $vendorName
* @param string|null $description
* @param string|null $appUrl
* @param string|null $screenshotUrl
* @param DateTime $created
* @param string|null $createdBy
* @param DateTime $lastModified
* @param string|null $lastModifiedBy
* @param bool|null $isLocked
* @param string|null $ownerId
* @param string|null $slug
* @param string|null $details
* @param string|null $detailsHtml
* @param DateTime|null $lastStatusUpdate
* @param int|null $organizationId
* @param int|null $commentsPostId
* @param int $viewCount
* @param int $favCount
*/
public function __construct(
int $id=0,
?string $name=null,
?string $vendorName=null,
?string $description=null,
?string $appUrl=null,
?string $screenshotUrl=null,
DateTime $created=new DateTime(),
?string $createdBy=null,
DateTime $lastModified=new DateTime(),
?string $lastModifiedBy=null,
?bool $isLocked=null,
?string $ownerId=null,
?string $slug=null,
?string $details=null,
?string $detailsHtml=null,
?DateTime $lastStatusUpdate=null,
?int $organizationId=null,
?int $commentsPostId=null,
int $viewCount=0,
int $favCount=0
) {
parent::__construct($id,$name,$vendorName,$description,$appUrl,$screenshotUrl,$created,$createdBy,$lastModified,$lastModifiedBy,$isLocked,$ownerId,$slug,$details,$detailsHtml,$lastStatusUpdate,$organizationId,$commentsPostId,$viewCount,$favCount);
}
/** @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 LabelInfo implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $slug=null,
/** @var string|null */
public ?string $color=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['color'])) $this->color = $o['color'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->color)) $o['color'] = $this->color;
return empty($o) ? new class(){} : $o;
}
}
class CategoryInfo implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $slug=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['slug'])) $this->slug = $o['slug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->slug)) $o['slug'] = $this->slug;
return empty($o) ? new class(){} : $o;
}
}
class OrganizationInfo implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $slug=null,
/** @var int|null */
public ?int $refId=null,
/** @var string|null */
public ?string $refSource=null,
/** @var int|null */
public ?int $upVotes=null,
/** @var int|null */
public ?int $downVotes=null,
/** @var int */
public int $membersCount=0,
/** @var int */
public int $rank=0,
/** @var bool|null */
public ?bool $disableInvites=null,
/** @var string|null */
public ?string $lang=null,
/** @var string[]|null */
public ?array $postTypes=null,
/** @var string[]|null */
public ?array $moderatorPostTypes=null,
/** @var DateTime|null */
public ?DateTime $locked=null,
/** @var array<LabelInfo>|null */
public ?array $labels=null,
/** @var array<CategoryInfo>|null */
public ?array $categories=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['refId'])) $this->refId = $o['refId'];
if (isset($o['refSource'])) $this->refSource = $o['refSource'];
if (isset($o['upVotes'])) $this->upVotes = $o['upVotes'];
if (isset($o['downVotes'])) $this->downVotes = $o['downVotes'];
if (isset($o['membersCount'])) $this->membersCount = $o['membersCount'];
if (isset($o['rank'])) $this->rank = $o['rank'];
if (isset($o['disableInvites'])) $this->disableInvites = $o['disableInvites'];
if (isset($o['lang'])) $this->lang = $o['lang'];
if (isset($o['postTypes'])) $this->postTypes = JsonConverters::fromArray('string', $o['postTypes']);
if (isset($o['moderatorPostTypes'])) $this->moderatorPostTypes = JsonConverters::fromArray('string', $o['moderatorPostTypes']);
if (isset($o['locked'])) $this->locked = JsonConverters::from('DateTime', $o['locked']);
if (isset($o['labels'])) $this->labels = JsonConverters::fromArray('LabelInfo', $o['labels']);
if (isset($o['categories'])) $this->categories = JsonConverters::fromArray('CategoryInfo', $o['categories']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->refId)) $o['refId'] = $this->refId;
if (isset($this->refSource)) $o['refSource'] = $this->refSource;
if (isset($this->upVotes)) $o['upVotes'] = $this->upVotes;
if (isset($this->downVotes)) $o['downVotes'] = $this->downVotes;
if (isset($this->membersCount)) $o['membersCount'] = $this->membersCount;
if (isset($this->rank)) $o['rank'] = $this->rank;
if (isset($this->disableInvites)) $o['disableInvites'] = $this->disableInvites;
if (isset($this->lang)) $o['lang'] = $this->lang;
if (isset($this->postTypes)) $o['postTypes'] = JsonConverters::toArray('string', $this->postTypes);
if (isset($this->moderatorPostTypes)) $o['moderatorPostTypes'] = JsonConverters::toArray('string', $this->moderatorPostTypes);
if (isset($this->locked)) $o['locked'] = JsonConverters::to('DateTime', $this->locked);
if (isset($this->labels)) $o['labels'] = JsonConverters::toArray('LabelInfo', $this->labels);
if (isset($this->categories)) $o['categories'] = JsonConverters::toArray('CategoryInfo', $this->categories);
return empty($o) ? new class(){} : $o;
}
}
class OverviewResponse implements JsonSerializable
{
public function __construct(
/** @var DateTime */
public DateTime $created=new DateTime(),
/** @var array<UserInfo>|null */
public ?array $topUsers=null,
/** @var array<TechnologyInfo>|null */
public ?array $topTechnologies=null,
/** @var array<TechStackDetails>|null */
public ?array $latestTechStacks=null,
/** @var array<TechnologyStack>|null */
public ?array $popularTechStacks=null,
/** @var array<OrganizationInfo>|null */
public ?array $allOrganizations=null,
/** @var array<string,TechnologyInfo[]>|null */
public ?array $topTechnologiesByTier=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['created'])) $this->created = JsonConverters::from('DateTime', $o['created']);
if (isset($o['topUsers'])) $this->topUsers = JsonConverters::fromArray('UserInfo', $o['topUsers']);
if (isset($o['topTechnologies'])) $this->topTechnologies = JsonConverters::fromArray('TechnologyInfo', $o['topTechnologies']);
if (isset($o['latestTechStacks'])) $this->latestTechStacks = JsonConverters::fromArray('TechStackDetails', $o['latestTechStacks']);
if (isset($o['popularTechStacks'])) $this->popularTechStacks = JsonConverters::fromArray('TechnologyStack', $o['popularTechStacks']);
if (isset($o['allOrganizations'])) $this->allOrganizations = JsonConverters::fromArray('OrganizationInfo', $o['allOrganizations']);
if (isset($o['topTechnologiesByTier'])) $this->topTechnologiesByTier = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','List<TechnologyInfo>']), $o['topTechnologiesByTier']);
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->created)) $o['created'] = JsonConverters::to('DateTime', $this->created);
if (isset($this->topUsers)) $o['topUsers'] = JsonConverters::toArray('UserInfo', $this->topUsers);
if (isset($this->topTechnologies)) $o['topTechnologies'] = JsonConverters::toArray('TechnologyInfo', $this->topTechnologies);
if (isset($this->latestTechStacks)) $o['latestTechStacks'] = JsonConverters::toArray('TechStackDetails', $this->latestTechStacks);
if (isset($this->popularTechStacks)) $o['popularTechStacks'] = JsonConverters::toArray('TechnologyStack', $this->popularTechStacks);
if (isset($this->allOrganizations)) $o['allOrganizations'] = JsonConverters::toArray('OrganizationInfo', $this->allOrganizations);
if (isset($this->topTechnologiesByTier)) $o['topTechnologiesByTier'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','List<TechnologyInfo>']), $this->topTechnologiesByTier);
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
class Overview implements IGet, JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $reload=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['reload'])) $this->reload = $o['reload'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->reload)) $o['reload'] = $this->reload;
return empty($o) ? new class(){} : $o;
}
}
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.
POST /overview HTTP/1.1
Host: techstacks.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
reload: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { created: 0001-01-01, topUsers: [ { userName: String, avatarUrl: String, stacksCount: 0 } ], topTechnologies: [ { tier: ProgrammingLanguage, slug: String, name: String, logoUrl: String, stacksCount: 0 } ], latestTechStacks: [ { technologyChoices: [ { technologyId: 0, technologyStackId: 0, justification: String, id: 0, name: String, vendorName: String, vendorUrl: String, productUrl: String, logoUrl: String, description: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, ownerId: String, slug: String, logoApproved: False, isLocked: False, tier: ProgrammingLanguage, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], id: 0, name: String, vendorName: String, description: String, appUrl: String, screenshotUrl: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, isLocked: False, ownerId: String, slug: String, details: String, detailsHtml: String, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], popularTechStacks: [ { id: 0, name: String, vendorName: String, description: String, appUrl: String, screenshotUrl: String, created: 0001-01-01, createdBy: String, lastModified: 0001-01-01, lastModifiedBy: String, isLocked: False, ownerId: String, slug: String, details: String, detailsHtml: String, lastStatusUpdate: 0001-01-01, organizationId: 0, commentsPostId: 0, viewCount: 0, favCount: 0 } ], allOrganizations: [ { id: 0, name: String, slug: String, refId: 0, refSource: String, upVotes: 0, downVotes: 0, membersCount: 0, rank: 0, disableInvites: False, lang: String, postTypes: [ String ], moderatorPostTypes: [ String ], locked: 0001-01-01, labels: [ { slug: String, color: String } ], categories: [ { id: 0, name: String, slug: String } ] } ], topTechnologiesByTier: { String: [ { tier: ProgrammingLanguage, slug: String, name: String, logoUrl: String, stacksCount: 0 } ] }, responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }