Trendsic Platform Service

<back to all web services

EstimateReviewActionRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/Rfp/{RfpDocumentUID}/Review/{TaskSeq}/{ReviewAction}
<?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 EstimateSettingsView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RfpEstimateID=0,
        /** @var DateTime|null */
        public ?DateTime $StartDate=null,
        /** @var DateTime|null */
        public ?DateTime $DeadlineDate=null,
        /** @var int */
        public int $WorkdaysPerWeek=0,
        /** @var float */
        public float $HoursPerDay=0.0,
        /** @var float */
        public float $WeatherPct=0.0,
        /** @var float */
        public float $OhpPct=0.0,
        /** @var float */
        public float $ContingencyPct=0.0,
        /** @var float */
        public float $BondPct=0.0,
        /** @var array<DateTime>|null */
        public ?array $Holidays=null,
        /** @var DateTime|null */
        public ?DateTime $AppliedStartDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RfpEstimateID'])) $this->RfpEstimateID = $o['RfpEstimateID'];
        if (isset($o['StartDate'])) $this->StartDate = JsonConverters::from('DateTime', $o['StartDate']);
        if (isset($o['DeadlineDate'])) $this->DeadlineDate = JsonConverters::from('DateTime', $o['DeadlineDate']);
        if (isset($o['WorkdaysPerWeek'])) $this->WorkdaysPerWeek = $o['WorkdaysPerWeek'];
        if (isset($o['HoursPerDay'])) $this->HoursPerDay = $o['HoursPerDay'];
        if (isset($o['WeatherPct'])) $this->WeatherPct = $o['WeatherPct'];
        if (isset($o['OhpPct'])) $this->OhpPct = $o['OhpPct'];
        if (isset($o['ContingencyPct'])) $this->ContingencyPct = $o['ContingencyPct'];
        if (isset($o['BondPct'])) $this->BondPct = $o['BondPct'];
        if (isset($o['Holidays'])) $this->Holidays = JsonConverters::fromArray('DateTime', $o['Holidays']);
        if (isset($o['AppliedStartDate'])) $this->AppliedStartDate = JsonConverters::from('DateTime', $o['AppliedStartDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RfpEstimateID)) $o['RfpEstimateID'] = $this->RfpEstimateID;
        if (isset($this->StartDate)) $o['StartDate'] = JsonConverters::to('DateTime', $this->StartDate);
        if (isset($this->DeadlineDate)) $o['DeadlineDate'] = JsonConverters::to('DateTime', $this->DeadlineDate);
        if (isset($this->WorkdaysPerWeek)) $o['WorkdaysPerWeek'] = $this->WorkdaysPerWeek;
        if (isset($this->HoursPerDay)) $o['HoursPerDay'] = $this->HoursPerDay;
        if (isset($this->WeatherPct)) $o['WeatherPct'] = $this->WeatherPct;
        if (isset($this->OhpPct)) $o['OhpPct'] = $this->OhpPct;
        if (isset($this->ContingencyPct)) $o['ContingencyPct'] = $this->ContingencyPct;
        if (isset($this->BondPct)) $o['BondPct'] = $this->BondPct;
        if (isset($this->Holidays)) $o['Holidays'] = JsonConverters::toArray('DateTime', $this->Holidays);
        if (isset($this->AppliedStartDate)) $o['AppliedStartDate'] = JsonConverters::to('DateTime', $this->AppliedStartDate);
        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 EstimateCrewLineView 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 bool|null */
        public ?bool $HasOt=null,
        /** @var bool|null */
        public ?bool $PremiumApplied=null,
        /** @var bool|null */
        public ?bool $NeedsRate=null,
        /** @var string|null */
        public ?string $RateKey=null,
        /** @var string|null */
        public ?string $Chip=null,
        /** @var float|null */
        public ?float $Rrop=null,
        /** @var float|null */
        public ?float $StCost=null,
        /** @var float|null */
        public ?float $OtCost=null,
        /** @var float|null */
        public ?float $Cost=null,
        /** @var float|null */
        public ?float $FringeCost=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['HasOt'])) $this->HasOt = $o['HasOt'];
        if (isset($o['PremiumApplied'])) $this->PremiumApplied = $o['PremiumApplied'];
        if (isset($o['NeedsRate'])) $this->NeedsRate = $o['NeedsRate'];
        if (isset($o['RateKey'])) $this->RateKey = $o['RateKey'];
        if (isset($o['Chip'])) $this->Chip = $o['Chip'];
        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'];
    }
    
    /** @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->HasOt)) $o['HasOt'] = $this->HasOt;
        if (isset($this->PremiumApplied)) $o['PremiumApplied'] = $this->PremiumApplied;
        if (isset($this->NeedsRate)) $o['NeedsRate'] = $this->NeedsRate;
        if (isset($this->RateKey)) $o['RateKey'] = $this->RateKey;
        if (isset($this->Chip)) $o['Chip'] = $this->Chip;
        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;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateEquipmentLineView 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 $Chip=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['Chip'])) $this->Chip = $o['Chip'];
        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->Chip)) $o['Chip'] = $this->Chip;
        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 EstimateMaterialLineView 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,
        /** @var string|null */
        public ?string $Chip=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'];
        if (isset($o['Chip'])) $this->Chip = $o['Chip'];
    }
    
    /** @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;
        if (isset($this->Chip)) $o['Chip'] = $this->Chip;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateSubcontractView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $EstimateSubcontractID=0,
        /** @var int */
        public int $TaskSeq=0,
        /** @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['EstimateSubcontractID'])) $this->EstimateSubcontractID = $o['EstimateSubcontractID'];
        if (isset($o['TaskSeq'])) $this->TaskSeq = $o['TaskSeq'];
        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->EstimateSubcontractID)) $o['EstimateSubcontractID'] = $this->EstimateSubcontractID;
        if (isset($this->TaskSeq)) $o['TaskSeq'] = $this->TaskSeq;
        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 EstimateJobView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Seq=0,
        /** @var WorkPackageView|null */
        public ?WorkPackageView $WorkPackage=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 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 float|null */
        public ?float $BenchmarkUnitPrice=null,
        /** @var array<EstimateCrewLineView>|null */
        public ?array $Crew=null,
        /** @var array<EstimateEquipmentLineView>|null */
        public ?array $Equipment=null,
        /** @var array<EstimateMaterialLineView>|null */
        public ?array $Materials=null,
        /** @var array<EstimateSubcontractView>|null */
        public ?array $Subcontracts=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Seq'])) $this->Seq = $o['Seq'];
        if (isset($o['WorkPackage'])) $this->WorkPackage = JsonConverters::from('WorkPackageView', $o['WorkPackage']);
        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['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['BenchmarkUnitPrice'])) $this->BenchmarkUnitPrice = $o['BenchmarkUnitPrice'];
        if (isset($o['Crew'])) $this->Crew = JsonConverters::fromArray('EstimateCrewLineView', $o['Crew']);
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('EstimateEquipmentLineView', $o['Equipment']);
        if (isset($o['Materials'])) $this->Materials = JsonConverters::fromArray('EstimateMaterialLineView', $o['Materials']);
        if (isset($o['Subcontracts'])) $this->Subcontracts = JsonConverters::fromArray('EstimateSubcontractView', $o['Subcontracts']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Seq)) $o['Seq'] = $this->Seq;
        if (isset($this->WorkPackage)) $o['WorkPackage'] = JsonConverters::to('WorkPackageView', $this->WorkPackage);
        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->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->BenchmarkUnitPrice)) $o['BenchmarkUnitPrice'] = $this->BenchmarkUnitPrice;
        if (isset($this->Crew)) $o['Crew'] = JsonConverters::toArray('EstimateCrewLineView', $this->Crew);
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('EstimateEquipmentLineView', $this->Equipment);
        if (isset($this->Materials)) $o['Materials'] = JsonConverters::toArray('EstimateMaterialLineView', $this->Materials);
        if (isset($this->Subcontracts)) $o['Subcontracts'] = JsonConverters::toArray('EstimateSubcontractView', $this->Subcontracts);
        return empty($o) ? new class(){} : $o;
    }
}

class BidScheduleLine implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ItemNo=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Unit=null,
        /** @var float */
        public float $Quantity=0.0,
        /** @var float */
        public float $UnitPrice=0.0,
        /** @var float */
        public float $Extension=0.0,
        /** @var string|null */
        public ?string $PricingBasis=null,
        /** @var float|null */
        public ?float $BenchmarkDeltaPct=null,
        /** @var bool|null */
        public ?bool $BenchmarkFlagged=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ItemNo'])) $this->ItemNo = $o['ItemNo'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Unit'])) $this->Unit = $o['Unit'];
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['UnitPrice'])) $this->UnitPrice = $o['UnitPrice'];
        if (isset($o['Extension'])) $this->Extension = $o['Extension'];
        if (isset($o['PricingBasis'])) $this->PricingBasis = $o['PricingBasis'];
        if (isset($o['BenchmarkDeltaPct'])) $this->BenchmarkDeltaPct = $o['BenchmarkDeltaPct'];
        if (isset($o['BenchmarkFlagged'])) $this->BenchmarkFlagged = $o['BenchmarkFlagged'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ItemNo)) $o['ItemNo'] = $this->ItemNo;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Unit)) $o['Unit'] = $this->Unit;
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->UnitPrice)) $o['UnitPrice'] = $this->UnitPrice;
        if (isset($this->Extension)) $o['Extension'] = $this->Extension;
        if (isset($this->PricingBasis)) $o['PricingBasis'] = $this->PricingBasis;
        if (isset($this->BenchmarkDeltaPct)) $o['BenchmarkDeltaPct'] = $this->BenchmarkDeltaPct;
        if (isset($this->BenchmarkFlagged)) $o['BenchmarkFlagged'] = $this->BenchmarkFlagged;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateVarianceLine implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Seq=0,
        /** @var string|null */
        public ?string $ItemNo=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Unit=null,
        /** @var float */
        public float $Quantity=0.0,
        /** @var float */
        public float $OurUnitPrice=0.0,
        /** @var float */
        public float $OurTotal=0.0,
        /** @var float */
        public float $BenchmarkUnitPrice=0.0,
        /** @var float */
        public float $MarketTotal=0.0,
        /** @var float */
        public float $DeltaPct=0.0,
        /** @var float|null */
        public ?float $RateMin=null,
        /** @var float|null */
        public ?float $RateMax=null,
        /** @var int|null */
        public ?int $SampleSize=null,
        /** @var bool|null */
        public ?bool $OutsideRange=null,
        /** @var bool|null */
        public ?bool $IsFloor=null,
        /** @var string|null */
        public ?string $Severity=null,
        /** @var string|null */
        public ?string $Note=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Seq'])) $this->Seq = $o['Seq'];
        if (isset($o['ItemNo'])) $this->ItemNo = $o['ItemNo'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Unit'])) $this->Unit = $o['Unit'];
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['OurUnitPrice'])) $this->OurUnitPrice = $o['OurUnitPrice'];
        if (isset($o['OurTotal'])) $this->OurTotal = $o['OurTotal'];
        if (isset($o['BenchmarkUnitPrice'])) $this->BenchmarkUnitPrice = $o['BenchmarkUnitPrice'];
        if (isset($o['MarketTotal'])) $this->MarketTotal = $o['MarketTotal'];
        if (isset($o['DeltaPct'])) $this->DeltaPct = $o['DeltaPct'];
        if (isset($o['RateMin'])) $this->RateMin = $o['RateMin'];
        if (isset($o['RateMax'])) $this->RateMax = $o['RateMax'];
        if (isset($o['SampleSize'])) $this->SampleSize = $o['SampleSize'];
        if (isset($o['OutsideRange'])) $this->OutsideRange = $o['OutsideRange'];
        if (isset($o['IsFloor'])) $this->IsFloor = $o['IsFloor'];
        if (isset($o['Severity'])) $this->Severity = $o['Severity'];
        if (isset($o['Note'])) $this->Note = $o['Note'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Seq)) $o['Seq'] = $this->Seq;
        if (isset($this->ItemNo)) $o['ItemNo'] = $this->ItemNo;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Unit)) $o['Unit'] = $this->Unit;
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->OurUnitPrice)) $o['OurUnitPrice'] = $this->OurUnitPrice;
        if (isset($this->OurTotal)) $o['OurTotal'] = $this->OurTotal;
        if (isset($this->BenchmarkUnitPrice)) $o['BenchmarkUnitPrice'] = $this->BenchmarkUnitPrice;
        if (isset($this->MarketTotal)) $o['MarketTotal'] = $this->MarketTotal;
        if (isset($this->DeltaPct)) $o['DeltaPct'] = $this->DeltaPct;
        if (isset($this->RateMin)) $o['RateMin'] = $this->RateMin;
        if (isset($this->RateMax)) $o['RateMax'] = $this->RateMax;
        if (isset($this->SampleSize)) $o['SampleSize'] = $this->SampleSize;
        if (isset($this->OutsideRange)) $o['OutsideRange'] = $this->OutsideRange;
        if (isset($this->IsFloor)) $o['IsFloor'] = $this->IsFloor;
        if (isset($this->Severity)) $o['Severity'] = $this->Severity;
        if (isset($this->Note)) $o['Note'] = $this->Note;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateVarianceView implements JsonSerializable
{
    public function __construct(
        /** @var array<EstimateVarianceLine>|null */
        public ?array $Lines=null,
        /** @var int */
        public int $ItemsTotal=0,
        /** @var int */
        public int $ItemsBenchmarked=0,
        /** @var float */
        public float $CoverageValuePct=0.0,
        /** @var float */
        public float $OursTotal=0.0,
        /** @var float */
        public float $MarketTotal=0.0,
        /** @var float|null */
        public ?float $AggregateDeltaPct=null,
        /** @var int */
        public int $FlooredCount=0,
        /** @var int */
        public int $WatchCount=0,
        /** @var int */
        public int $OutlierCount=0,
        /** @var int */
        public int $CriticalCount=0,
        /** @var string|null */
        public ?string $Note=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Lines'])) $this->Lines = JsonConverters::fromArray('EstimateVarianceLine', $o['Lines']);
        if (isset($o['ItemsTotal'])) $this->ItemsTotal = $o['ItemsTotal'];
        if (isset($o['ItemsBenchmarked'])) $this->ItemsBenchmarked = $o['ItemsBenchmarked'];
        if (isset($o['CoverageValuePct'])) $this->CoverageValuePct = $o['CoverageValuePct'];
        if (isset($o['OursTotal'])) $this->OursTotal = $o['OursTotal'];
        if (isset($o['MarketTotal'])) $this->MarketTotal = $o['MarketTotal'];
        if (isset($o['AggregateDeltaPct'])) $this->AggregateDeltaPct = $o['AggregateDeltaPct'];
        if (isset($o['FlooredCount'])) $this->FlooredCount = $o['FlooredCount'];
        if (isset($o['WatchCount'])) $this->WatchCount = $o['WatchCount'];
        if (isset($o['OutlierCount'])) $this->OutlierCount = $o['OutlierCount'];
        if (isset($o['CriticalCount'])) $this->CriticalCount = $o['CriticalCount'];
        if (isset($o['Note'])) $this->Note = $o['Note'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Lines)) $o['Lines'] = JsonConverters::toArray('EstimateVarianceLine', $this->Lines);
        if (isset($this->ItemsTotal)) $o['ItemsTotal'] = $this->ItemsTotal;
        if (isset($this->ItemsBenchmarked)) $o['ItemsBenchmarked'] = $this->ItemsBenchmarked;
        if (isset($this->CoverageValuePct)) $o['CoverageValuePct'] = $this->CoverageValuePct;
        if (isset($this->OursTotal)) $o['OursTotal'] = $this->OursTotal;
        if (isset($this->MarketTotal)) $o['MarketTotal'] = $this->MarketTotal;
        if (isset($this->AggregateDeltaPct)) $o['AggregateDeltaPct'] = $this->AggregateDeltaPct;
        if (isset($this->FlooredCount)) $o['FlooredCount'] = $this->FlooredCount;
        if (isset($this->WatchCount)) $o['WatchCount'] = $this->WatchCount;
        if (isset($this->OutlierCount)) $o['OutlierCount'] = $this->OutlierCount;
        if (isset($this->CriticalCount)) $o['CriticalCount'] = $this->CriticalCount;
        if (isset($this->Note)) $o['Note'] = $this->Note;
        return empty($o) ? new class(){} : $o;
    }
}

class IndicativeLine implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Seq=0,
        /** @var string|null */
        public ?string $ItemNo=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Unit=null,
        /** @var float */
        public float $Quantity=0.0,
        /** @var string|null */
        public ?string $Source=null,
        /** @var float */
        public float $UnitPrice=0.0,
        /** @var float */
        public float $LineTotal=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Seq'])) $this->Seq = $o['Seq'];
        if (isset($o['ItemNo'])) $this->ItemNo = $o['ItemNo'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Unit'])) $this->Unit = $o['Unit'];
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['Source'])) $this->Source = $o['Source'];
        if (isset($o['UnitPrice'])) $this->UnitPrice = $o['UnitPrice'];
        if (isset($o['LineTotal'])) $this->LineTotal = $o['LineTotal'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Seq)) $o['Seq'] = $this->Seq;
        if (isset($this->ItemNo)) $o['ItemNo'] = $this->ItemNo;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Unit)) $o['Unit'] = $this->Unit;
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->Source)) $o['Source'] = $this->Source;
        if (isset($this->UnitPrice)) $o['UnitPrice'] = $this->UnitPrice;
        if (isset($this->LineTotal)) $o['LineTotal'] = $this->LineTotal;
        return empty($o) ? new class(){} : $o;
    }
}

class IndicativeBidView implements JsonSerializable
{
    public function __construct(
        /** @var array<IndicativeLine>|null */
        public ?array $Lines=null,
        /** @var int */
        public int $BottomUpCount=0,
        /** @var float */
        public float $BottomUpTotal=0.0,
        /** @var int */
        public int $BenchmarkCount=0,
        /** @var float */
        public float $BenchmarkTotal=0.0,
        /** @var int */
        public int $UncoveredCount=0,
        /** @var float */
        public float $UncoveredFloorTotal=0.0,
        /** @var float */
        public float $IndicativeTotal=0.0,
        /** @var float */
        public float $FloorTotal=0.0,
        /** @var string|null */
        public ?string $Note=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Lines'])) $this->Lines = JsonConverters::fromArray('IndicativeLine', $o['Lines']);
        if (isset($o['BottomUpCount'])) $this->BottomUpCount = $o['BottomUpCount'];
        if (isset($o['BottomUpTotal'])) $this->BottomUpTotal = $o['BottomUpTotal'];
        if (isset($o['BenchmarkCount'])) $this->BenchmarkCount = $o['BenchmarkCount'];
        if (isset($o['BenchmarkTotal'])) $this->BenchmarkTotal = $o['BenchmarkTotal'];
        if (isset($o['UncoveredCount'])) $this->UncoveredCount = $o['UncoveredCount'];
        if (isset($o['UncoveredFloorTotal'])) $this->UncoveredFloorTotal = $o['UncoveredFloorTotal'];
        if (isset($o['IndicativeTotal'])) $this->IndicativeTotal = $o['IndicativeTotal'];
        if (isset($o['FloorTotal'])) $this->FloorTotal = $o['FloorTotal'];
        if (isset($o['Note'])) $this->Note = $o['Note'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Lines)) $o['Lines'] = JsonConverters::toArray('IndicativeLine', $this->Lines);
        if (isset($this->BottomUpCount)) $o['BottomUpCount'] = $this->BottomUpCount;
        if (isset($this->BottomUpTotal)) $o['BottomUpTotal'] = $this->BottomUpTotal;
        if (isset($this->BenchmarkCount)) $o['BenchmarkCount'] = $this->BenchmarkCount;
        if (isset($this->BenchmarkTotal)) $o['BenchmarkTotal'] = $this->BenchmarkTotal;
        if (isset($this->UncoveredCount)) $o['UncoveredCount'] = $this->UncoveredCount;
        if (isset($this->UncoveredFloorTotal)) $o['UncoveredFloorTotal'] = $this->UncoveredFloorTotal;
        if (isset($this->IndicativeTotal)) $o['IndicativeTotal'] = $this->IndicativeTotal;
        if (isset($this->FloorTotal)) $o['FloorTotal'] = $this->FloorTotal;
        if (isset($this->Note)) $o['Note'] = $this->Note;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateSummaryView implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $Direct=0.0,
        /** @var float */
        public float $OhpPct=0.0,
        /** @var float */
        public float $OhpAmount=0.0,
        /** @var float */
        public float $BondPct=0.0,
        /** @var float */
        public float $BondAmount=0.0,
        /** @var float */
        public float $ContingencyPct=0.0,
        /** @var float */
        public float $ContingencyAmount=0.0,
        /** @var float */
        public float $BidTotal=0.0,
        /** @var float */
        public float $LoadFactor=0.0,
        /** @var float */
        public float $MarginPct=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Direct'])) $this->Direct = $o['Direct'];
        if (isset($o['OhpPct'])) $this->OhpPct = $o['OhpPct'];
        if (isset($o['OhpAmount'])) $this->OhpAmount = $o['OhpAmount'];
        if (isset($o['BondPct'])) $this->BondPct = $o['BondPct'];
        if (isset($o['BondAmount'])) $this->BondAmount = $o['BondAmount'];
        if (isset($o['ContingencyPct'])) $this->ContingencyPct = $o['ContingencyPct'];
        if (isset($o['ContingencyAmount'])) $this->ContingencyAmount = $o['ContingencyAmount'];
        if (isset($o['BidTotal'])) $this->BidTotal = $o['BidTotal'];
        if (isset($o['LoadFactor'])) $this->LoadFactor = $o['LoadFactor'];
        if (isset($o['MarginPct'])) $this->MarginPct = $o['MarginPct'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Direct)) $o['Direct'] = $this->Direct;
        if (isset($this->OhpPct)) $o['OhpPct'] = $this->OhpPct;
        if (isset($this->OhpAmount)) $o['OhpAmount'] = $this->OhpAmount;
        if (isset($this->BondPct)) $o['BondPct'] = $this->BondPct;
        if (isset($this->BondAmount)) $o['BondAmount'] = $this->BondAmount;
        if (isset($this->ContingencyPct)) $o['ContingencyPct'] = $this->ContingencyPct;
        if (isset($this->ContingencyAmount)) $o['ContingencyAmount'] = $this->ContingencyAmount;
        if (isset($this->BidTotal)) $o['BidTotal'] = $this->BidTotal;
        if (isset($this->LoadFactor)) $o['LoadFactor'] = $this->LoadFactor;
        if (isset($this->MarginPct)) $o['MarginPct'] = $this->MarginPct;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateTimingView implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $TotalWorkdays=0.0,
        /** @var int */
        public int $CalendarDays=0,
        /** @var DateTime */
        public DateTime $Finish=new DateTime(),
        /** @var bool|null */
        public ?bool $Feasible=null,
        /** @var DateTime|null */
        public ?DateTime $Deadline=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TotalWorkdays'])) $this->TotalWorkdays = $o['TotalWorkdays'];
        if (isset($o['CalendarDays'])) $this->CalendarDays = $o['CalendarDays'];
        if (isset($o['Finish'])) $this->Finish = JsonConverters::from('DateTime', $o['Finish']);
        if (isset($o['Feasible'])) $this->Feasible = $o['Feasible'];
        if (isset($o['Deadline'])) $this->Deadline = JsonConverters::from('DateTime', $o['Deadline']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TotalWorkdays)) $o['TotalWorkdays'] = $this->TotalWorkdays;
        if (isset($this->CalendarDays)) $o['CalendarDays'] = $this->CalendarDays;
        if (isset($this->Finish)) $o['Finish'] = JsonConverters::to('DateTime', $this->Finish);
        if (isset($this->Feasible)) $o['Feasible'] = $this->Feasible;
        if (isset($this->Deadline)) $o['Deadline'] = JsonConverters::to('DateTime', $this->Deadline);
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateReviewItemView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $TaskSeq=0,
        /** @var string|null */
        public ?string $TaskName=null,
        /** @var string|null */
        public ?string $Reason=null,
        /** @var string|null */
        public ?string $Status=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TaskSeq'])) $this->TaskSeq = $o['TaskSeq'];
        if (isset($o['TaskName'])) $this->TaskName = $o['TaskName'];
        if (isset($o['Reason'])) $this->Reason = $o['Reason'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TaskSeq)) $o['TaskSeq'] = $this->TaskSeq;
        if (isset($this->TaskName)) $o['TaskName'] = $this->TaskName;
        if (isset($this->Reason)) $o['Reason'] = $this->Reason;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimatingView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RfpDocumentID=0,
        /** @var string|null */
        public ?string $ProjectName=null,
        /** @var string|null */
        public ?string $ClientName=null,
        /** @var string|null */
        public ?string $BidDueDate=null,
        /** @var string|null */
        public ?string $ProjectType=null,
        /** @var EstimateSettingsView|null */
        public ?EstimateSettingsView $Settings=null,
        /** @var array<EstimateJobView>|null */
        public ?array $Jobs=null,
        /** @var array<BidScheduleLine>|null */
        public ?array $Schedule=null,
        /** @var float */
        public float $ScheduleTotal=0.0,
        /** @var EstimateVarianceView|null */
        public ?EstimateVarianceView $Variance=null,
        /** @var IndicativeBidView|null */
        public ?IndicativeBidView $Indicative=null,
        /** @var EstimateSummaryView|null */
        public ?EstimateSummaryView $Summary=null,
        /** @var EstimateTimingView|null */
        public ?EstimateTimingView $Timing=null,
        /** @var int */
        public int $NeedsRateCount=0,
        /** @var array<string>|null */
        public ?array $NeedsRateKeys=null,
        /** @var array<EstimateReviewItemView>|null */
        public ?array $ReviewItems=null,
        /** @var int */
        public int $NeedsReviewCount=0,
        /** @var bool|null */
        public ?bool $CanApprove=null,
        /** @var bool|null */
        public ?bool $CanSeePay=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RfpDocumentID'])) $this->RfpDocumentID = $o['RfpDocumentID'];
        if (isset($o['ProjectName'])) $this->ProjectName = $o['ProjectName'];
        if (isset($o['ClientName'])) $this->ClientName = $o['ClientName'];
        if (isset($o['BidDueDate'])) $this->BidDueDate = $o['BidDueDate'];
        if (isset($o['ProjectType'])) $this->ProjectType = $o['ProjectType'];
        if (isset($o['Settings'])) $this->Settings = JsonConverters::from('EstimateSettingsView', $o['Settings']);
        if (isset($o['Jobs'])) $this->Jobs = JsonConverters::fromArray('EstimateJobView', $o['Jobs']);
        if (isset($o['Schedule'])) $this->Schedule = JsonConverters::fromArray('BidScheduleLine', $o['Schedule']);
        if (isset($o['ScheduleTotal'])) $this->ScheduleTotal = $o['ScheduleTotal'];
        if (isset($o['Variance'])) $this->Variance = JsonConverters::from('EstimateVarianceView', $o['Variance']);
        if (isset($o['Indicative'])) $this->Indicative = JsonConverters::from('IndicativeBidView', $o['Indicative']);
        if (isset($o['Summary'])) $this->Summary = JsonConverters::from('EstimateSummaryView', $o['Summary']);
        if (isset($o['Timing'])) $this->Timing = JsonConverters::from('EstimateTimingView', $o['Timing']);
        if (isset($o['NeedsRateCount'])) $this->NeedsRateCount = $o['NeedsRateCount'];
        if (isset($o['NeedsRateKeys'])) $this->NeedsRateKeys = JsonConverters::fromArray('string', $o['NeedsRateKeys']);
        if (isset($o['ReviewItems'])) $this->ReviewItems = JsonConverters::fromArray('EstimateReviewItemView', $o['ReviewItems']);
        if (isset($o['NeedsReviewCount'])) $this->NeedsReviewCount = $o['NeedsReviewCount'];
        if (isset($o['CanApprove'])) $this->CanApprove = $o['CanApprove'];
        if (isset($o['CanSeePay'])) $this->CanSeePay = $o['CanSeePay'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RfpDocumentID)) $o['RfpDocumentID'] = $this->RfpDocumentID;
        if (isset($this->ProjectName)) $o['ProjectName'] = $this->ProjectName;
        if (isset($this->ClientName)) $o['ClientName'] = $this->ClientName;
        if (isset($this->BidDueDate)) $o['BidDueDate'] = $this->BidDueDate;
        if (isset($this->ProjectType)) $o['ProjectType'] = $this->ProjectType;
        if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('EstimateSettingsView', $this->Settings);
        if (isset($this->Jobs)) $o['Jobs'] = JsonConverters::toArray('EstimateJobView', $this->Jobs);
        if (isset($this->Schedule)) $o['Schedule'] = JsonConverters::toArray('BidScheduleLine', $this->Schedule);
        if (isset($this->ScheduleTotal)) $o['ScheduleTotal'] = $this->ScheduleTotal;
        if (isset($this->Variance)) $o['Variance'] = JsonConverters::to('EstimateVarianceView', $this->Variance);
        if (isset($this->Indicative)) $o['Indicative'] = JsonConverters::to('IndicativeBidView', $this->Indicative);
        if (isset($this->Summary)) $o['Summary'] = JsonConverters::to('EstimateSummaryView', $this->Summary);
        if (isset($this->Timing)) $o['Timing'] = JsonConverters::to('EstimateTimingView', $this->Timing);
        if (isset($this->NeedsRateCount)) $o['NeedsRateCount'] = $this->NeedsRateCount;
        if (isset($this->NeedsRateKeys)) $o['NeedsRateKeys'] = JsonConverters::toArray('string', $this->NeedsRateKeys);
        if (isset($this->ReviewItems)) $o['ReviewItems'] = JsonConverters::toArray('EstimateReviewItemView', $this->ReviewItems);
        if (isset($this->NeedsReviewCount)) $o['NeedsReviewCount'] = $this->NeedsReviewCount;
        if (isset($this->CanApprove)) $o['CanApprove'] = $this->CanApprove;
        if (isset($this->CanSeePay)) $o['CanSeePay'] = $this->CanSeePay;
        return empty($o) ? new class(){} : $o;
    }
}

class EstimateResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var EstimatingView|null */
        public ?EstimatingView $View=null
    ) {
    }

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

class EstimateReviewActionRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $RfpDocumentUID='',
        /** @var int */
        public int $TaskSeq=0,
        /** @var string|null */
        public ?string $ReviewAction=null
    ) {
    }

    /** @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['ReviewAction'])) $this->ReviewAction = $o['ReviewAction'];
    }
    
    /** @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->ReviewAction)) $o['ReviewAction'] = $this->ReviewAction;
        return empty($o) ? new class(){} : $o;
    }
}

PHP EstimateReviewActionRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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

POST /v1/Rfp/{RfpDocumentUID}/Review/{TaskSeq}/{ReviewAction} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	RfpDocumentUID: 00000000000000000000000000000000,
	TaskSeq: 0,
	ReviewAction: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	View: 
	{
		RfpDocumentID: 0,
		ProjectName: String,
		ClientName: String,
		BidDueDate: String,
		ProjectType: String,
		Settings: 
		{
			RfpEstimateID: 0,
			StartDate: 0001-01-01,
			DeadlineDate: 0001-01-01,
			WorkdaysPerWeek: 0,
			HoursPerDay: 0,
			WeatherPct: 0,
			OhpPct: 0,
			ContingencyPct: 0,
			BondPct: 0,
			Holidays: 
			[
				0001-01-01
			],
			AppliedStartDate: 0001-01-01
		},
		Jobs: 
		[
			{
				Seq: 0,
				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
				},
				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,
				CrewCost: 0,
				FringeCost: 0,
				EquipmentCost: 0,
				MaterialCost: 0,
				SubcontractCost: 0,
				Direct: 0,
				PricingBasis: String,
				BenchmarkUnitPrice: 0,
				Crew: 
				[
					{
						Role: String,
						Hours: 0,
						StHours: 0,
						OtHours: 0,
						HasOt: False,
						PremiumApplied: False,
						NeedsRate: False,
						RateKey: String,
						Chip: String,
						Rrop: 0,
						StCost: 0,
						OtCost: 0,
						Cost: 0,
						FringeCost: 0
					}
				],
				Equipment: 
				[
					{
						Name: String,
						Quantity: 0,
						Rate: 0,
						NeedsRate: False,
						MobCost: 0,
						Cost: 0,
						IsAvailabilityTracked: False,
						IsOwned: False,
						AvailabilityLabel: String,
						FreedFromProject: String,
						AvailableFrom: 0001-01-01,
						RateKey: String,
						Chip: String,
						RentalExplain: String,
						UsageDays: 0,
						BilledDays: 0
					}
				],
				Materials: 
				[
					{
						Name: String,
						Quantity: 0,
						Unit: String,
						Rate: 0,
						NeedsRate: False,
						Cost: 0,
						RateKey: String,
						Chip: String
					}
				],
				Subcontracts: 
				[
					{
						EstimateSubcontractID: 0,
						TaskSeq: 0,
						Vendor: String,
						Amount: 0,
						Scope: String
					}
				]
			}
		],
		Schedule: 
		[
			{
				ItemNo: String,
				Description: String,
				Unit: String,
				Quantity: 0,
				UnitPrice: 0,
				Extension: 0,
				PricingBasis: String,
				BenchmarkDeltaPct: 0,
				BenchmarkFlagged: False
			}
		],
		ScheduleTotal: 0,
		Variance: 
		{
			Lines: 
			[
				{
					Seq: 0,
					ItemNo: String,
					Name: String,
					Unit: String,
					Quantity: 0,
					OurUnitPrice: 0,
					OurTotal: 0,
					BenchmarkUnitPrice: 0,
					MarketTotal: 0,
					DeltaPct: 0,
					RateMin: 0,
					RateMax: 0,
					SampleSize: 0,
					OutsideRange: False,
					IsFloor: False,
					Severity: String,
					Note: String
				}
			],
			ItemsTotal: 0,
			ItemsBenchmarked: 0,
			CoverageValuePct: 0,
			OursTotal: 0,
			MarketTotal: 0,
			AggregateDeltaPct: 0,
			FlooredCount: 0,
			WatchCount: 0,
			OutlierCount: 0,
			CriticalCount: 0,
			Note: String
		},
		Indicative: 
		{
			Lines: 
			[
				{
					Seq: 0,
					ItemNo: String,
					Name: String,
					Unit: String,
					Quantity: 0,
					Source: String,
					UnitPrice: 0,
					LineTotal: 0
				}
			],
			BottomUpCount: 0,
			BottomUpTotal: 0,
			BenchmarkCount: 0,
			BenchmarkTotal: 0,
			UncoveredCount: 0,
			UncoveredFloorTotal: 0,
			IndicativeTotal: 0,
			FloorTotal: 0,
			Note: String
		},
		Summary: 
		{
			Direct: 0,
			OhpPct: 0,
			OhpAmount: 0,
			BondPct: 0,
			BondAmount: 0,
			ContingencyPct: 0,
			ContingencyAmount: 0,
			BidTotal: 0,
			LoadFactor: 0,
			MarginPct: 0
		},
		Timing: 
		{
			TotalWorkdays: 0,
			CalendarDays: 0,
			Finish: 0001-01-01,
			Feasible: False,
			Deadline: 0001-01-01
		},
		NeedsRateCount: 0,
		NeedsRateKeys: 
		[
			String
		],
		ReviewItems: 
		[
			{
				TaskSeq: 0,
				TaskName: String,
				Reason: String,
				Status: String
			}
		],
		NeedsReviewCount: 0,
		CanApprove: False,
		CanSeePay: False
	}
}