Trendsic Platform Service

<back to all web services

MarkupRaiseRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/markup/{AttachmentId}/{VersionNo}/{PageIndex}/shapes/{ShapeId}/{Raise}
<?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 DocumentMarkupLink implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $DocumentMarkupLinkID=0,
        /** @var string */
        public string $AttachmentId='',
        /** @var int */
        public int $VersionNo=0,
        /** @var int */
        public int $PageIndex=0,
        /** @var string|null */
        public ?string $ShapeId=null,
        /** @var string|null */
        public ?string $EntityType=null,
        /** @var int */
        public int $EntityID=0,
        /** @var string|null */
        public ?string $EntityNo=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DocumentMarkupLinkID'])) $this->DocumentMarkupLinkID = $o['DocumentMarkupLinkID'];
        if (isset($o['AttachmentId'])) $this->AttachmentId = $o['AttachmentId'];
        if (isset($o['VersionNo'])) $this->VersionNo = $o['VersionNo'];
        if (isset($o['PageIndex'])) $this->PageIndex = $o['PageIndex'];
        if (isset($o['ShapeId'])) $this->ShapeId = $o['ShapeId'];
        if (isset($o['EntityType'])) $this->EntityType = $o['EntityType'];
        if (isset($o['EntityID'])) $this->EntityID = $o['EntityID'];
        if (isset($o['EntityNo'])) $this->EntityNo = $o['EntityNo'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DocumentMarkupLinkID)) $o['DocumentMarkupLinkID'] = $this->DocumentMarkupLinkID;
        if (isset($this->AttachmentId)) $o['AttachmentId'] = $this->AttachmentId;
        if (isset($this->VersionNo)) $o['VersionNo'] = $this->VersionNo;
        if (isset($this->PageIndex)) $o['PageIndex'] = $this->PageIndex;
        if (isset($this->ShapeId)) $o['ShapeId'] = $this->ShapeId;
        if (isset($this->EntityType)) $o['EntityType'] = $this->EntityType;
        if (isset($this->EntityID)) $o['EntityID'] = $this->EntityID;
        if (isset($this->EntityNo)) $o['EntityNo'] = $this->EntityNo;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class MarkupRaiseResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var DocumentMarkupLink|null */
        public ?DocumentMarkupLink $Link=null,
        /** @var array<DocumentMarkupLink>|null */
        public ?array $Links=null
    ) {
    }

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

class MarkupRaiseRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $AttachmentId='',
        /** @var int */
        public int $VersionNo=0,
        /** @var int */
        public int $PageIndex=0,
        /** @var string|null */
        public ?string $ShapeId=null,
        /** @var string|null */
        public ?string $Raise=null,
        /** @var int|null */
        public ?int $ProjectID=null,
        /** @var string|null */
        public ?string $Title=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Area=null,
        /** @var string|null */
        public ?string $Trade=null,
        /** @var string|null */
        public ?string $AssignedSub=null,
        /** @var string|null */
        public ?string $Priority=null,
        /** @var string|null */
        public ?string $AskedOf=null,
        /** @var string|null */
        public ?string $Discipline=null,
        /** @var DateTime|null */
        public ?DateTime $DueDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AttachmentId'])) $this->AttachmentId = $o['AttachmentId'];
        if (isset($o['VersionNo'])) $this->VersionNo = $o['VersionNo'];
        if (isset($o['PageIndex'])) $this->PageIndex = $o['PageIndex'];
        if (isset($o['ShapeId'])) $this->ShapeId = $o['ShapeId'];
        if (isset($o['Raise'])) $this->Raise = $o['Raise'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Area'])) $this->Area = $o['Area'];
        if (isset($o['Trade'])) $this->Trade = $o['Trade'];
        if (isset($o['AssignedSub'])) $this->AssignedSub = $o['AssignedSub'];
        if (isset($o['Priority'])) $this->Priority = $o['Priority'];
        if (isset($o['AskedOf'])) $this->AskedOf = $o['AskedOf'];
        if (isset($o['Discipline'])) $this->Discipline = $o['Discipline'];
        if (isset($o['DueDate'])) $this->DueDate = JsonConverters::from('DateTime', $o['DueDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AttachmentId)) $o['AttachmentId'] = $this->AttachmentId;
        if (isset($this->VersionNo)) $o['VersionNo'] = $this->VersionNo;
        if (isset($this->PageIndex)) $o['PageIndex'] = $this->PageIndex;
        if (isset($this->ShapeId)) $o['ShapeId'] = $this->ShapeId;
        if (isset($this->Raise)) $o['Raise'] = $this->Raise;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Area)) $o['Area'] = $this->Area;
        if (isset($this->Trade)) $o['Trade'] = $this->Trade;
        if (isset($this->AssignedSub)) $o['AssignedSub'] = $this->AssignedSub;
        if (isset($this->Priority)) $o['Priority'] = $this->Priority;
        if (isset($this->AskedOf)) $o['AskedOf'] = $this->AskedOf;
        if (isset($this->Discipline)) $o['Discipline'] = $this->Discipline;
        if (isset($this->DueDate)) $o['DueDate'] = JsonConverters::to('DateTime', $this->DueDate);
        return empty($o) ? new class(){} : $o;
    }
}

PHP MarkupRaiseRequest 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

HTTP + JSON

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

POST /v1/markup/{AttachmentId}/{VersionNo}/{PageIndex}/shapes/{ShapeId}/{Raise} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"PageIndex":0,"ShapeId":"String","Raise":"String","ProjectID":0,"Title":"String","Description":"String","Area":"String","Trade":"String","AssignedSub":"String","Priority":"String","AskedOf":"String","Discipline":"String","DueDate":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Link":{"DocumentMarkupLinkID":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"PageIndex":0,"ShapeId":"String","EntityType":"String","EntityID":0,"EntityNo":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000"},"Links":[{"DocumentMarkupLinkID":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"PageIndex":0,"ShapeId":"String","EntityType":"String","EntityID":0,"EntityNo":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000"}]}