Trendsic Platform Service

<back to all web services

ProjectLocationAttachmentRequest

Requires Authentication
The following routes are available for this service:
POST/v1/projectlocation/attachment
<?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 ProjectLocationArea implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationAreaID=0,
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var float|null */
        public ?float $Measurement=null,
        /** @var string|null */
        public ?string $MeasurementUnit=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var int */
        public int $DisplayOrder=0,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectLocationAreaID'])) $this->ProjectLocationAreaID = $o['ProjectLocationAreaID'];
        if (isset($o['ProjectLocationID'])) $this->ProjectLocationID = $o['ProjectLocationID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Measurement'])) $this->Measurement = $o['Measurement'];
        if (isset($o['MeasurementUnit'])) $this->MeasurementUnit = $o['MeasurementUnit'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['DisplayOrder'])) $this->DisplayOrder = $o['DisplayOrder'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectLocationAreaID)) $o['ProjectLocationAreaID'] = $this->ProjectLocationAreaID;
        if (isset($this->ProjectLocationID)) $o['ProjectLocationID'] = $this->ProjectLocationID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Measurement)) $o['Measurement'] = $this->Measurement;
        if (isset($this->MeasurementUnit)) $o['MeasurementUnit'] = $this->MeasurementUnit;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->DisplayOrder)) $o['DisplayOrder'] = $this->DisplayOrder;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocationEquipment implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationEquipmentID=0,
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Manufacturer=null,
        /** @var string|null */
        public ?string $Model=null,
        /** @var string|null */
        public ?string $SerialNumber=null,
        /** @var string|null */
        public ?string $AssetTag=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectLocationEquipmentID'])) $this->ProjectLocationEquipmentID = $o['ProjectLocationEquipmentID'];
        if (isset($o['ProjectLocationID'])) $this->ProjectLocationID = $o['ProjectLocationID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Manufacturer'])) $this->Manufacturer = $o['Manufacturer'];
        if (isset($o['Model'])) $this->Model = $o['Model'];
        if (isset($o['SerialNumber'])) $this->SerialNumber = $o['SerialNumber'];
        if (isset($o['AssetTag'])) $this->AssetTag = $o['AssetTag'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectLocationEquipmentID)) $o['ProjectLocationEquipmentID'] = $this->ProjectLocationEquipmentID;
        if (isset($this->ProjectLocationID)) $o['ProjectLocationID'] = $this->ProjectLocationID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Manufacturer)) $o['Manufacturer'] = $this->Manufacturer;
        if (isset($this->Model)) $o['Model'] = $this->Model;
        if (isset($this->SerialNumber)) $o['SerialNumber'] = $this->SerialNumber;
        if (isset($this->AssetTag)) $o['AssetTag'] = $this->AssetTag;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocationSiteDetail implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationSiteDetailID=0,
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var string|null */
        public ?string $DetailType=null,
        /** @var string|null */
        public ?string $Label=null,
        /** @var string|null */
        public ?string $Value=null,
        /** @var bool|null */
        public ?bool $IsSensitive=null,
        /** @var int */
        public int $EncVersion=0,
        /** @var bool|null */
        public ?bool $HasValue=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var int */
        public int $DisplayOrder=0,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectLocationSiteDetailID'])) $this->ProjectLocationSiteDetailID = $o['ProjectLocationSiteDetailID'];
        if (isset($o['ProjectLocationID'])) $this->ProjectLocationID = $o['ProjectLocationID'];
        if (isset($o['DetailType'])) $this->DetailType = $o['DetailType'];
        if (isset($o['Label'])) $this->Label = $o['Label'];
        if (isset($o['Value'])) $this->Value = $o['Value'];
        if (isset($o['IsSensitive'])) $this->IsSensitive = $o['IsSensitive'];
        if (isset($o['EncVersion'])) $this->EncVersion = $o['EncVersion'];
        if (isset($o['HasValue'])) $this->HasValue = $o['HasValue'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['DisplayOrder'])) $this->DisplayOrder = $o['DisplayOrder'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectLocationSiteDetailID)) $o['ProjectLocationSiteDetailID'] = $this->ProjectLocationSiteDetailID;
        if (isset($this->ProjectLocationID)) $o['ProjectLocationID'] = $this->ProjectLocationID;
        if (isset($this->DetailType)) $o['DetailType'] = $this->DetailType;
        if (isset($this->Label)) $o['Label'] = $this->Label;
        if (isset($this->Value)) $o['Value'] = $this->Value;
        if (isset($this->IsSensitive)) $o['IsSensitive'] = $this->IsSensitive;
        if (isset($this->EncVersion)) $o['EncVersion'] = $this->EncVersion;
        if (isset($this->HasValue)) $o['HasValue'] = $this->HasValue;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->DisplayOrder)) $o['DisplayOrder'] = $this->DisplayOrder;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocationAttachment implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationAttachmentID=0,
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var int|null */
        public ?int $ProjectLocationAreaID=null,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $DocTitle=null,
        /** @var string|null */
        public ?string $FileName=null,
        /** @var string|null */
        public ?string $Url=null,
        /** @var string|null */
        public ?string $MimeType=null,
        /** @var DateTime|null */
        public ?DateTime $UploadDate=null,
        /** @var string|null */
        public ?string $UploadedBy=null,
        /** @var bool|null */
        public ?bool $Active=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectLocationAttachmentID'])) $this->ProjectLocationAttachmentID = $o['ProjectLocationAttachmentID'];
        if (isset($o['ProjectLocationID'])) $this->ProjectLocationID = $o['ProjectLocationID'];
        if (isset($o['ProjectLocationAreaID'])) $this->ProjectLocationAreaID = $o['ProjectLocationAreaID'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['DocTitle'])) $this->DocTitle = $o['DocTitle'];
        if (isset($o['FileName'])) $this->FileName = $o['FileName'];
        if (isset($o['Url'])) $this->Url = $o['Url'];
        if (isset($o['MimeType'])) $this->MimeType = $o['MimeType'];
        if (isset($o['UploadDate'])) $this->UploadDate = JsonConverters::from('DateTime', $o['UploadDate']);
        if (isset($o['UploadedBy'])) $this->UploadedBy = $o['UploadedBy'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectLocationAttachmentID)) $o['ProjectLocationAttachmentID'] = $this->ProjectLocationAttachmentID;
        if (isset($this->ProjectLocationID)) $o['ProjectLocationID'] = $this->ProjectLocationID;
        if (isset($this->ProjectLocationAreaID)) $o['ProjectLocationAreaID'] = $this->ProjectLocationAreaID;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->DocTitle)) $o['DocTitle'] = $this->DocTitle;
        if (isset($this->FileName)) $o['FileName'] = $this->FileName;
        if (isset($this->Url)) $o['Url'] = $this->Url;
        if (isset($this->MimeType)) $o['MimeType'] = $this->MimeType;
        if (isset($this->UploadDate)) $o['UploadDate'] = JsonConverters::to('DateTime', $this->UploadDate);
        if (isset($this->UploadedBy)) $o['UploadedBy'] = $this->UploadedBy;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocation implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var int */
        public int $ProjectID=0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Address1=null,
        /** @var string|null */
        public ?string $Address2=null,
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $State=null,
        /** @var string|null */
        public ?string $Zip=null,
        /** @var float|null */
        public ?float $Latitude=null,
        /** @var float|null */
        public ?float $Longitude=null,
        /** @var float|null */
        public ?float $TotalArea=null,
        /** @var string|null */
        public ?string $AreaUnit=null,
        /** @var string|null */
        public ?string $AccessInstructions=null,
        /** @var bool|null */
        public ?bool $IsPrimary=null,
        /** @var int */
        public int $DisplayOrder=0,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null,
        /** @var array<ProjectLocationArea>|null */
        public ?array $Areas=null,
        /** @var array<ProjectLocationEquipment>|null */
        public ?array $Equipment=null,
        /** @var array<ProjectLocationSiteDetail>|null */
        public ?array $SiteDetails=null,
        /** @var array<ProjectLocationAttachment>|null */
        public ?array $Attachments=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectLocationID'])) $this->ProjectLocationID = $o['ProjectLocationID'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Address1'])) $this->Address1 = $o['Address1'];
        if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['State'])) $this->State = $o['State'];
        if (isset($o['Zip'])) $this->Zip = $o['Zip'];
        if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
        if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
        if (isset($o['TotalArea'])) $this->TotalArea = $o['TotalArea'];
        if (isset($o['AreaUnit'])) $this->AreaUnit = $o['AreaUnit'];
        if (isset($o['AccessInstructions'])) $this->AccessInstructions = $o['AccessInstructions'];
        if (isset($o['IsPrimary'])) $this->IsPrimary = $o['IsPrimary'];
        if (isset($o['DisplayOrder'])) $this->DisplayOrder = $o['DisplayOrder'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
        if (isset($o['Areas'])) $this->Areas = JsonConverters::fromArray('ProjectLocationArea', $o['Areas']);
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('ProjectLocationEquipment', $o['Equipment']);
        if (isset($o['SiteDetails'])) $this->SiteDetails = JsonConverters::fromArray('ProjectLocationSiteDetail', $o['SiteDetails']);
        if (isset($o['Attachments'])) $this->Attachments = JsonConverters::fromArray('ProjectLocationAttachment', $o['Attachments']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectLocationID)) $o['ProjectLocationID'] = $this->ProjectLocationID;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Address1)) $o['Address1'] = $this->Address1;
        if (isset($this->Address2)) $o['Address2'] = $this->Address2;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->State)) $o['State'] = $this->State;
        if (isset($this->Zip)) $o['Zip'] = $this->Zip;
        if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
        if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
        if (isset($this->TotalArea)) $o['TotalArea'] = $this->TotalArea;
        if (isset($this->AreaUnit)) $o['AreaUnit'] = $this->AreaUnit;
        if (isset($this->AccessInstructions)) $o['AccessInstructions'] = $this->AccessInstructions;
        if (isset($this->IsPrimary)) $o['IsPrimary'] = $this->IsPrimary;
        if (isset($this->DisplayOrder)) $o['DisplayOrder'] = $this->DisplayOrder;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        if (isset($this->Areas)) $o['Areas'] = JsonConverters::toArray('ProjectLocationArea', $this->Areas);
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('ProjectLocationEquipment', $this->Equipment);
        if (isset($this->SiteDetails)) $o['SiteDetails'] = JsonConverters::toArray('ProjectLocationSiteDetail', $this->SiteDetails);
        if (isset($this->Attachments)) $o['Attachments'] = JsonConverters::toArray('ProjectLocationAttachment', $this->Attachments);
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocationResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<ProjectLocation>|null */
        public ?array $Locations=null,
        /** @var array<ProjectLocationArea>|null */
        public ?array $Areas=null,
        /** @var array<ProjectLocationEquipment>|null */
        public ?array $Equipment=null,
        /** @var array<ProjectLocationSiteDetail>|null */
        public ?array $SiteDetails=null,
        /** @var array<ProjectLocationAttachment>|null */
        public ?array $Attachments=null,
        /** @var ProjectLocationSiteDetail|null */
        public ?ProjectLocationSiteDetail $SiteDetail=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Locations'])) $this->Locations = JsonConverters::fromArray('ProjectLocation', $o['Locations']);
        if (isset($o['Areas'])) $this->Areas = JsonConverters::fromArray('ProjectLocationArea', $o['Areas']);
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('ProjectLocationEquipment', $o['Equipment']);
        if (isset($o['SiteDetails'])) $this->SiteDetails = JsonConverters::fromArray('ProjectLocationSiteDetail', $o['SiteDetails']);
        if (isset($o['Attachments'])) $this->Attachments = JsonConverters::fromArray('ProjectLocationAttachment', $o['Attachments']);
        if (isset($o['SiteDetail'])) $this->SiteDetail = JsonConverters::from('ProjectLocationSiteDetail', $o['SiteDetail']);
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Locations)) $o['Locations'] = JsonConverters::toArray('ProjectLocation', $this->Locations);
        if (isset($this->Areas)) $o['Areas'] = JsonConverters::toArray('ProjectLocationArea', $this->Areas);
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('ProjectLocationEquipment', $this->Equipment);
        if (isset($this->SiteDetails)) $o['SiteDetails'] = JsonConverters::toArray('ProjectLocationSiteDetail', $this->SiteDetails);
        if (isset($this->Attachments)) $o['Attachments'] = JsonConverters::toArray('ProjectLocationAttachment', $this->Attachments);
        if (isset($this->SiteDetail)) $o['SiteDetail'] = JsonConverters::to('ProjectLocationSiteDetail', $this->SiteDetail);
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectLocationAttachmentRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectLocationID=0,
        /** @var int|null */
        public ?int $ProjectLocationAreaID=null,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $DocTitle=null
    ) {
    }

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

PHP ProjectLocationAttachmentRequest DTOs

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

HTTP + XML

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

POST /v1/projectlocation/attachment HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<ProjectLocationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Areas>
    <ProjectLocationArea>
      <Active>false</Active>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <DisplayOrder>0</DisplayOrder>
      <Measurement>0</Measurement>
      <MeasurementUnit>String</MeasurementUnit>
      <Name>String</Name>
      <Notes>String</Notes>
      <ProjectLocationAreaID>0</ProjectLocationAreaID>
      <ProjectLocationID>0</ProjectLocationID>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    </ProjectLocationArea>
  </Areas>
  <Attachments>
    <ProjectLocationAttachment>
      <Active>false</Active>
      <DocTitle>String</DocTitle>
      <FileName>String</FileName>
      <Kind>String</Kind>
      <MimeType>String</MimeType>
      <ProjectLocationAreaID>0</ProjectLocationAreaID>
      <ProjectLocationAttachmentID>0</ProjectLocationAttachmentID>
      <ProjectLocationID>0</ProjectLocationID>
      <UploadDate>0001-01-01T00:00:00</UploadDate>
      <UploadedBy>String</UploadedBy>
      <Url>String</Url>
    </ProjectLocationAttachment>
  </Attachments>
  <Equipment>
    <ProjectLocationEquipment>
      <Active>false</Active>
      <AssetTag>String</AssetTag>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <Description>String</Description>
      <Manufacturer>String</Manufacturer>
      <Model>String</Model>
      <Name>String</Name>
      <Notes>String</Notes>
      <ProjectLocationEquipmentID>0</ProjectLocationEquipmentID>
      <ProjectLocationID>0</ProjectLocationID>
      <SerialNumber>String</SerialNumber>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    </ProjectLocationEquipment>
  </Equipment>
  <Locations>
    <ProjectLocation>
      <AccessInstructions>String</AccessInstructions>
      <Active>false</Active>
      <Address1>String</Address1>
      <Address2>String</Address2>
      <AreaUnit>String</AreaUnit>
      <Areas>
        <ProjectLocationArea>
          <Active>false</Active>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <DisplayOrder>0</DisplayOrder>
          <Measurement>0</Measurement>
          <MeasurementUnit>String</MeasurementUnit>
          <Name>String</Name>
          <Notes>String</Notes>
          <ProjectLocationAreaID>0</ProjectLocationAreaID>
          <ProjectLocationID>0</ProjectLocationID>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
        </ProjectLocationArea>
      </Areas>
      <Attachments>
        <ProjectLocationAttachment>
          <Active>false</Active>
          <DocTitle>String</DocTitle>
          <FileName>String</FileName>
          <Kind>String</Kind>
          <MimeType>String</MimeType>
          <ProjectLocationAreaID>0</ProjectLocationAreaID>
          <ProjectLocationAttachmentID>0</ProjectLocationAttachmentID>
          <ProjectLocationID>0</ProjectLocationID>
          <UploadDate>0001-01-01T00:00:00</UploadDate>
          <UploadedBy>String</UploadedBy>
          <Url>String</Url>
        </ProjectLocationAttachment>
      </Attachments>
      <City>String</City>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <DisplayOrder>0</DisplayOrder>
      <Equipment>
        <ProjectLocationEquipment>
          <Active>false</Active>
          <AssetTag>String</AssetTag>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <Description>String</Description>
          <Manufacturer>String</Manufacturer>
          <Model>String</Model>
          <Name>String</Name>
          <Notes>String</Notes>
          <ProjectLocationEquipmentID>0</ProjectLocationEquipmentID>
          <ProjectLocationID>0</ProjectLocationID>
          <SerialNumber>String</SerialNumber>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
        </ProjectLocationEquipment>
      </Equipment>
      <IsPrimary>false</IsPrimary>
      <Latitude>0</Latitude>
      <Longitude>0</Longitude>
      <Name>String</Name>
      <ProjectID>0</ProjectID>
      <ProjectLocationID>0</ProjectLocationID>
      <SiteDetails>
        <ProjectLocationSiteDetail>
          <Active>false</Active>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <DetailType>String</DetailType>
          <DisplayOrder>0</DisplayOrder>
          <EncVersion>0</EncVersion>
          <HasValue>false</HasValue>
          <IsSensitive>false</IsSensitive>
          <Label>String</Label>
          <Notes>String</Notes>
          <ProjectLocationID>0</ProjectLocationID>
          <ProjectLocationSiteDetailID>0</ProjectLocationSiteDetailID>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
          <Value>String</Value>
        </ProjectLocationSiteDetail>
      </SiteDetails>
      <State>String</State>
      <TotalArea>0</TotalArea>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
      <Zip>String</Zip>
    </ProjectLocation>
  </Locations>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <SiteDetail>
    <Active>false</Active>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <CreatedBy>String</CreatedBy>
    <DetailType>String</DetailType>
    <DisplayOrder>0</DisplayOrder>
    <EncVersion>0</EncVersion>
    <HasValue>false</HasValue>
    <IsSensitive>false</IsSensitive>
    <Label>String</Label>
    <Notes>String</Notes>
    <ProjectLocationID>0</ProjectLocationID>
    <ProjectLocationSiteDetailID>0</ProjectLocationSiteDetailID>
    <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    <Value>String</Value>
  </SiteDetail>
  <SiteDetails>
    <ProjectLocationSiteDetail>
      <Active>false</Active>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <DetailType>String</DetailType>
      <DisplayOrder>0</DisplayOrder>
      <EncVersion>0</EncVersion>
      <HasValue>false</HasValue>
      <IsSensitive>false</IsSensitive>
      <Label>String</Label>
      <Notes>String</Notes>
      <ProjectLocationID>0</ProjectLocationID>
      <ProjectLocationSiteDetailID>0</ProjectLocationSiteDetailID>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
      <Value>String</Value>
    </ProjectLocationSiteDetail>
  </SiteDetails>
</ProjectLocationResponse>