Trendsic Platform Service

<back to all web services

CrewAssignmentsCrewMembersRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/CrewAssignments/CrewMembers/{SelectedDate}
<?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 Department implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $DepartmentID=0,
        /** @var string */
        public string $DepartmentUID='',
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Code=null,
        /** @var string|null */
        public ?string $Color=null,
        /** @var float */
        public float $Budget=0.0,
        /** @var string|null */
        public ?string $BillingMethod=null,
        /** @var string|null */
        public ?string $CostCenter=null,
        /** @var string|null */
        public ?string $BillingContact=null,
        /** @var string|null */
        public ?string $BillingEmail=null,
        /** @var bool|null */
        public ?bool $ApprovalOn=null,
        /** @var float */
        public float $Threshold=0.0,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime */
        public DateTime $CreatedAt=new DateTime(),
        /** @var int */
        public int $Members=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DepartmentID'])) $this->DepartmentID = $o['DepartmentID'];
        if (isset($o['DepartmentUID'])) $this->DepartmentUID = $o['DepartmentUID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['Color'])) $this->Color = $o['Color'];
        if (isset($o['Budget'])) $this->Budget = $o['Budget'];
        if (isset($o['BillingMethod'])) $this->BillingMethod = $o['BillingMethod'];
        if (isset($o['CostCenter'])) $this->CostCenter = $o['CostCenter'];
        if (isset($o['BillingContact'])) $this->BillingContact = $o['BillingContact'];
        if (isset($o['BillingEmail'])) $this->BillingEmail = $o['BillingEmail'];
        if (isset($o['ApprovalOn'])) $this->ApprovalOn = $o['ApprovalOn'];
        if (isset($o['Threshold'])) $this->Threshold = $o['Threshold'];
        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['Members'])) $this->Members = $o['Members'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DepartmentID)) $o['DepartmentID'] = $this->DepartmentID;
        if (isset($this->DepartmentUID)) $o['DepartmentUID'] = $this->DepartmentUID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->Color)) $o['Color'] = $this->Color;
        if (isset($this->Budget)) $o['Budget'] = $this->Budget;
        if (isset($this->BillingMethod)) $o['BillingMethod'] = $this->BillingMethod;
        if (isset($this->CostCenter)) $o['CostCenter'] = $this->CostCenter;
        if (isset($this->BillingContact)) $o['BillingContact'] = $this->BillingContact;
        if (isset($this->BillingEmail)) $o['BillingEmail'] = $this->BillingEmail;
        if (isset($this->ApprovalOn)) $o['ApprovalOn'] = $this->ApprovalOn;
        if (isset($this->Threshold)) $o['Threshold'] = $this->Threshold;
        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->Members)) $o['Members'] = $this->Members;
        return empty($o) ? new class(){} : $o;
    }
}

class Contact implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ContactId=0,
        /** @var int */
        public int $ContactType=0,
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Role=null,
        /** @var string|null */
        public ?string $Title=null,
        /** @var string|null */
        public ?string $EmailWork=null,
        /** @var string|null */
        public ?string $EmailPersonal=null,
        /** @var string|null */
        public ?string $District=null,
        /** @var int */
        public int $DistrictID=0,
        /** @var string|null */
        public ?string $School=null,
        /** @var int */
        public int $SchoolID=0,
        /** @var string|null */
        public ?string $State=null,
        /** @var string|null */
        public ?string $StateName=null,
        /** @var int */
        public int $StateID=0,
        /** @var int */
        public int $CountyID=0,
        /** @var string|null */
        public ?string $County=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $Department=null,
        /** @var string|null */
        public ?string $Flow=null,
        /** @var DateTime */
        public DateTime $LastContact=new DateTime(),
        /** @var bool|null */
        public ?bool $DoNotContact=null,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var int */
        public int $AgentId=0,
        /** @var string|null */
        public ?string $PhoneAlt=null,
        /** @var int */
        public int $PeraContactId=0,
        /** @var string|null */
        public ?string $RoomNumber=null,
        /** @var int */
        public int $SourceTypeId=0,
        /** @var string|null */
        public ?string $SourceTypeDesc=null,
        /** @var string|null */
        public ?string $SourceNote=null,
        /** @var int */
        public int $ContactStatusId=0,
        /** @var string|null */
        public ?string $ContactStatusDesc=null,
        /** @var string|null */
        public ?string $SSN=null,
        /** @var DateTime */
        public DateTime $DateOfBirth=new DateTime(),
        /** @var bool|null */
        public ?bool $Deleted=null,
        /** @var bool|null */
        public ?bool $IsShared=null,
        /** @var string|null */
        public ?string $address_line1=null,
        /** @var string|null */
        public ?string $address_city=null,
        /** @var string|null */
        public ?string $address_state=null,
        /** @var string|null */
        public ?string $address_zip=null,
        /** @var string|null */
        public ?string $DeletedBy=null,
        /** @var DateTime|null */
        public ?DateTime $DeletedDateTimeUtc=null,
        /** @var bool|null */
        public ?bool $HasNBC=null,
        /** @var bool|null */
        public ?bool $HasFactFinderSheet=null,
        /** @var string|null */
        public ?string $MiddleInitial=null,
        /** @var string|null */
        public ?string $Tags=null,
        /** @var DateTime */
        public DateTime $DateCreated=new DateTime(),
        /** @var string|null */
        public ?string $PhoneLabel=null,
        /** @var string|null */
        public ?string $AltPhoneLabel=null,
        /** @var string|null */
        public ?string $Carriers=null,
        /** @var string|null */
        public ?string $ContactImage=null,
        /** @var string|null */
        public ?string $CompanyAffiliation=null,
        /** @var string|null */
        public ?string $AdditionalInformation=null,
        /** @var bool|null */
        public ?bool $HasGiftCard=null,
        /** @var int */
        public int $ContactCategory=0,
        /** @var int */
        public int $WritingAgentId=0,
        /** @var string|null */
        public ?string $WritingAgentName=null,
        /** @var string|null */
        public ?string $MaritalStatus=null,
        /** @var float */
        public float $TotalDebtAmount=0.0,
        /** @var int */
        public int $NumberOfDebtAccounts=0,
        /** @var int */
        public int $FactFinderCodeId=0,
        /** @var string|null */
        public ?string $BusinessName=null,
        /** @var string|null */
        public ?string $DBA=null,
        /** @var string */
        public string $ContactGUID='',
        /** @var DateTime */
        public DateTime $ProjectEndDate=new DateTime(),
        /** @var float */
        public float $Rate=0.0,
        /** @var int */
        public int $JobID=0,
        /** @var string|null */
        public ?string $JobName=null,
        /** @var int */
        public int $JobCount=0,
        /** @var bool|null */
        public ?bool $Locked=null,
        /** @var int */
        public int $LockedByAgentId=0,
        /** @var DateTime */
        public DateTime $LockedTimestamp=new DateTime(),
        /** @var string|null */
        public ?string $Initials=null,
        /** @var string|null */
        public ?string $ContactCategoryName=null,
        /** @var bool|null */
        public ?bool $SMSOptIn=null,
        /** @var bool|null */
        public ?bool $IsPlaceholder=null,
        /** @var array<string>|null */
        public ?array $Skills=null,
        /** @var array<Department>|null */
        public ?array $Departments=null,
        /** @var string */
        public string $BranchId='',
        /** @var string|null */
        public ?string $BranchName=null,
        /** @var int|null */
        public ?int $UnionLocalId=null,
        /** @var int|null */
        public ?int $WorkerClassificationId=null,
        /** @var DateTime|null */
        public ?DateTime $SeniorityDate=null,
        /** @var string|null */
        public ?string $UnionMemberNumber=null,
        /** @var bool|null */
        public ?bool $VoiceConsent=null,
        /** @var DateTime|null */
        public ?DateTime $VoiceConsentAtUtc=null,
        /** @var string|null */
        public ?string $VoiceConsentSource=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
        if (isset($o['ContactType'])) $this->ContactType = $o['ContactType'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Role'])) $this->Role = $o['Role'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['EmailWork'])) $this->EmailWork = $o['EmailWork'];
        if (isset($o['EmailPersonal'])) $this->EmailPersonal = $o['EmailPersonal'];
        if (isset($o['District'])) $this->District = $o['District'];
        if (isset($o['DistrictID'])) $this->DistrictID = $o['DistrictID'];
        if (isset($o['School'])) $this->School = $o['School'];
        if (isset($o['SchoolID'])) $this->SchoolID = $o['SchoolID'];
        if (isset($o['State'])) $this->State = $o['State'];
        if (isset($o['StateName'])) $this->StateName = $o['StateName'];
        if (isset($o['StateID'])) $this->StateID = $o['StateID'];
        if (isset($o['CountyID'])) $this->CountyID = $o['CountyID'];
        if (isset($o['County'])) $this->County = $o['County'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['Department'])) $this->Department = $o['Department'];
        if (isset($o['Flow'])) $this->Flow = $o['Flow'];
        if (isset($o['LastContact'])) $this->LastContact = JsonConverters::from('DateTime', $o['LastContact']);
        if (isset($o['DoNotContact'])) $this->DoNotContact = $o['DoNotContact'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
        if (isset($o['PhoneAlt'])) $this->PhoneAlt = $o['PhoneAlt'];
        if (isset($o['PeraContactId'])) $this->PeraContactId = $o['PeraContactId'];
        if (isset($o['RoomNumber'])) $this->RoomNumber = $o['RoomNumber'];
        if (isset($o['SourceTypeId'])) $this->SourceTypeId = $o['SourceTypeId'];
        if (isset($o['SourceTypeDesc'])) $this->SourceTypeDesc = $o['SourceTypeDesc'];
        if (isset($o['SourceNote'])) $this->SourceNote = $o['SourceNote'];
        if (isset($o['ContactStatusId'])) $this->ContactStatusId = $o['ContactStatusId'];
        if (isset($o['ContactStatusDesc'])) $this->ContactStatusDesc = $o['ContactStatusDesc'];
        if (isset($o['SSN'])) $this->SSN = $o['SSN'];
        if (isset($o['DateOfBirth'])) $this->DateOfBirth = JsonConverters::from('DateTime', $o['DateOfBirth']);
        if (isset($o['Deleted'])) $this->Deleted = $o['Deleted'];
        if (isset($o['IsShared'])) $this->IsShared = $o['IsShared'];
        if (isset($o['address_line1'])) $this->address_line1 = $o['address_line1'];
        if (isset($o['address_city'])) $this->address_city = $o['address_city'];
        if (isset($o['address_state'])) $this->address_state = $o['address_state'];
        if (isset($o['address_zip'])) $this->address_zip = $o['address_zip'];
        if (isset($o['DeletedBy'])) $this->DeletedBy = $o['DeletedBy'];
        if (isset($o['DeletedDateTimeUtc'])) $this->DeletedDateTimeUtc = JsonConverters::from('DateTime', $o['DeletedDateTimeUtc']);
        if (isset($o['HasNBC'])) $this->HasNBC = $o['HasNBC'];
        if (isset($o['HasFactFinderSheet'])) $this->HasFactFinderSheet = $o['HasFactFinderSheet'];
        if (isset($o['MiddleInitial'])) $this->MiddleInitial = $o['MiddleInitial'];
        if (isset($o['Tags'])) $this->Tags = $o['Tags'];
        if (isset($o['DateCreated'])) $this->DateCreated = JsonConverters::from('DateTime', $o['DateCreated']);
        if (isset($o['PhoneLabel'])) $this->PhoneLabel = $o['PhoneLabel'];
        if (isset($o['AltPhoneLabel'])) $this->AltPhoneLabel = $o['AltPhoneLabel'];
        if (isset($o['Carriers'])) $this->Carriers = $o['Carriers'];
        if (isset($o['ContactImage'])) $this->ContactImage = $o['ContactImage'];
        if (isset($o['CompanyAffiliation'])) $this->CompanyAffiliation = $o['CompanyAffiliation'];
        if (isset($o['AdditionalInformation'])) $this->AdditionalInformation = $o['AdditionalInformation'];
        if (isset($o['HasGiftCard'])) $this->HasGiftCard = $o['HasGiftCard'];
        if (isset($o['ContactCategory'])) $this->ContactCategory = $o['ContactCategory'];
        if (isset($o['WritingAgentId'])) $this->WritingAgentId = $o['WritingAgentId'];
        if (isset($o['WritingAgentName'])) $this->WritingAgentName = $o['WritingAgentName'];
        if (isset($o['MaritalStatus'])) $this->MaritalStatus = $o['MaritalStatus'];
        if (isset($o['TotalDebtAmount'])) $this->TotalDebtAmount = $o['TotalDebtAmount'];
        if (isset($o['NumberOfDebtAccounts'])) $this->NumberOfDebtAccounts = $o['NumberOfDebtAccounts'];
        if (isset($o['FactFinderCodeId'])) $this->FactFinderCodeId = $o['FactFinderCodeId'];
        if (isset($o['BusinessName'])) $this->BusinessName = $o['BusinessName'];
        if (isset($o['DBA'])) $this->DBA = $o['DBA'];
        if (isset($o['ContactGUID'])) $this->ContactGUID = $o['ContactGUID'];
        if (isset($o['ProjectEndDate'])) $this->ProjectEndDate = JsonConverters::from('DateTime', $o['ProjectEndDate']);
        if (isset($o['Rate'])) $this->Rate = $o['Rate'];
        if (isset($o['JobID'])) $this->JobID = $o['JobID'];
        if (isset($o['JobName'])) $this->JobName = $o['JobName'];
        if (isset($o['JobCount'])) $this->JobCount = $o['JobCount'];
        if (isset($o['Locked'])) $this->Locked = $o['Locked'];
        if (isset($o['LockedByAgentId'])) $this->LockedByAgentId = $o['LockedByAgentId'];
        if (isset($o['LockedTimestamp'])) $this->LockedTimestamp = JsonConverters::from('DateTime', $o['LockedTimestamp']);
        if (isset($o['Initials'])) $this->Initials = $o['Initials'];
        if (isset($o['ContactCategoryName'])) $this->ContactCategoryName = $o['ContactCategoryName'];
        if (isset($o['SMSOptIn'])) $this->SMSOptIn = $o['SMSOptIn'];
        if (isset($o['IsPlaceholder'])) $this->IsPlaceholder = $o['IsPlaceholder'];
        if (isset($o['Skills'])) $this->Skills = JsonConverters::fromArray('string', $o['Skills']);
        if (isset($o['Departments'])) $this->Departments = JsonConverters::fromArray('Department', $o['Departments']);
        if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
        if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
        if (isset($o['UnionLocalId'])) $this->UnionLocalId = $o['UnionLocalId'];
        if (isset($o['WorkerClassificationId'])) $this->WorkerClassificationId = $o['WorkerClassificationId'];
        if (isset($o['SeniorityDate'])) $this->SeniorityDate = JsonConverters::from('DateTime', $o['SeniorityDate']);
        if (isset($o['UnionMemberNumber'])) $this->UnionMemberNumber = $o['UnionMemberNumber'];
        if (isset($o['VoiceConsent'])) $this->VoiceConsent = $o['VoiceConsent'];
        if (isset($o['VoiceConsentAtUtc'])) $this->VoiceConsentAtUtc = JsonConverters::from('DateTime', $o['VoiceConsentAtUtc']);
        if (isset($o['VoiceConsentSource'])) $this->VoiceConsentSource = $o['VoiceConsentSource'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
        if (isset($this->ContactType)) $o['ContactType'] = $this->ContactType;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Role)) $o['Role'] = $this->Role;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->EmailWork)) $o['EmailWork'] = $this->EmailWork;
        if (isset($this->EmailPersonal)) $o['EmailPersonal'] = $this->EmailPersonal;
        if (isset($this->District)) $o['District'] = $this->District;
        if (isset($this->DistrictID)) $o['DistrictID'] = $this->DistrictID;
        if (isset($this->School)) $o['School'] = $this->School;
        if (isset($this->SchoolID)) $o['SchoolID'] = $this->SchoolID;
        if (isset($this->State)) $o['State'] = $this->State;
        if (isset($this->StateName)) $o['StateName'] = $this->StateName;
        if (isset($this->StateID)) $o['StateID'] = $this->StateID;
        if (isset($this->CountyID)) $o['CountyID'] = $this->CountyID;
        if (isset($this->County)) $o['County'] = $this->County;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->Department)) $o['Department'] = $this->Department;
        if (isset($this->Flow)) $o['Flow'] = $this->Flow;
        if (isset($this->LastContact)) $o['LastContact'] = JsonConverters::to('DateTime', $this->LastContact);
        if (isset($this->DoNotContact)) $o['DoNotContact'] = $this->DoNotContact;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
        if (isset($this->PhoneAlt)) $o['PhoneAlt'] = $this->PhoneAlt;
        if (isset($this->PeraContactId)) $o['PeraContactId'] = $this->PeraContactId;
        if (isset($this->RoomNumber)) $o['RoomNumber'] = $this->RoomNumber;
        if (isset($this->SourceTypeId)) $o['SourceTypeId'] = $this->SourceTypeId;
        if (isset($this->SourceTypeDesc)) $o['SourceTypeDesc'] = $this->SourceTypeDesc;
        if (isset($this->SourceNote)) $o['SourceNote'] = $this->SourceNote;
        if (isset($this->ContactStatusId)) $o['ContactStatusId'] = $this->ContactStatusId;
        if (isset($this->ContactStatusDesc)) $o['ContactStatusDesc'] = $this->ContactStatusDesc;
        if (isset($this->SSN)) $o['SSN'] = $this->SSN;
        if (isset($this->DateOfBirth)) $o['DateOfBirth'] = JsonConverters::to('DateTime', $this->DateOfBirth);
        if (isset($this->Deleted)) $o['Deleted'] = $this->Deleted;
        if (isset($this->IsShared)) $o['IsShared'] = $this->IsShared;
        if (isset($this->address_line1)) $o['address_line1'] = $this->address_line1;
        if (isset($this->address_city)) $o['address_city'] = $this->address_city;
        if (isset($this->address_state)) $o['address_state'] = $this->address_state;
        if (isset($this->address_zip)) $o['address_zip'] = $this->address_zip;
        if (isset($this->DeletedBy)) $o['DeletedBy'] = $this->DeletedBy;
        if (isset($this->DeletedDateTimeUtc)) $o['DeletedDateTimeUtc'] = JsonConverters::to('DateTime', $this->DeletedDateTimeUtc);
        if (isset($this->HasNBC)) $o['HasNBC'] = $this->HasNBC;
        if (isset($this->HasFactFinderSheet)) $o['HasFactFinderSheet'] = $this->HasFactFinderSheet;
        if (isset($this->MiddleInitial)) $o['MiddleInitial'] = $this->MiddleInitial;
        if (isset($this->Tags)) $o['Tags'] = $this->Tags;
        if (isset($this->DateCreated)) $o['DateCreated'] = JsonConverters::to('DateTime', $this->DateCreated);
        if (isset($this->PhoneLabel)) $o['PhoneLabel'] = $this->PhoneLabel;
        if (isset($this->AltPhoneLabel)) $o['AltPhoneLabel'] = $this->AltPhoneLabel;
        if (isset($this->Carriers)) $o['Carriers'] = $this->Carriers;
        if (isset($this->ContactImage)) $o['ContactImage'] = $this->ContactImage;
        if (isset($this->CompanyAffiliation)) $o['CompanyAffiliation'] = $this->CompanyAffiliation;
        if (isset($this->AdditionalInformation)) $o['AdditionalInformation'] = $this->AdditionalInformation;
        if (isset($this->HasGiftCard)) $o['HasGiftCard'] = $this->HasGiftCard;
        if (isset($this->ContactCategory)) $o['ContactCategory'] = $this->ContactCategory;
        if (isset($this->WritingAgentId)) $o['WritingAgentId'] = $this->WritingAgentId;
        if (isset($this->WritingAgentName)) $o['WritingAgentName'] = $this->WritingAgentName;
        if (isset($this->MaritalStatus)) $o['MaritalStatus'] = $this->MaritalStatus;
        if (isset($this->TotalDebtAmount)) $o['TotalDebtAmount'] = $this->TotalDebtAmount;
        if (isset($this->NumberOfDebtAccounts)) $o['NumberOfDebtAccounts'] = $this->NumberOfDebtAccounts;
        if (isset($this->FactFinderCodeId)) $o['FactFinderCodeId'] = $this->FactFinderCodeId;
        if (isset($this->BusinessName)) $o['BusinessName'] = $this->BusinessName;
        if (isset($this->DBA)) $o['DBA'] = $this->DBA;
        if (isset($this->ContactGUID)) $o['ContactGUID'] = $this->ContactGUID;
        if (isset($this->ProjectEndDate)) $o['ProjectEndDate'] = JsonConverters::to('DateTime', $this->ProjectEndDate);
        if (isset($this->Rate)) $o['Rate'] = $this->Rate;
        if (isset($this->JobID)) $o['JobID'] = $this->JobID;
        if (isset($this->JobName)) $o['JobName'] = $this->JobName;
        if (isset($this->JobCount)) $o['JobCount'] = $this->JobCount;
        if (isset($this->Locked)) $o['Locked'] = $this->Locked;
        if (isset($this->LockedByAgentId)) $o['LockedByAgentId'] = $this->LockedByAgentId;
        if (isset($this->LockedTimestamp)) $o['LockedTimestamp'] = JsonConverters::to('DateTime', $this->LockedTimestamp);
        if (isset($this->Initials)) $o['Initials'] = $this->Initials;
        if (isset($this->ContactCategoryName)) $o['ContactCategoryName'] = $this->ContactCategoryName;
        if (isset($this->SMSOptIn)) $o['SMSOptIn'] = $this->SMSOptIn;
        if (isset($this->IsPlaceholder)) $o['IsPlaceholder'] = $this->IsPlaceholder;
        if (isset($this->Skills)) $o['Skills'] = JsonConverters::toArray('string', $this->Skills);
        if (isset($this->Departments)) $o['Departments'] = JsonConverters::toArray('Department', $this->Departments);
        if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
        if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
        if (isset($this->UnionLocalId)) $o['UnionLocalId'] = $this->UnionLocalId;
        if (isset($this->WorkerClassificationId)) $o['WorkerClassificationId'] = $this->WorkerClassificationId;
        if (isset($this->SeniorityDate)) $o['SeniorityDate'] = JsonConverters::to('DateTime', $this->SeniorityDate);
        if (isset($this->UnionMemberNumber)) $o['UnionMemberNumber'] = $this->UnionMemberNumber;
        if (isset($this->VoiceConsent)) $o['VoiceConsent'] = $this->VoiceConsent;
        if (isset($this->VoiceConsentAtUtc)) $o['VoiceConsentAtUtc'] = JsonConverters::to('DateTime', $this->VoiceConsentAtUtc);
        if (isset($this->VoiceConsentSource)) $o['VoiceConsentSource'] = $this->VoiceConsentSource;
        return empty($o) ? new class(){} : $o;
    }
}

class ProjectCrewMember extends Contact implements JsonSerializable
{
    /**
     * @param int $ContactId
     * @param int $ContactType
     * @param string|null $FirstName
     * @param string|null $LastName
     * @param string|null $Name
     * @param string|null $Role
     * @param string|null $Title
     * @param string|null $EmailWork
     * @param string|null $EmailPersonal
     * @param string|null $District
     * @param int $DistrictID
     * @param string|null $School
     * @param int $SchoolID
     * @param string|null $State
     * @param string|null $StateName
     * @param int $StateID
     * @param int $CountyID
     * @param string|null $County
     * @param string|null $Phone
     * @param string|null $Department
     * @param string|null $Flow
     * @param DateTime $LastContact
     * @param bool|null $DoNotContact
     * @param bool|null $Active
     * @param int $AgentId
     * @param string|null $PhoneAlt
     * @param int $PeraContactId
     * @param string|null $RoomNumber
     * @param int $SourceTypeId
     * @param string|null $SourceTypeDesc
     * @param string|null $SourceNote
     * @param int $ContactStatusId
     * @param string|null $ContactStatusDesc
     * @param string|null $SSN
     * @param DateTime $DateOfBirth
     * @param bool|null $Deleted
     * @param bool|null $IsShared
     * @param string|null $address_line1
     * @param string|null $address_city
     * @param string|null $address_state
     * @param string|null $address_zip
     * @param string|null $DeletedBy
     * @param DateTime|null $DeletedDateTimeUtc
     * @param bool|null $HasNBC
     * @param bool|null $HasFactFinderSheet
     * @param string|null $MiddleInitial
     * @param string|null $Tags
     * @param DateTime $DateCreated
     * @param string|null $PhoneLabel
     * @param string|null $AltPhoneLabel
     * @param string|null $Carriers
     * @param string|null $ContactImage
     * @param string|null $CompanyAffiliation
     * @param string|null $AdditionalInformation
     * @param bool|null $HasGiftCard
     * @param int $ContactCategory
     * @param int $WritingAgentId
     * @param string|null $WritingAgentName
     * @param string|null $MaritalStatus
     * @param float $TotalDebtAmount
     * @param int $NumberOfDebtAccounts
     * @param int $FactFinderCodeId
     * @param string|null $BusinessName
     * @param string|null $DBA
     * @param string $ContactGUID
     * @param DateTime $ProjectEndDate
     * @param float $Rate
     * @param int $JobID
     * @param string|null $JobName
     * @param int $JobCount
     * @param bool|null $Locked
     * @param int $LockedByAgentId
     * @param DateTime $LockedTimestamp
     * @param string|null $Initials
     * @param string|null $ContactCategoryName
     * @param bool|null $SMSOptIn
     * @param bool|null $IsPlaceholder
     * @param array<string>|null $Skills
     * @param array<Department>|null $Departments
     * @param string $BranchId
     * @param string|null $BranchName
     * @param int|null $UnionLocalId
     * @param int|null $WorkerClassificationId
     * @param DateTime|null $SeniorityDate
     * @param string|null $UnionMemberNumber
     * @param bool|null $VoiceConsent
     * @param DateTime|null $VoiceConsentAtUtc
     * @param string|null $VoiceConsentSource
     */
    public function __construct(
        int $ContactId=0,
        int $ContactType=0,
        ?string $FirstName=null,
        ?string $LastName=null,
        ?string $Name=null,
        ?string $Role=null,
        ?string $Title=null,
        ?string $EmailWork=null,
        ?string $EmailPersonal=null,
        ?string $District=null,
        int $DistrictID=0,
        ?string $School=null,
        int $SchoolID=0,
        ?string $State=null,
        ?string $StateName=null,
        int $StateID=0,
        int $CountyID=0,
        ?string $County=null,
        ?string $Phone=null,
        ?string $Department=null,
        ?string $Flow=null,
        DateTime $LastContact=new DateTime(),
        ?bool $DoNotContact=null,
        ?bool $Active=null,
        int $AgentId=0,
        ?string $PhoneAlt=null,
        int $PeraContactId=0,
        ?string $RoomNumber=null,
        int $SourceTypeId=0,
        ?string $SourceTypeDesc=null,
        ?string $SourceNote=null,
        int $ContactStatusId=0,
        ?string $ContactStatusDesc=null,
        ?string $SSN=null,
        DateTime $DateOfBirth=new DateTime(),
        ?bool $Deleted=null,
        ?bool $IsShared=null,
        ?string $address_line1=null,
        ?string $address_city=null,
        ?string $address_state=null,
        ?string $address_zip=null,
        ?string $DeletedBy=null,
        ?DateTime $DeletedDateTimeUtc=null,
        ?bool $HasNBC=null,
        ?bool $HasFactFinderSheet=null,
        ?string $MiddleInitial=null,
        ?string $Tags=null,
        DateTime $DateCreated=new DateTime(),
        ?string $PhoneLabel=null,
        ?string $AltPhoneLabel=null,
        ?string $Carriers=null,
        ?string $ContactImage=null,
        ?string $CompanyAffiliation=null,
        ?string $AdditionalInformation=null,
        ?bool $HasGiftCard=null,
        int $ContactCategory=0,
        int $WritingAgentId=0,
        ?string $WritingAgentName=null,
        ?string $MaritalStatus=null,
        float $TotalDebtAmount=0.0,
        int $NumberOfDebtAccounts=0,
        int $FactFinderCodeId=0,
        ?string $BusinessName=null,
        ?string $DBA=null,
        string $ContactGUID='',
        DateTime $ProjectEndDate=new DateTime(),
        float $Rate=0.0,
        int $JobID=0,
        ?string $JobName=null,
        int $JobCount=0,
        ?bool $Locked=null,
        int $LockedByAgentId=0,
        DateTime $LockedTimestamp=new DateTime(),
        ?string $Initials=null,
        ?string $ContactCategoryName=null,
        ?bool $SMSOptIn=null,
        ?bool $IsPlaceholder=null,
        ?array $Skills=null,
        ?array $Departments=null,
        string $BranchId='',
        ?string $BranchName=null,
        ?int $UnionLocalId=null,
        ?int $WorkerClassificationId=null,
        ?DateTime $SeniorityDate=null,
        ?string $UnionMemberNumber=null,
        ?bool $VoiceConsent=null,
        ?DateTime $VoiceConsentAtUtc=null,
        ?string $VoiceConsentSource=null,
        /** @var int */
        public int $ProjectCrewContactID=0,
        /** @var int */
        public int $ProjectID=0,
        /** @var int */
        public int $CrewID=0,
        /** @var float */
        public float $CrewRate=0.0,
        /** @var float */
        public float $BilledCrewRate=0.0,
        /** @var int */
        public int $ProjectCrewID=0,
        /** @var string|null */
        public ?string $Status=null,
        /** @var DateTime */
        public DateTime $FirstAddedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $DateAddedToThisProject=new DateTime()
    ) {
        parent::__construct($ContactId,$ContactType,$FirstName,$LastName,$Name,$Role,$Title,$EmailWork,$EmailPersonal,$District,$DistrictID,$School,$SchoolID,$State,$StateName,$StateID,$CountyID,$County,$Phone,$Department,$Flow,$LastContact,$DoNotContact,$Active,$AgentId,$PhoneAlt,$PeraContactId,$RoomNumber,$SourceTypeId,$SourceTypeDesc,$SourceNote,$ContactStatusId,$ContactStatusDesc,$SSN,$DateOfBirth,$Deleted,$IsShared,$address_line1,$address_city,$address_state,$address_zip,$DeletedBy,$DeletedDateTimeUtc,$HasNBC,$HasFactFinderSheet,$MiddleInitial,$Tags,$DateCreated,$PhoneLabel,$AltPhoneLabel,$Carriers,$ContactImage,$CompanyAffiliation,$AdditionalInformation,$HasGiftCard,$ContactCategory,$WritingAgentId,$WritingAgentName,$MaritalStatus,$TotalDebtAmount,$NumberOfDebtAccounts,$FactFinderCodeId,$BusinessName,$DBA,$ContactGUID,$ProjectEndDate,$Rate,$JobID,$JobName,$JobCount,$Locked,$LockedByAgentId,$LockedTimestamp,$Initials,$ContactCategoryName,$SMSOptIn,$IsPlaceholder,$Skills,$Departments,$BranchId,$BranchName,$UnionLocalId,$WorkerClassificationId,$SeniorityDate,$UnionMemberNumber,$VoiceConsent,$VoiceConsentAtUtc,$VoiceConsentSource);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ProjectCrewContactID'])) $this->ProjectCrewContactID = $o['ProjectCrewContactID'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['CrewID'])) $this->CrewID = $o['CrewID'];
        if (isset($o['CrewRate'])) $this->CrewRate = $o['CrewRate'];
        if (isset($o['BilledCrewRate'])) $this->BilledCrewRate = $o['BilledCrewRate'];
        if (isset($o['ProjectCrewID'])) $this->ProjectCrewID = $o['ProjectCrewID'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['FirstAddedDate'])) $this->FirstAddedDate = JsonConverters::from('DateTime', $o['FirstAddedDate']);
        if (isset($o['DateAddedToThisProject'])) $this->DateAddedToThisProject = JsonConverters::from('DateTime', $o['DateAddedToThisProject']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->ProjectCrewContactID)) $o['ProjectCrewContactID'] = $this->ProjectCrewContactID;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->CrewID)) $o['CrewID'] = $this->CrewID;
        if (isset($this->CrewRate)) $o['CrewRate'] = $this->CrewRate;
        if (isset($this->BilledCrewRate)) $o['BilledCrewRate'] = $this->BilledCrewRate;
        if (isset($this->ProjectCrewID)) $o['ProjectCrewID'] = $this->ProjectCrewID;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->FirstAddedDate)) $o['FirstAddedDate'] = JsonConverters::to('DateTime', $this->FirstAddedDate);
        if (isset($this->DateAddedToThisProject)) $o['DateAddedToThisProject'] = JsonConverters::to('DateTime', $this->DateAddedToThisProject);
        return empty($o) ? new class(){} : $o;
    }
}

class CrewAssignmentsCrewMembersResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var array<ProjectCrewMember>|null */
        public ?array $ProjectCrewMembers=null
    ) {
    }

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

class CrewAssignmentsCrewMembersRequest implements JsonSerializable
{
    public function __construct(
        /** @var DateTime */
        public DateTime $SelectedDate=new DateTime()
    ) {
    }

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

PHP CrewAssignmentsCrewMembersRequest 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/CrewAssignments/CrewMembers/{SelectedDate} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CrewAssignmentsCrewMembersRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <SelectedDate>0001-01-01T00:00:00</SelectedDate>
</CrewAssignmentsCrewMembersRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CrewAssignmentsCrewMembersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ProjectCrewMembers>
    <ProjectCrewMember>
      <Active>false</Active>
      <AdditionalInformation>String</AdditionalInformation>
      <AgentId>0</AgentId>
      <AltPhoneLabel>String</AltPhoneLabel>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <BusinessName>String</BusinessName>
      <Carriers>String</Carriers>
      <CompanyAffiliation>String</CompanyAffiliation>
      <ContactCategory>0</ContactCategory>
      <ContactCategoryName>String</ContactCategoryName>
      <ContactGUID>00000000-0000-0000-0000-000000000000</ContactGUID>
      <ContactId>0</ContactId>
      <ContactImage>String</ContactImage>
      <ContactStatusDesc>String</ContactStatusDesc>
      <ContactStatusId>0</ContactStatusId>
      <ContactType>0</ContactType>
      <County>String</County>
      <CountyID>0</CountyID>
      <DBA>String</DBA>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateOfBirth>0001-01-01T00:00:00</DateOfBirth>
      <Deleted>false</Deleted>
      <DeletedBy>String</DeletedBy>
      <DeletedDateTimeUtc>0001-01-01T00:00:00</DeletedDateTimeUtc>
      <Department>String</Department>
      <Departments>
        <Department>
          <Active>false</Active>
          <ApprovalOn>false</ApprovalOn>
          <BillingContact>String</BillingContact>
          <BillingEmail>String</BillingEmail>
          <BillingMethod>String</BillingMethod>
          <Budget>0</Budget>
          <Code>String</Code>
          <Color>String</Color>
          <CostCenter>String</CostCenter>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <DepartmentID>0</DepartmentID>
          <DepartmentUID>00000000-0000-0000-0000-000000000000</DepartmentUID>
          <Description>String</Description>
          <Members>0</Members>
          <Name>String</Name>
          <Threshold>0</Threshold>
        </Department>
      </Departments>
      <District>String</District>
      <DistrictID>0</DistrictID>
      <DoNotContact>false</DoNotContact>
      <EmailPersonal>String</EmailPersonal>
      <EmailWork>String</EmailWork>
      <FactFinderCodeId>0</FactFinderCodeId>
      <FirstName>String</FirstName>
      <Flow>String</Flow>
      <HasFactFinderSheet>false</HasFactFinderSheet>
      <HasGiftCard>false</HasGiftCard>
      <HasNBC>false</HasNBC>
      <Initials>String</Initials>
      <IsPlaceholder>false</IsPlaceholder>
      <IsShared>false</IsShared>
      <JobCount>0</JobCount>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <LastContact>0001-01-01T00:00:00</LastContact>
      <LastName>String</LastName>
      <Locked>false</Locked>
      <LockedByAgentId>0</LockedByAgentId>
      <LockedTimestamp>0001-01-01T00:00:00</LockedTimestamp>
      <MaritalStatus>String</MaritalStatus>
      <MiddleInitial>String</MiddleInitial>
      <Name>String</Name>
      <NumberOfDebtAccounts>0</NumberOfDebtAccounts>
      <PeraContactId>0</PeraContactId>
      <Phone>String</Phone>
      <PhoneAlt>String</PhoneAlt>
      <PhoneLabel>String</PhoneLabel>
      <ProjectEndDate>0001-01-01T00:00:00</ProjectEndDate>
      <Rate>0</Rate>
      <Role>String</Role>
      <RoomNumber>String</RoomNumber>
      <SMSOptIn>false</SMSOptIn>
      <SSN>String</SSN>
      <School>String</School>
      <SchoolID>0</SchoolID>
      <SeniorityDate>0001-01-01T00:00:00</SeniorityDate>
      <Skills xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Skills>
      <SourceNote>String</SourceNote>
      <SourceTypeDesc>String</SourceTypeDesc>
      <SourceTypeId>0</SourceTypeId>
      <State>String</State>
      <StateID>0</StateID>
      <StateName>String</StateName>
      <Tags>String</Tags>
      <Title>String</Title>
      <TotalDebtAmount>0</TotalDebtAmount>
      <UnionLocalId>0</UnionLocalId>
      <UnionMemberNumber>String</UnionMemberNumber>
      <VoiceConsent>false</VoiceConsent>
      <VoiceConsentAtUtc>0001-01-01T00:00:00</VoiceConsentAtUtc>
      <VoiceConsentSource>String</VoiceConsentSource>
      <WorkerClassificationId>0</WorkerClassificationId>
      <WritingAgentId>0</WritingAgentId>
      <WritingAgentName>String</WritingAgentName>
      <address_city>String</address_city>
      <address_line1>String</address_line1>
      <address_state>String</address_state>
      <address_zip>String</address_zip>
      <BilledCrewRate>0</BilledCrewRate>
      <CrewID>0</CrewID>
      <CrewRate>0</CrewRate>
      <DateAddedToThisProject>0001-01-01T00:00:00</DateAddedToThisProject>
      <FirstAddedDate>0001-01-01T00:00:00</FirstAddedDate>
      <ProjectCrewContactID>0</ProjectCrewContactID>
      <ProjectCrewID>0</ProjectCrewID>
      <ProjectID>0</ProjectID>
      <Status>String</Status>
    </ProjectCrewMember>
  </ProjectCrewMembers>
  <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>
</CrewAssignmentsCrewMembersResponse>