TechStacks!

<back to all web services

RemoveFavoriteTechStack

User
Requires Authentication
The following routes are available for this service:
DELETE/favorites/techtacks/{TechnologyStackId}
<?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 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 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);
        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 = parent::jsonSerialize();
        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 FavoriteTechStackResponse implements JsonSerializable
{
    public function __construct(
        /** @var TechnologyStack|null */
        public ?TechnologyStack $result=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['result'])) $this->result = JsonConverters::from('TechnologyStack', $o['result']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->result)) $o['result'] = JsonConverters::to('TechnologyStack', $this->result);
        return empty($o) ? new class(){} : $o;
    }
}

class RemoveFavoriteTechStack implements IDelete, JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $technologyStackId=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['technologyStackId'])) $this->technologyStackId = $o['technologyStackId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->technologyStackId)) $o['technologyStackId'] = $this->technologyStackId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP RemoveFavoriteTechStack DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /favorites/techtacks/{TechnologyStackId} HTTP/1.1 
Host: techstacks.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	result: 
	{
		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
	}
}