| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly |
|---|
<?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 ResourcedPosition implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PositionTag=null,
/** @var float|null */
public ?float $Hours=null,
/** @var float|null */
public ?float $CrewSize=null,
/** @var float|null */
public ?float $Utilization=null,
/** @var float|null */
public ?float $FixedDays=null,
/** @var int|null */
public ?int $Headcount=null,
/** @var string|null */
public ?string $SourceReference=null,
/** @var string|null */
public ?string $Notes=null,
/** @var bool|null */
public ?bool $IsInCatalog=null,
/** @var int|null */
public ?int $ContactID=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PositionTag'])) $this->PositionTag = $o['PositionTag'];
if (isset($o['Hours'])) $this->Hours = $o['Hours'];
if (isset($o['CrewSize'])) $this->CrewSize = $o['CrewSize'];
if (isset($o['Utilization'])) $this->Utilization = $o['Utilization'];
if (isset($o['FixedDays'])) $this->FixedDays = $o['FixedDays'];
if (isset($o['Headcount'])) $this->Headcount = $o['Headcount'];
if (isset($o['SourceReference'])) $this->SourceReference = $o['SourceReference'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['IsInCatalog'])) $this->IsInCatalog = $o['IsInCatalog'];
if (isset($o['ContactID'])) $this->ContactID = $o['ContactID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PositionTag)) $o['PositionTag'] = $this->PositionTag;
if (isset($this->Hours)) $o['Hours'] = $this->Hours;
if (isset($this->CrewSize)) $o['CrewSize'] = $this->CrewSize;
if (isset($this->Utilization)) $o['Utilization'] = $this->Utilization;
if (isset($this->FixedDays)) $o['FixedDays'] = $this->FixedDays;
if (isset($this->Headcount)) $o['Headcount'] = $this->Headcount;
if (isset($this->SourceReference)) $o['SourceReference'] = $this->SourceReference;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->IsInCatalog)) $o['IsInCatalog'] = $this->IsInCatalog;
if (isset($this->ContactID)) $o['ContactID'] = $this->ContactID;
return empty($o) ? new class(){} : $o;
}
}
class ResourcedEquipment implements JsonSerializable
{
public function __construct(
/** @var int */
public int $EquipmentID=0,
/** @var string|null */
public ?string $EquipmentName=null,
/** @var string|null */
public ?string $MakeModel=null,
/** @var float|null */
public ?float $Quantity=null,
/** @var float|null */
public ?float $DurationDays=null,
/** @var float|null */
public ?float $Utilization=null,
/** @var float|null */
public ?float $FixedDays=null,
/** @var string|null */
public ?string $SourceReference=null,
/** @var string|null */
public ?string $Notes=null,
/** @var bool|null */
public ?bool $IsInCatalog=null,
/** @var int */
public int $SuggestedEquipmentID=0,
/** @var string|null */
public ?string $SuggestedEquipmentName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['EquipmentID'])) $this->EquipmentID = $o['EquipmentID'];
if (isset($o['EquipmentName'])) $this->EquipmentName = $o['EquipmentName'];
if (isset($o['MakeModel'])) $this->MakeModel = $o['MakeModel'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['DurationDays'])) $this->DurationDays = $o['DurationDays'];
if (isset($o['Utilization'])) $this->Utilization = $o['Utilization'];
if (isset($o['FixedDays'])) $this->FixedDays = $o['FixedDays'];
if (isset($o['SourceReference'])) $this->SourceReference = $o['SourceReference'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['IsInCatalog'])) $this->IsInCatalog = $o['IsInCatalog'];
if (isset($o['SuggestedEquipmentID'])) $this->SuggestedEquipmentID = $o['SuggestedEquipmentID'];
if (isset($o['SuggestedEquipmentName'])) $this->SuggestedEquipmentName = $o['SuggestedEquipmentName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->EquipmentID)) $o['EquipmentID'] = $this->EquipmentID;
if (isset($this->EquipmentName)) $o['EquipmentName'] = $this->EquipmentName;
if (isset($this->MakeModel)) $o['MakeModel'] = $this->MakeModel;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->DurationDays)) $o['DurationDays'] = $this->DurationDays;
if (isset($this->Utilization)) $o['Utilization'] = $this->Utilization;
if (isset($this->FixedDays)) $o['FixedDays'] = $this->FixedDays;
if (isset($this->SourceReference)) $o['SourceReference'] = $this->SourceReference;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->IsInCatalog)) $o['IsInCatalog'] = $this->IsInCatalog;
if (isset($this->SuggestedEquipmentID)) $o['SuggestedEquipmentID'] = $this->SuggestedEquipmentID;
if (isset($this->SuggestedEquipmentName)) $o['SuggestedEquipmentName'] = $this->SuggestedEquipmentName;
return empty($o) ? new class(){} : $o;
}
}
class ResourcedMaterial implements JsonSerializable
{
public function __construct(
/** @var int */
public int $MaterialID=0,
/** @var string|null */
public ?string $MaterialName=null,
/** @var string|null */
public ?string $MakeModel=null,
/** @var float|null */
public ?float $Quantity=null,
/** @var float|null */
public ?float $QuantityPerUnit=null,
/** @var string|null */
public ?string $Unit=null,
/** @var string|null */
public ?string $SourceReference=null,
/** @var string|null */
public ?string $Notes=null,
/** @var bool|null */
public ?bool $IsInCatalog=null,
/** @var int */
public int $SuggestedMaterialID=0,
/** @var string|null */
public ?string $SuggestedMaterialName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['MaterialID'])) $this->MaterialID = $o['MaterialID'];
if (isset($o['MaterialName'])) $this->MaterialName = $o['MaterialName'];
if (isset($o['MakeModel'])) $this->MakeModel = $o['MakeModel'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['QuantityPerUnit'])) $this->QuantityPerUnit = $o['QuantityPerUnit'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['SourceReference'])) $this->SourceReference = $o['SourceReference'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['IsInCatalog'])) $this->IsInCatalog = $o['IsInCatalog'];
if (isset($o['SuggestedMaterialID'])) $this->SuggestedMaterialID = $o['SuggestedMaterialID'];
if (isset($o['SuggestedMaterialName'])) $this->SuggestedMaterialName = $o['SuggestedMaterialName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->MaterialID)) $o['MaterialID'] = $this->MaterialID;
if (isset($this->MaterialName)) $o['MaterialName'] = $this->MaterialName;
if (isset($this->MakeModel)) $o['MakeModel'] = $this->MakeModel;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->QuantityPerUnit)) $o['QuantityPerUnit'] = $this->QuantityPerUnit;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->SourceReference)) $o['SourceReference'] = $this->SourceReference;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->IsInCatalog)) $o['IsInCatalog'] = $this->IsInCatalog;
if (isset($this->SuggestedMaterialID)) $o['SuggestedMaterialID'] = $this->SuggestedMaterialID;
if (isset($this->SuggestedMaterialName)) $o['SuggestedMaterialName'] = $this->SuggestedMaterialName;
return empty($o) ? new class(){} : $o;
}
}
class TaskResourcing implements JsonSerializable
{
public function __construct(
/** @var array<ResourcedPosition>|null */
public ?array $Positions=null,
/** @var array<ResourcedEquipment>|null */
public ?array $Equipment=null,
/** @var array<ResourcedMaterial>|null */
public ?array $Materials=null,
/** @var float|null */
public ?float $ResourcedForQuantity=null,
/** @var float|null */
public ?float $ProductionRatePerDay=null,
/** @var float|null */
public ?float $FixedDays=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Positions'])) $this->Positions = JsonConverters::fromArray('ResourcedPosition', $o['Positions']);
if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('ResourcedEquipment', $o['Equipment']);
if (isset($o['Materials'])) $this->Materials = JsonConverters::fromArray('ResourcedMaterial', $o['Materials']);
if (isset($o['ResourcedForQuantity'])) $this->ResourcedForQuantity = $o['ResourcedForQuantity'];
if (isset($o['ProductionRatePerDay'])) $this->ProductionRatePerDay = $o['ProductionRatePerDay'];
if (isset($o['FixedDays'])) $this->FixedDays = $o['FixedDays'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Positions)) $o['Positions'] = JsonConverters::toArray('ResourcedPosition', $this->Positions);
if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('ResourcedEquipment', $this->Equipment);
if (isset($this->Materials)) $o['Materials'] = JsonConverters::toArray('ResourcedMaterial', $this->Materials);
if (isset($this->ResourcedForQuantity)) $o['ResourcedForQuantity'] = $this->ResourcedForQuantity;
if (isset($this->ProductionRatePerDay)) $o['ProductionRatePerDay'] = $this->ProductionRatePerDay;
if (isset($this->FixedDays)) $o['FixedDays'] = $this->FixedDays;
return empty($o) ? new class(){} : $o;
}
}
class SpecRefView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Section=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Url=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Section'])) $this->Section = $o['Section'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Url'])) $this->Url = $o['Url'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Section)) $o['Section'] = $this->Section;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Url)) $o['Url'] = $this->Url;
return empty($o) ? new class(){} : $o;
}
}
class DodItemView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Key=null,
/** @var string|null */
public ?string $Text=null,
/** @var bool|null */
public ?bool $Checked=null,
/** @var string|null */
public ?string $Source=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Key'])) $this->Key = $o['Key'];
if (isset($o['Text'])) $this->Text = $o['Text'];
if (isset($o['Checked'])) $this->Checked = $o['Checked'];
if (isset($o['Source'])) $this->Source = $o['Source'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Key)) $o['Key'] = $this->Key;
if (isset($this->Text)) $o['Text'] = $this->Text;
if (isset($this->Checked)) $o['Checked'] = $this->Checked;
if (isset($this->Source)) $o['Source'] = $this->Source;
return empty($o) ? new class(){} : $o;
}
}
class WorkPackageView implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $HasPackage=null,
/** @var string|null */
public ?string $Scope=null,
/** @var string|null */
public ?string $LimitsOfWork=null,
/** @var array<SpecRefView>|null */
public ?array $SpecRefs=null,
/** @var array<string>|null */
public ?array $Constraints=null,
/** @var array<string>|null */
public ?array $HoldPoints=null,
/** @var array<DodItemView>|null */
public ?array $Dod=null,
/** @var string|null */
public ?string $SafetyNote=null,
/** @var string|null */
public ?string $Provenance=null,
/** @var string|null */
public ?string $SpecBook=null,
/** @var bool|null */
public ?bool $UserEdited=null,
/** @var string|null */
public ?string $RedraftNote=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HasPackage'])) $this->HasPackage = $o['HasPackage'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
if (isset($o['LimitsOfWork'])) $this->LimitsOfWork = $o['LimitsOfWork'];
if (isset($o['SpecRefs'])) $this->SpecRefs = JsonConverters::fromArray('SpecRefView', $o['SpecRefs']);
if (isset($o['Constraints'])) $this->Constraints = JsonConverters::fromArray('string', $o['Constraints']);
if (isset($o['HoldPoints'])) $this->HoldPoints = JsonConverters::fromArray('string', $o['HoldPoints']);
if (isset($o['Dod'])) $this->Dod = JsonConverters::fromArray('DodItemView', $o['Dod']);
if (isset($o['SafetyNote'])) $this->SafetyNote = $o['SafetyNote'];
if (isset($o['Provenance'])) $this->Provenance = $o['Provenance'];
if (isset($o['SpecBook'])) $this->SpecBook = $o['SpecBook'];
if (isset($o['UserEdited'])) $this->UserEdited = $o['UserEdited'];
if (isset($o['RedraftNote'])) $this->RedraftNote = $o['RedraftNote'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HasPackage)) $o['HasPackage'] = $this->HasPackage;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
if (isset($this->LimitsOfWork)) $o['LimitsOfWork'] = $this->LimitsOfWork;
if (isset($this->SpecRefs)) $o['SpecRefs'] = JsonConverters::toArray('SpecRefView', $this->SpecRefs);
if (isset($this->Constraints)) $o['Constraints'] = JsonConverters::toArray('string', $this->Constraints);
if (isset($this->HoldPoints)) $o['HoldPoints'] = JsonConverters::toArray('string', $this->HoldPoints);
if (isset($this->Dod)) $o['Dod'] = JsonConverters::toArray('DodItemView', $this->Dod);
if (isset($this->SafetyNote)) $o['SafetyNote'] = $this->SafetyNote;
if (isset($this->Provenance)) $o['Provenance'] = $this->Provenance;
if (isset($this->SpecBook)) $o['SpecBook'] = $this->SpecBook;
if (isset($this->UserEdited)) $o['UserEdited'] = $this->UserEdited;
if (isset($this->RedraftNote)) $o['RedraftNote'] = $this->RedraftNote;
return empty($o) ? new class(){} : $o;
}
}
class EstimateCrewLineResult implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Role=null,
/** @var float */
public float $Hours=0.0,
/** @var float */
public float $StHours=0.0,
/** @var float */
public float $OtHours=0.0,
/** @var float */
public float $Rrop=0.0,
/** @var float */
public float $StCost=0.0,
/** @var float */
public float $OtCost=0.0,
/** @var float */
public float $Cost=0.0,
/** @var float */
public float $FringeCost=0.0,
/** @var bool|null */
public ?bool $PremiumApplied=null,
/** @var bool|null */
public ?bool $HasOt=null,
/** @var bool|null */
public ?bool $NeedsRate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Role'])) $this->Role = $o['Role'];
if (isset($o['Hours'])) $this->Hours = $o['Hours'];
if (isset($o['StHours'])) $this->StHours = $o['StHours'];
if (isset($o['OtHours'])) $this->OtHours = $o['OtHours'];
if (isset($o['Rrop'])) $this->Rrop = $o['Rrop'];
if (isset($o['StCost'])) $this->StCost = $o['StCost'];
if (isset($o['OtCost'])) $this->OtCost = $o['OtCost'];
if (isset($o['Cost'])) $this->Cost = $o['Cost'];
if (isset($o['FringeCost'])) $this->FringeCost = $o['FringeCost'];
if (isset($o['PremiumApplied'])) $this->PremiumApplied = $o['PremiumApplied'];
if (isset($o['HasOt'])) $this->HasOt = $o['HasOt'];
if (isset($o['NeedsRate'])) $this->NeedsRate = $o['NeedsRate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Role)) $o['Role'] = $this->Role;
if (isset($this->Hours)) $o['Hours'] = $this->Hours;
if (isset($this->StHours)) $o['StHours'] = $this->StHours;
if (isset($this->OtHours)) $o['OtHours'] = $this->OtHours;
if (isset($this->Rrop)) $o['Rrop'] = $this->Rrop;
if (isset($this->StCost)) $o['StCost'] = $this->StCost;
if (isset($this->OtCost)) $o['OtCost'] = $this->OtCost;
if (isset($this->Cost)) $o['Cost'] = $this->Cost;
if (isset($this->FringeCost)) $o['FringeCost'] = $this->FringeCost;
if (isset($this->PremiumApplied)) $o['PremiumApplied'] = $this->PremiumApplied;
if (isset($this->HasOt)) $o['HasOt'] = $this->HasOt;
if (isset($this->NeedsRate)) $o['NeedsRate'] = $this->NeedsRate;
return empty($o) ? new class(){} : $o;
}
}
class EstimateEquipmentLineResult implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var float */
public float $Quantity=0.0,
/** @var float|null */
public ?float $Rate=null,
/** @var bool|null */
public ?bool $NeedsRate=null,
/** @var float */
public float $MobCost=0.0,
/** @var float */
public float $Cost=0.0,
/** @var bool|null */
public ?bool $IsAvailabilityTracked=null,
/** @var bool|null */
public ?bool $IsOwned=null,
/** @var string|null */
public ?string $AvailabilityLabel=null,
/** @var string|null */
public ?string $FreedFromProject=null,
/** @var DateTime|null */
public ?DateTime $AvailableFrom=null,
/** @var string|null */
public ?string $RateKey=null,
/** @var string|null */
public ?string $RentalExplain=null,
/** @var float */
public float $UsageDays=0.0,
/** @var float */
public float $BilledDays=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Rate'])) $this->Rate = $o['Rate'];
if (isset($o['NeedsRate'])) $this->NeedsRate = $o['NeedsRate'];
if (isset($o['MobCost'])) $this->MobCost = $o['MobCost'];
if (isset($o['Cost'])) $this->Cost = $o['Cost'];
if (isset($o['IsAvailabilityTracked'])) $this->IsAvailabilityTracked = $o['IsAvailabilityTracked'];
if (isset($o['IsOwned'])) $this->IsOwned = $o['IsOwned'];
if (isset($o['AvailabilityLabel'])) $this->AvailabilityLabel = $o['AvailabilityLabel'];
if (isset($o['FreedFromProject'])) $this->FreedFromProject = $o['FreedFromProject'];
if (isset($o['AvailableFrom'])) $this->AvailableFrom = JsonConverters::from('DateTime', $o['AvailableFrom']);
if (isset($o['RateKey'])) $this->RateKey = $o['RateKey'];
if (isset($o['RentalExplain'])) $this->RentalExplain = $o['RentalExplain'];
if (isset($o['UsageDays'])) $this->UsageDays = $o['UsageDays'];
if (isset($o['BilledDays'])) $this->BilledDays = $o['BilledDays'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Rate)) $o['Rate'] = $this->Rate;
if (isset($this->NeedsRate)) $o['NeedsRate'] = $this->NeedsRate;
if (isset($this->MobCost)) $o['MobCost'] = $this->MobCost;
if (isset($this->Cost)) $o['Cost'] = $this->Cost;
if (isset($this->IsAvailabilityTracked)) $o['IsAvailabilityTracked'] = $this->IsAvailabilityTracked;
if (isset($this->IsOwned)) $o['IsOwned'] = $this->IsOwned;
if (isset($this->AvailabilityLabel)) $o['AvailabilityLabel'] = $this->AvailabilityLabel;
if (isset($this->FreedFromProject)) $o['FreedFromProject'] = $this->FreedFromProject;
if (isset($this->AvailableFrom)) $o['AvailableFrom'] = JsonConverters::to('DateTime', $this->AvailableFrom);
if (isset($this->RateKey)) $o['RateKey'] = $this->RateKey;
if (isset($this->RentalExplain)) $o['RentalExplain'] = $this->RentalExplain;
if (isset($this->UsageDays)) $o['UsageDays'] = $this->UsageDays;
if (isset($this->BilledDays)) $o['BilledDays'] = $this->BilledDays;
return empty($o) ? new class(){} : $o;
}
}
class EstimateMaterialLineResult implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var float */
public float $Quantity=0.0,
/** @var string|null */
public ?string $Unit=null,
/** @var float|null */
public ?float $Rate=null,
/** @var bool|null */
public ?bool $NeedsRate=null,
/** @var float */
public float $Cost=0.0,
/** @var string|null */
public ?string $RateKey=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['Rate'])) $this->Rate = $o['Rate'];
if (isset($o['NeedsRate'])) $this->NeedsRate = $o['NeedsRate'];
if (isset($o['Cost'])) $this->Cost = $o['Cost'];
if (isset($o['RateKey'])) $this->RateKey = $o['RateKey'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->Rate)) $o['Rate'] = $this->Rate;
if (isset($this->NeedsRate)) $o['NeedsRate'] = $this->NeedsRate;
if (isset($this->Cost)) $o['Cost'] = $this->Cost;
if (isset($this->RateKey)) $o['RateKey'] = $this->RateKey;
return empty($o) ? new class(){} : $o;
}
}
class EstimateSubcontractLine implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Vendor=null,
/** @var float */
public float $Amount=0.0,
/** @var string|null */
public ?string $Scope=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Vendor'])) $this->Vendor = $o['Vendor'];
if (isset($o['Amount'])) $this->Amount = $o['Amount'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Vendor)) $o['Vendor'] = $this->Vendor;
if (isset($this->Amount)) $o['Amount'] = $this->Amount;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
return empty($o) ? new class(){} : $o;
}
}
class EstimateJobResult implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var array<int>|null */
public ?array $DependsOn=null,
/** @var string|null */
public ?string $ItemNo=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Category=null,
/** @var string|null */
public ?string $SourceRef=null,
/** @var string|null */
public ?string $Unit=null,
/** @var float */
public float $Quantity=0.0,
/** @var string|null */
public ?string $PatternCode=null,
/** @var int */
public int $Workdays=0,
/** @var float */
public float $HoursPerDay=0.0,
/** @var bool|null */
public ?bool $IsNight=null,
/** @var float */
public float $WeeklyHours=0.0,
/** @var float */
public float $OtFraction=0.0,
/** @var float */
public float $Days=0.0,
/** @var float|null */
public ?float $EffectiveProdPerDay=null,
/** @var bool|null */
public ?bool $CrewPremiumApplied=null,
/** @var WorkPackageView|null */
public ?WorkPackageView $WorkPackage=null,
/** @var array<EstimateCrewLineResult>|null */
public ?array $Crew=null,
/** @var array<EstimateEquipmentLineResult>|null */
public ?array $Equipment=null,
/** @var array<EstimateMaterialLineResult>|null */
public ?array $Materials=null,
/** @var array<EstimateSubcontractLine>|null */
public ?array $Subcontracts=null,
/** @var float */
public float $CrewCost=0.0,
/** @var float */
public float $FringeCost=0.0,
/** @var float */
public float $EquipmentCost=0.0,
/** @var float */
public float $MaterialCost=0.0,
/** @var float */
public float $SubcontractCost=0.0,
/** @var float */
public float $Direct=0.0,
/** @var string|null */
public ?string $PricingBasis=null,
/** @var string|null */
public ?string $PricingRuleId=null,
/** @var float|null */
public ?float $PricingBandP25=null,
/** @var float|null */
public ?float $PricingBandP75=null,
/** @var int|null */
public ?int $PricingBandN=null,
/** @var string|null */
public ?string $PricingBandLabel=null,
/** @var float|null */
public ?float $BenchmarkUnitPrice=null,
/** @var float|null */
public ?float $BenchmarkRateMin=null,
/** @var float|null */
public ?float $BenchmarkRateMax=null,
/** @var int|null */
public ?int $BenchmarkSampleSize=null,
/** @var float|null */
public ?float $BenchmarkP25=null,
/** @var float|null */
public ?float $BenchmarkP75=null,
/** @var string|null */
public ?string $BenchmarkBasis=null,
/** @var float|null */
public ?float $UnitPriceOverride=null,
/** @var string|null */
public ?string $OverrideBasis=null,
/** @var float|null */
public ?float $ReferencePrice=null,
/** @var float|null */
public ?float $ReferenceRangeMin=null,
/** @var float|null */
public ?float $ReferenceRangeMax=null,
/** @var int|null */
public ?int $ReferenceN=null,
/** @var DateTime|null */
public ?DateTime $ReferenceDate=null,
/** @var string|null */
public ?string $ReferenceBasis=null,
/** @var string|null */
public ?string $ReferenceUrl=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['DependsOn'])) $this->DependsOn = JsonConverters::fromArray('int', $o['DependsOn']);
if (isset($o['ItemNo'])) $this->ItemNo = $o['ItemNo'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['SourceRef'])) $this->SourceRef = $o['SourceRef'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['PatternCode'])) $this->PatternCode = $o['PatternCode'];
if (isset($o['Workdays'])) $this->Workdays = $o['Workdays'];
if (isset($o['HoursPerDay'])) $this->HoursPerDay = $o['HoursPerDay'];
if (isset($o['IsNight'])) $this->IsNight = $o['IsNight'];
if (isset($o['WeeklyHours'])) $this->WeeklyHours = $o['WeeklyHours'];
if (isset($o['OtFraction'])) $this->OtFraction = $o['OtFraction'];
if (isset($o['Days'])) $this->Days = $o['Days'];
if (isset($o['EffectiveProdPerDay'])) $this->EffectiveProdPerDay = $o['EffectiveProdPerDay'];
if (isset($o['CrewPremiumApplied'])) $this->CrewPremiumApplied = $o['CrewPremiumApplied'];
if (isset($o['WorkPackage'])) $this->WorkPackage = JsonConverters::from('WorkPackageView', $o['WorkPackage']);
if (isset($o['Crew'])) $this->Crew = JsonConverters::fromArray('EstimateCrewLineResult', $o['Crew']);
if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('EstimateEquipmentLineResult', $o['Equipment']);
if (isset($o['Materials'])) $this->Materials = JsonConverters::fromArray('EstimateMaterialLineResult', $o['Materials']);
if (isset($o['Subcontracts'])) $this->Subcontracts = JsonConverters::fromArray('EstimateSubcontractLine', $o['Subcontracts']);
if (isset($o['CrewCost'])) $this->CrewCost = $o['CrewCost'];
if (isset($o['FringeCost'])) $this->FringeCost = $o['FringeCost'];
if (isset($o['EquipmentCost'])) $this->EquipmentCost = $o['EquipmentCost'];
if (isset($o['MaterialCost'])) $this->MaterialCost = $o['MaterialCost'];
if (isset($o['SubcontractCost'])) $this->SubcontractCost = $o['SubcontractCost'];
if (isset($o['Direct'])) $this->Direct = $o['Direct'];
if (isset($o['PricingBasis'])) $this->PricingBasis = $o['PricingBasis'];
if (isset($o['PricingRuleId'])) $this->PricingRuleId = $o['PricingRuleId'];
if (isset($o['PricingBandP25'])) $this->PricingBandP25 = $o['PricingBandP25'];
if (isset($o['PricingBandP75'])) $this->PricingBandP75 = $o['PricingBandP75'];
if (isset($o['PricingBandN'])) $this->PricingBandN = $o['PricingBandN'];
if (isset($o['PricingBandLabel'])) $this->PricingBandLabel = $o['PricingBandLabel'];
if (isset($o['BenchmarkUnitPrice'])) $this->BenchmarkUnitPrice = $o['BenchmarkUnitPrice'];
if (isset($o['BenchmarkRateMin'])) $this->BenchmarkRateMin = $o['BenchmarkRateMin'];
if (isset($o['BenchmarkRateMax'])) $this->BenchmarkRateMax = $o['BenchmarkRateMax'];
if (isset($o['BenchmarkSampleSize'])) $this->BenchmarkSampleSize = $o['BenchmarkSampleSize'];
if (isset($o['BenchmarkP25'])) $this->BenchmarkP25 = $o['BenchmarkP25'];
if (isset($o['BenchmarkP75'])) $this->BenchmarkP75 = $o['BenchmarkP75'];
if (isset($o['BenchmarkBasis'])) $this->BenchmarkBasis = $o['BenchmarkBasis'];
if (isset($o['UnitPriceOverride'])) $this->UnitPriceOverride = $o['UnitPriceOverride'];
if (isset($o['OverrideBasis'])) $this->OverrideBasis = $o['OverrideBasis'];
if (isset($o['ReferencePrice'])) $this->ReferencePrice = $o['ReferencePrice'];
if (isset($o['ReferenceRangeMin'])) $this->ReferenceRangeMin = $o['ReferenceRangeMin'];
if (isset($o['ReferenceRangeMax'])) $this->ReferenceRangeMax = $o['ReferenceRangeMax'];
if (isset($o['ReferenceN'])) $this->ReferenceN = $o['ReferenceN'];
if (isset($o['ReferenceDate'])) $this->ReferenceDate = JsonConverters::from('DateTime', $o['ReferenceDate']);
if (isset($o['ReferenceBasis'])) $this->ReferenceBasis = $o['ReferenceBasis'];
if (isset($o['ReferenceUrl'])) $this->ReferenceUrl = $o['ReferenceUrl'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->DependsOn)) $o['DependsOn'] = JsonConverters::toArray('int', $this->DependsOn);
if (isset($this->ItemNo)) $o['ItemNo'] = $this->ItemNo;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->SourceRef)) $o['SourceRef'] = $this->SourceRef;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->PatternCode)) $o['PatternCode'] = $this->PatternCode;
if (isset($this->Workdays)) $o['Workdays'] = $this->Workdays;
if (isset($this->HoursPerDay)) $o['HoursPerDay'] = $this->HoursPerDay;
if (isset($this->IsNight)) $o['IsNight'] = $this->IsNight;
if (isset($this->WeeklyHours)) $o['WeeklyHours'] = $this->WeeklyHours;
if (isset($this->OtFraction)) $o['OtFraction'] = $this->OtFraction;
if (isset($this->Days)) $o['Days'] = $this->Days;
if (isset($this->EffectiveProdPerDay)) $o['EffectiveProdPerDay'] = $this->EffectiveProdPerDay;
if (isset($this->CrewPremiumApplied)) $o['CrewPremiumApplied'] = $this->CrewPremiumApplied;
if (isset($this->WorkPackage)) $o['WorkPackage'] = JsonConverters::to('WorkPackageView', $this->WorkPackage);
if (isset($this->Crew)) $o['Crew'] = JsonConverters::toArray('EstimateCrewLineResult', $this->Crew);
if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('EstimateEquipmentLineResult', $this->Equipment);
if (isset($this->Materials)) $o['Materials'] = JsonConverters::toArray('EstimateMaterialLineResult', $this->Materials);
if (isset($this->Subcontracts)) $o['Subcontracts'] = JsonConverters::toArray('EstimateSubcontractLine', $this->Subcontracts);
if (isset($this->CrewCost)) $o['CrewCost'] = $this->CrewCost;
if (isset($this->FringeCost)) $o['FringeCost'] = $this->FringeCost;
if (isset($this->EquipmentCost)) $o['EquipmentCost'] = $this->EquipmentCost;
if (isset($this->MaterialCost)) $o['MaterialCost'] = $this->MaterialCost;
if (isset($this->SubcontractCost)) $o['SubcontractCost'] = $this->SubcontractCost;
if (isset($this->Direct)) $o['Direct'] = $this->Direct;
if (isset($this->PricingBasis)) $o['PricingBasis'] = $this->PricingBasis;
if (isset($this->PricingRuleId)) $o['PricingRuleId'] = $this->PricingRuleId;
if (isset($this->PricingBandP25)) $o['PricingBandP25'] = $this->PricingBandP25;
if (isset($this->PricingBandP75)) $o['PricingBandP75'] = $this->PricingBandP75;
if (isset($this->PricingBandN)) $o['PricingBandN'] = $this->PricingBandN;
if (isset($this->PricingBandLabel)) $o['PricingBandLabel'] = $this->PricingBandLabel;
if (isset($this->BenchmarkUnitPrice)) $o['BenchmarkUnitPrice'] = $this->BenchmarkUnitPrice;
if (isset($this->BenchmarkRateMin)) $o['BenchmarkRateMin'] = $this->BenchmarkRateMin;
if (isset($this->BenchmarkRateMax)) $o['BenchmarkRateMax'] = $this->BenchmarkRateMax;
if (isset($this->BenchmarkSampleSize)) $o['BenchmarkSampleSize'] = $this->BenchmarkSampleSize;
if (isset($this->BenchmarkP25)) $o['BenchmarkP25'] = $this->BenchmarkP25;
if (isset($this->BenchmarkP75)) $o['BenchmarkP75'] = $this->BenchmarkP75;
if (isset($this->BenchmarkBasis)) $o['BenchmarkBasis'] = $this->BenchmarkBasis;
if (isset($this->UnitPriceOverride)) $o['UnitPriceOverride'] = $this->UnitPriceOverride;
if (isset($this->OverrideBasis)) $o['OverrideBasis'] = $this->OverrideBasis;
if (isset($this->ReferencePrice)) $o['ReferencePrice'] = $this->ReferencePrice;
if (isset($this->ReferenceRangeMin)) $o['ReferenceRangeMin'] = $this->ReferenceRangeMin;
if (isset($this->ReferenceRangeMax)) $o['ReferenceRangeMax'] = $this->ReferenceRangeMax;
if (isset($this->ReferenceN)) $o['ReferenceN'] = $this->ReferenceN;
if (isset($this->ReferenceDate)) $o['ReferenceDate'] = JsonConverters::to('DateTime', $this->ReferenceDate);
if (isset($this->ReferenceBasis)) $o['ReferenceBasis'] = $this->ReferenceBasis;
if (isset($this->ReferenceUrl)) $o['ReferenceUrl'] = $this->ReferenceUrl;
return empty($o) ? new class(){} : $o;
}
}
class ApplyAssemblyResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var int */
public int $TaskSeq=0,
/** @var string|null */
public ?string $TemplateUID=null,
/** @var string|null */
public ?string $TemplateName=null,
/** @var float */
public float $Quantity=0.0,
/** @var string|null */
public ?string $Unit=null,
/** @var TaskResourcing|null */
public ?TaskResourcing $Resourcing=null,
/** @var EstimateJobResult|null */
public ?EstimateJobResult $Job=null,
/** @var string|null */
public ?string $Headline=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['TaskSeq'])) $this->TaskSeq = $o['TaskSeq'];
if (isset($o['TemplateUID'])) $this->TemplateUID = $o['TemplateUID'];
if (isset($o['TemplateName'])) $this->TemplateName = $o['TemplateName'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['Resourcing'])) $this->Resourcing = JsonConverters::from('TaskResourcing', $o['Resourcing']);
if (isset($o['Job'])) $this->Job = JsonConverters::from('EstimateJobResult', $o['Job']);
if (isset($o['Headline'])) $this->Headline = $o['Headline'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->TaskSeq)) $o['TaskSeq'] = $this->TaskSeq;
if (isset($this->TemplateUID)) $o['TemplateUID'] = $this->TemplateUID;
if (isset($this->TemplateName)) $o['TemplateName'] = $this->TemplateName;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->Resourcing)) $o['Resourcing'] = JsonConverters::to('TaskResourcing', $this->Resourcing);
if (isset($this->Job)) $o['Job'] = JsonConverters::to('EstimateJobResult', $this->Job);
if (isset($this->Headline)) $o['Headline'] = $this->Headline;
return empty($o) ? new class(){} : $o;
}
}
class ApplyAssemblyRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RfpDocumentUID='',
/** @var int */
public int $TaskSeq=0,
/** @var string */
public string $TemplateUID=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RfpDocumentUID'])) $this->RfpDocumentUID = $o['RfpDocumentUID'];
if (isset($o['TaskSeq'])) $this->TaskSeq = $o['TaskSeq'];
if (isset($o['TemplateUID'])) $this->TemplateUID = $o['TemplateUID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RfpDocumentUID)) $o['RfpDocumentUID'] = $this->RfpDocumentUID;
if (isset($this->TaskSeq)) $o['TaskSeq'] = $this->TaskSeq;
if (isset($this->TemplateUID)) $o['TemplateUID'] = $this->TemplateUID;
return empty($o) ? new class(){} : $o;
}
}
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/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"RfpDocumentUID":"00000000000000000000000000000000","TaskSeq":0,"TemplateUID":"00000000000000000000000000000000"}
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"}},"TaskSeq":0,"TemplateUID":"00000000000000000000000000000000","TemplateName":"String","Quantity":0,"Unit":"String","Resourcing":{"Positions":[{"PositionTag":"String","Hours":0,"CrewSize":0,"Utilization":0,"FixedDays":0,"Headcount":0,"SourceReference":"String","Notes":"String","IsInCatalog":false,"ContactID":0}],"Equipment":[{"EquipmentID":0,"EquipmentName":"String","MakeModel":"String","Quantity":0,"DurationDays":0,"Utilization":0,"FixedDays":0,"SourceReference":"String","Notes":"String","IsInCatalog":false,"SuggestedEquipmentID":0,"SuggestedEquipmentName":"String"}],"Materials":[{"MaterialID":0,"MaterialName":"String","MakeModel":"String","Quantity":0,"QuantityPerUnit":0,"Unit":"String","SourceReference":"String","Notes":"String","IsInCatalog":false,"SuggestedMaterialID":0,"SuggestedMaterialName":"String"}],"ResourcedForQuantity":0,"ProductionRatePerDay":0,"FixedDays":0},"Job":{"Seq":0,"DependsOn":[0],"ItemNo":"String","Name":"String","Category":"String","SourceRef":"String","Unit":"String","Quantity":0,"PatternCode":"String","Workdays":0,"HoursPerDay":0,"IsNight":false,"WeeklyHours":0,"OtFraction":0,"Days":0,"EffectiveProdPerDay":0,"CrewPremiumApplied":false,"WorkPackage":{"HasPackage":false,"Scope":"String","LimitsOfWork":"String","SpecRefs":[{"Section":"String","Title":"String","Url":"String"}],"Constraints":["String"],"HoldPoints":["String"],"Dod":[{"Key":"String","Text":"String","Checked":false,"Source":"String"}],"SafetyNote":"String","Provenance":"String","SpecBook":"String","UserEdited":false,"RedraftNote":"String"},"Crew":[{"Role":"String","Hours":0,"StHours":0,"OtHours":0,"Rrop":0,"StCost":0,"OtCost":0,"Cost":0,"FringeCost":0,"PremiumApplied":false,"HasOt":false,"NeedsRate":false}],"Equipment":[{"Name":"String","Quantity":0,"Rate":0,"NeedsRate":false,"MobCost":0,"Cost":0,"IsAvailabilityTracked":false,"IsOwned":false,"AvailabilityLabel":"String","FreedFromProject":"String","AvailableFrom":"0001-01-01T00:00:00.0000000","RateKey":"String","RentalExplain":"String","UsageDays":0,"BilledDays":0}],"Materials":[{"Name":"String","Quantity":0,"Unit":"String","Rate":0,"NeedsRate":false,"Cost":0,"RateKey":"String"}],"Subcontracts":[{"Vendor":"String","Amount":0,"Scope":"String"}],"CrewCost":0,"FringeCost":0,"EquipmentCost":0,"MaterialCost":0,"SubcontractCost":0,"Direct":0,"PricingBasis":"String","PricingRuleId":"String","PricingBandP25":0,"PricingBandP75":0,"PricingBandN":0,"PricingBandLabel":"String","BenchmarkUnitPrice":0,"BenchmarkRateMin":0,"BenchmarkRateMax":0,"BenchmarkSampleSize":0,"BenchmarkP25":0,"BenchmarkP75":0,"BenchmarkBasis":"String","UnitPriceOverride":0,"OverrideBasis":"String","ReferencePrice":0,"ReferenceRangeMin":0,"ReferenceRangeMax":0,"ReferenceN":0,"ReferenceDate":"0001-01-01T00:00:00.0000000","ReferenceBasis":"String","ReferenceUrl":"String"},"Headline":"String"}