| POST,OPTIONS | /v1/projects/{ProjectID}/bluebeam/import/commit |
|---|
<?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 BluebeamCommitResult implements JsonSerializable
{
public function __construct(
/** @var int */
public int $PunchCreated=0,
/** @var int */
public int $RfisCreated=0,
/** @var int */
public int $Skipped=0,
/** @var array<string>|null */
public ?array $Created=null,
/** @var array<BluebeamMappedRow>|null */
public ?array $Quantities=null,
/** @var array<string>|null */
public ?array $Errors=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PunchCreated'])) $this->PunchCreated = $o['PunchCreated'];
if (isset($o['RfisCreated'])) $this->RfisCreated = $o['RfisCreated'];
if (isset($o['Skipped'])) $this->Skipped = $o['Skipped'];
if (isset($o['Created'])) $this->Created = JsonConverters::fromArray('string', $o['Created']);
if (isset($o['Quantities'])) $this->Quantities = JsonConverters::fromArray('BluebeamMappedRow', $o['Quantities']);
if (isset($o['Errors'])) $this->Errors = JsonConverters::fromArray('string', $o['Errors']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PunchCreated)) $o['PunchCreated'] = $this->PunchCreated;
if (isset($this->RfisCreated)) $o['RfisCreated'] = $this->RfisCreated;
if (isset($this->Skipped)) $o['Skipped'] = $this->Skipped;
if (isset($this->Created)) $o['Created'] = JsonConverters::toArray('string', $this->Created);
if (isset($this->Quantities)) $o['Quantities'] = JsonConverters::toArray('BluebeamMappedRow', $this->Quantities);
if (isset($this->Errors)) $o['Errors'] = JsonConverters::toArray('string', $this->Errors);
return empty($o) ? new class(){} : $o;
}
}
class BluebeamCommitResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var BluebeamCommitResult|null */
public ?BluebeamCommitResult $Result=null,
/** @var string|null */
public ?string $QuantitiesCsv=null,
/** @var int */
public int $QuantitiesWritten=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Result'])) $this->Result = JsonConverters::from('BluebeamCommitResult', $o['Result']);
if (isset($o['QuantitiesCsv'])) $this->QuantitiesCsv = $o['QuantitiesCsv'];
if (isset($o['QuantitiesWritten'])) $this->QuantitiesWritten = $o['QuantitiesWritten'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Result)) $o['Result'] = JsonConverters::to('BluebeamCommitResult', $this->Result);
if (isset($this->QuantitiesCsv)) $o['QuantitiesCsv'] = $this->QuantitiesCsv;
if (isset($this->QuantitiesWritten)) $o['QuantitiesWritten'] = $this->QuantitiesWritten;
return empty($o) ? new class(){} : $o;
}
}
class BluebeamCommitRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProjectID=0,
/** @var string|null */
public ?string $FileName=null,
/** @var array<BluebeamMappedRow>|null */
public ?array $Rows=null,
/** @var string|null */
public ?string $RfpDocumentUID=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['FileName'])) $this->FileName = $o['FileName'];
if (isset($o['Rows'])) $this->Rows = JsonConverters::fromArray('BluebeamMappedRow', $o['Rows']);
if (isset($o['RfpDocumentUID'])) $this->RfpDocumentUID = $o['RfpDocumentUID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->FileName)) $o['FileName'] = $this->FileName;
if (isset($this->Rows)) $o['Rows'] = JsonConverters::toArray('BluebeamMappedRow', $this->Rows);
if (isset($this->RfpDocumentUID)) $o['RfpDocumentUID'] = $this->RfpDocumentUID;
return empty($o) ? new class(){} : $o;
}
}
PHP BluebeamCommitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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/commit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<BluebeamCommitRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<FileName>String</FileName>
<ProjectID>0</ProjectID>
<RfpDocumentUID>00000000-0000-0000-0000-000000000000</RfpDocumentUID>
<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>
</BluebeamCommitRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BluebeamCommitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<QuantitiesCsv>String</QuantitiesCsv>
<QuantitiesWritten>0</QuantitiesWritten>
<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>
<Result>
<Created xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Created>
<Errors xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Errors>
<PunchCreated>0</PunchCreated>
<Quantities>
<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:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:KeyValueOfstringstring>
<d6p1:Key>String</d6p1:Key>
<d6p1:Value>String</d6p1:Value>
</d6p1: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>
</Quantities>
<RfisCreated>0</RfisCreated>
<Skipped>0</Skipped>
</Result>
</BluebeamCommitResponse>