Trendsic Platform Service

<back to all web services

BluebeamPreviewRequest

Requires Authentication
The following routes are available for this service:
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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<BluebeamPreviewRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ProjectID>0</ProjectID>
</BluebeamPreviewRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BluebeamPreviewResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Columns xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Columns>
  <FileName>String</FileName>
  <PunchProposed>0</PunchProposed>
  <QuantityProposed>0</QuantityProposed>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <RfiProposed>0</RfiProposed>
  <RowCount>0</RowCount>
  <Rows>
    <BluebeamMappedRow>
      <Area>String</Area>
      <AssignedSub>String</AssignedSub>
      <Description>String</Description>
      <Priority>String</Priority>
      <Quantity>0</Quantity>
      <QuantityKind>String</QuantityKind>
      <Reason>String</Reason>
      <RowNo>0</RowNo>
      <Source>
        <Area>0</Area>
        <Author>String</Author>
        <Color>String</Color>
        <Comments>String</Comments>
        <Count>0</Count>
        <Date>String</Date>
        <Extras xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Extras>
        <Height>0</Height>
        <Label>String</Label>
        <Layer>String</Layer>
        <Length>0</Length>
        <Measurement>String</Measurement>
        <PageIndex>0</PageIndex>
        <PageLabel>String</PageLabel>
        <RowNo>0</RowNo>
        <Space>String</Space>
        <Status>String</Status>
        <Subject>String</Subject>
        <Volume>0</Volume>
        <Width>0</Width>
        <X>0</X>
        <Y>0</Y>
      </Source>
      <Target>String</Target>
      <TaskSeq>0</TaskSeq>
      <Title>String</Title>
      <Trade>String</Trade>
      <Unit>String</Unit>
    </BluebeamMappedRow>
  </Rows>
  <SkipProposed>0</SkipProposed>
</BluebeamPreviewResponse>