| POST,OPTIONS | /v1/projects/{ProjectID}/bluebeam/import/preview |
|---|
<?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 BluebeamRow implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RowNo=0,
/** @var string|null */
public ?string $Subject=null,
/** @var string|null */
public ?string $PageLabel=null,
/** @var int|null */
public ?int $PageIndex=null,
/** @var string|null */
public ?string $Author=null,
/** @var string|null */
public ?string $Date=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $Color=null,
/** @var string|null */
public ?string $Comments=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Layer=null,
/** @var string|null */
public ?string $Space=null,
/** @var float|null */
public ?float $Length=null,
/** @var float|null */
public ?float $Area=null,
/** @var float|null */
public ?float $Count=null,
/** @var float|null */
public ?float $Volume=null,
/** @var string|null */
public ?string $Measurement=null,
/** @var float|null */
public ?float $X=null,
/** @var float|null */
public ?float $Y=null,
/** @var float|null */
public ?float $Width=null,
/** @var float|null */
public ?float $Height=null,
/** @var array<string,string>|null */
public ?array $Extras=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RowNo'])) $this->RowNo = $o['RowNo'];
if (isset($o['Subject'])) $this->Subject = $o['Subject'];
if (isset($o['PageLabel'])) $this->PageLabel = $o['PageLabel'];
if (isset($o['PageIndex'])) $this->PageIndex = $o['PageIndex'];
if (isset($o['Author'])) $this->Author = $o['Author'];
if (isset($o['Date'])) $this->Date = $o['Date'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Layer'])) $this->Layer = $o['Layer'];
if (isset($o['Space'])) $this->Space = $o['Space'];
if (isset($o['Length'])) $this->Length = $o['Length'];
if (isset($o['Area'])) $this->Area = $o['Area'];
if (isset($o['Count'])) $this->Count = $o['Count'];
if (isset($o['Volume'])) $this->Volume = $o['Volume'];
if (isset($o['Measurement'])) $this->Measurement = $o['Measurement'];
if (isset($o['X'])) $this->X = $o['X'];
if (isset($o['Y'])) $this->Y = $o['Y'];
if (isset($o['Width'])) $this->Width = $o['Width'];
if (isset($o['Height'])) $this->Height = $o['Height'];
if (isset($o['Extras'])) $this->Extras = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Extras']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RowNo)) $o['RowNo'] = $this->RowNo;
if (isset($this->Subject)) $o['Subject'] = $this->Subject;
if (isset($this->PageLabel)) $o['PageLabel'] = $this->PageLabel;
if (isset($this->PageIndex)) $o['PageIndex'] = $this->PageIndex;
if (isset($this->Author)) $o['Author'] = $this->Author;
if (isset($this->Date)) $o['Date'] = $this->Date;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Layer)) $o['Layer'] = $this->Layer;
if (isset($this->Space)) $o['Space'] = $this->Space;
if (isset($this->Length)) $o['Length'] = $this->Length;
if (isset($this->Area)) $o['Area'] = $this->Area;
if (isset($this->Count)) $o['Count'] = $this->Count;
if (isset($this->Volume)) $o['Volume'] = $this->Volume;
if (isset($this->Measurement)) $o['Measurement'] = $this->Measurement;
if (isset($this->X)) $o['X'] = $this->X;
if (isset($this->Y)) $o['Y'] = $this->Y;
if (isset($this->Width)) $o['Width'] = $this->Width;
if (isset($this->Height)) $o['Height'] = $this->Height;
if (isset($this->Extras)) $o['Extras'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Extras);
return empty($o) ? new class(){} : $o;
}
}
class BluebeamMappedRow implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RowNo=0,
/** @var string|null */
public ?string $Target=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 float|null */
public ?float $Quantity=null,
/** @var string|null */
public ?string $QuantityKind=null,
/** @var string|null */
public ?string $Unit=null,
/** @var int|null */
public ?int $TaskSeq=null,
/** @var string|null */
public ?string $Reason=null,
/** @var BluebeamRow|null */
public ?BluebeamRow $Source=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RowNo'])) $this->RowNo = $o['RowNo'];
if (isset($o['Target'])) $this->Target = $o['Target'];
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['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['QuantityKind'])) $this->QuantityKind = $o['QuantityKind'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['TaskSeq'])) $this->TaskSeq = $o['TaskSeq'];
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['Source'])) $this->Source = JsonConverters::from('BluebeamRow', $o['Source']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RowNo)) $o['RowNo'] = $this->RowNo;
if (isset($this->Target)) $o['Target'] = $this->Target;
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->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->QuantityKind)) $o['QuantityKind'] = $this->QuantityKind;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->TaskSeq)) $o['TaskSeq'] = $this->TaskSeq;
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->Source)) $o['Source'] = JsonConverters::to('BluebeamRow', $this->Source);
return empty($o) ? new class(){} : $o;
}
}
class BluebeamPreviewResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var string|null */
public ?string $FileName=null,
/** @var int */
public int $RowCount=0,
/** @var array<string>|null */
public ?array $Columns=null,
/** @var array<BluebeamMappedRow>|null */
public ?array $Rows=null,
/** @var int */
public int $PunchProposed=0,
/** @var int */
public int $RfiProposed=0,
/** @var int */
public int $QuantityProposed=0,
/** @var int */
public int $SkipProposed=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['FileName'])) $this->FileName = $o['FileName'];
if (isset($o['RowCount'])) $this->RowCount = $o['RowCount'];
if (isset($o['Columns'])) $this->Columns = JsonConverters::fromArray('string', $o['Columns']);
if (isset($o['Rows'])) $this->Rows = JsonConverters::fromArray('BluebeamMappedRow', $o['Rows']);
if (isset($o['PunchProposed'])) $this->PunchProposed = $o['PunchProposed'];
if (isset($o['RfiProposed'])) $this->RfiProposed = $o['RfiProposed'];
if (isset($o['QuantityProposed'])) $this->QuantityProposed = $o['QuantityProposed'];
if (isset($o['SkipProposed'])) $this->SkipProposed = $o['SkipProposed'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->FileName)) $o['FileName'] = $this->FileName;
if (isset($this->RowCount)) $o['RowCount'] = $this->RowCount;
if (isset($this->Columns)) $o['Columns'] = JsonConverters::toArray('string', $this->Columns);
if (isset($this->Rows)) $o['Rows'] = JsonConverters::toArray('BluebeamMappedRow', $this->Rows);
if (isset($this->PunchProposed)) $o['PunchProposed'] = $this->PunchProposed;
if (isset($this->RfiProposed)) $o['RfiProposed'] = $this->RfiProposed;
if (isset($this->QuantityProposed)) $o['QuantityProposed'] = $this->QuantityProposed;
if (isset($this->SkipProposed)) $o['SkipProposed'] = $this->SkipProposed;
return empty($o) ? new class(){} : $o;
}
}
class BluebeamPreviewRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProjectID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
return empty($o) ? new class(){} : $o;
}
}
PHP BluebeamPreviewRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/bluebeam/import/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ProjectID":0}
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"}},"FileName":"String","RowCount":0,"Columns":["String"],"Rows":[{"RowNo":0,"Target":"String","Title":"String","Description":"String","Area":"String","Trade":"String","AssignedSub":"String","Priority":"String","Quantity":0,"QuantityKind":"String","Unit":"String","TaskSeq":0,"Reason":"String","Source":{"RowNo":0,"Subject":"String","PageLabel":"String","PageIndex":0,"Author":"String","Date":"String","Status":"String","Color":"String","Comments":"String","Label":"String","Layer":"String","Space":"String","Length":0,"Area":0,"Count":0,"Volume":0,"Measurement":"String","X":0,"Y":0,"Width":0,"Height":0,"Extras":{"String":"String"}}}],"PunchProposed":0,"RfiProposed":0,"QuantityProposed":0,"SkipProposed":0}