Trendsic Platform Service

<back to all web services

AgentContractRequest

Requires Authentication
Required roles:Agent, AdministratorRequires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET/v1/AgentContract/{AgentId}
PUT,OPTIONS/v1/AgentContract
<?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 QueueDefault implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $LocationId='',
        /** @var array<string>|null */
        public ?array $Services=null
    ) {
    }

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

class Agent implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentId=0,
        /** @var string|null */
        public ?string $Company=null,
        /** @var string|null */
        public ?string $AgentName=null,
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var string|null */
        public ?string $MiddleInitial=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 string|null */
        public ?string $Country=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $EmailSignature=null,
        /** @var string|null */
        public ?string $HomePhone=null,
        /** @var string|null */
        public ?string $CellPhone=null,
        /** @var string|null */
        public ?string $WorkPhone=null,
        /** @var bool|null */
        public ?bool $InsLicensed=null,
        /** @var bool|null */
        public ?bool $AgreeToDisclosures=null,
        /** @var DateTime|null */
        public ?DateTime $AgreeToDate=null,
        /** @var DateTime|null */
        public ?DateTime $PaidDate=null,
        /** @var string|null */
        public ?string $AgentNumber=null,
        /** @var string|null */
        public ?string $ReferringAgent=null,
        /** @var string|null */
        public ?string $PlacementAgent=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedDate=null,
        /** @var string */
        public string $UserId='',
        /** @var bool|null */
        public ?bool $IsAgent=null,
        /** @var string|null */
        public ?string $Package=null,
        /** @var string|null */
        public ?string $StoreName=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var int|null */
        public ?int $Upline1=null,
        /** @var int|null */
        public ?int $Upline2=null,
        /** @var int|null */
        public ?int $Upline3=null,
        /** @var int|null */
        public ?int $Upline4=null,
        /** @var int|null */
        public ?int $MVPID=null,
        /** @var int|null */
        public ?int $AVPID=null,
        /** @var int|null */
        public ?int $RVPID=null,
        /** @var float|null */
        public ?float $AgentLevel=null,
        /** @var bool|null */
        public ?bool $IsMVP=null,
        /** @var bool|null */
        public ?bool $IsRVP=null,
        /** @var bool|null */
        public ?bool $IsAVP=null,
        /** @var bool|null */
        public ?bool $IsAdmin=null,
        /** @var bool|null */
        public ?bool $IsBusinessCardAdmin=null,
        /** @var string|null */
        public ?string $TeamName=null,
        /** @var string */
        public string $LocationId='',
        /** @var string */
        public string $CalendarId='',
        /** @var string|null */
        public ?string $Rank=null,
        /** @var bool|null */
        public ?bool $NBC=null,
        /** @var float|null */
        public ?float $Upline1Percent=null,
        /** @var float|null */
        public ?float $Upline2Percent=null,
        /** @var float|null */
        public ?float $Upline3Percent=null,
        /** @var float|null */
        public ?float $Upline4Percent=null,
        /** @var string|null */
        public ?string $AgentStatus=null,
        /** @var string|null */
        public ?string $Office=null,
        /** @var DateTime|null */
        public ?DateTime $DOB=null,
        /** @var string|null */
        public ?string $SSN=null,
        /** @var string|null */
        public ?string $Fax=null,
        /** @var string|null */
        public ?string $BusinessEmail=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $ModifiedBy=null,
        /** @var string|null */
        public ?string $TimeZone=null,
        /** @var bool|null */
        public ?bool $LeaderLocked=null,
        /** @var DateTime */
        public DateTime $LastSubmittedBusinessDate=new DateTime(),
        /** @var DateTime */
        public DateTime $GracePeriodDate=new DateTime(),
        /** @var bool|null */
        public ?bool $Vested=null,
        /** @var DateTime */
        public DateTime $DirectPay=new DateTime(),
        /** @var string|null */
        public ?string $DirectPayApprBy=null,
        /** @var float|null */
        public ?float $FactFinderBilling=null,
        /** @var string|null */
        public ?string $FullName=null,
        /** @var string|null */
        public ?string $ByLastName=null,
        /** @var bool|null */
        public ?bool $IsSecurityLicensed=null,
        /** @var bool|null */
        public ?bool $IsEncompassAdmin=null,
        /** @var string */
        public string $ApiKey='',
        /** @var string|null */
        public ?string $LastSessionId=null,
        /** @var DateTime|null */
        public ?DateTime $LastLogin=null,
        /** @var bool|null */
        public ?bool $MfaActive=null,
        /** @var bool|null */
        public ?bool $RequireMFA=null,
        /** @var string|null */
        public ?string $SMSPhoneNumber=null,
        /** @var bool|null */
        public ?bool $VerifiedEmailStatus=null,
        /** @var bool|null */
        public ?bool $VerifiedCellPhoneStatus=null,
        /** @var string|null */
        public ?string $SchedulerUrl=null,
        /** @var QueueDefault|null */
        public ?QueueDefault $QueueDefaults=null,
        /** @var array<string>|null */
        public ?array $Roles=null,
        /** @var bool|null */
        public ?bool $PasswordUpdated=null,
        /** @var bool|null */
        public ?bool $RestrictToSingleSession=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
        if (isset($o['Company'])) $this->Company = $o['Company'];
        if (isset($o['AgentName'])) $this->AgentName = $o['AgentName'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['MiddleInitial'])) $this->MiddleInitial = $o['MiddleInitial'];
        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['Country'])) $this->Country = $o['Country'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['EmailSignature'])) $this->EmailSignature = $o['EmailSignature'];
        if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
        if (isset($o['CellPhone'])) $this->CellPhone = $o['CellPhone'];
        if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
        if (isset($o['InsLicensed'])) $this->InsLicensed = $o['InsLicensed'];
        if (isset($o['AgreeToDisclosures'])) $this->AgreeToDisclosures = $o['AgreeToDisclosures'];
        if (isset($o['AgreeToDate'])) $this->AgreeToDate = JsonConverters::from('DateTime', $o['AgreeToDate']);
        if (isset($o['PaidDate'])) $this->PaidDate = JsonConverters::from('DateTime', $o['PaidDate']);
        if (isset($o['AgentNumber'])) $this->AgentNumber = $o['AgentNumber'];
        if (isset($o['ReferringAgent'])) $this->ReferringAgent = $o['ReferringAgent'];
        if (isset($o['PlacementAgent'])) $this->PlacementAgent = $o['PlacementAgent'];
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['IsAgent'])) $this->IsAgent = $o['IsAgent'];
        if (isset($o['Package'])) $this->Package = $o['Package'];
        if (isset($o['StoreName'])) $this->StoreName = $o['StoreName'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['Upline1'])) $this->Upline1 = $o['Upline1'];
        if (isset($o['Upline2'])) $this->Upline2 = $o['Upline2'];
        if (isset($o['Upline3'])) $this->Upline3 = $o['Upline3'];
        if (isset($o['Upline4'])) $this->Upline4 = $o['Upline4'];
        if (isset($o['MVPID'])) $this->MVPID = $o['MVPID'];
        if (isset($o['AVPID'])) $this->AVPID = $o['AVPID'];
        if (isset($o['RVPID'])) $this->RVPID = $o['RVPID'];
        if (isset($o['AgentLevel'])) $this->AgentLevel = $o['AgentLevel'];
        if (isset($o['IsMVP'])) $this->IsMVP = $o['IsMVP'];
        if (isset($o['IsRVP'])) $this->IsRVP = $o['IsRVP'];
        if (isset($o['IsAVP'])) $this->IsAVP = $o['IsAVP'];
        if (isset($o['IsAdmin'])) $this->IsAdmin = $o['IsAdmin'];
        if (isset($o['IsBusinessCardAdmin'])) $this->IsBusinessCardAdmin = $o['IsBusinessCardAdmin'];
        if (isset($o['TeamName'])) $this->TeamName = $o['TeamName'];
        if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
        if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
        if (isset($o['Rank'])) $this->Rank = $o['Rank'];
        if (isset($o['NBC'])) $this->NBC = $o['NBC'];
        if (isset($o['Upline1Percent'])) $this->Upline1Percent = $o['Upline1Percent'];
        if (isset($o['Upline2Percent'])) $this->Upline2Percent = $o['Upline2Percent'];
        if (isset($o['Upline3Percent'])) $this->Upline3Percent = $o['Upline3Percent'];
        if (isset($o['Upline4Percent'])) $this->Upline4Percent = $o['Upline4Percent'];
        if (isset($o['AgentStatus'])) $this->AgentStatus = $o['AgentStatus'];
        if (isset($o['Office'])) $this->Office = $o['Office'];
        if (isset($o['DOB'])) $this->DOB = JsonConverters::from('DateTime', $o['DOB']);
        if (isset($o['SSN'])) $this->SSN = $o['SSN'];
        if (isset($o['Fax'])) $this->Fax = $o['Fax'];
        if (isset($o['BusinessEmail'])) $this->BusinessEmail = $o['BusinessEmail'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTime', $o['ModifiedDate']);
        if (isset($o['ModifiedBy'])) $this->ModifiedBy = $o['ModifiedBy'];
        if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
        if (isset($o['LeaderLocked'])) $this->LeaderLocked = $o['LeaderLocked'];
        if (isset($o['LastSubmittedBusinessDate'])) $this->LastSubmittedBusinessDate = JsonConverters::from('DateTime', $o['LastSubmittedBusinessDate']);
        if (isset($o['GracePeriodDate'])) $this->GracePeriodDate = JsonConverters::from('DateTime', $o['GracePeriodDate']);
        if (isset($o['Vested'])) $this->Vested = $o['Vested'];
        if (isset($o['DirectPay'])) $this->DirectPay = JsonConverters::from('DateTime', $o['DirectPay']);
        if (isset($o['DirectPayApprBy'])) $this->DirectPayApprBy = $o['DirectPayApprBy'];
        if (isset($o['FactFinderBilling'])) $this->FactFinderBilling = $o['FactFinderBilling'];
        if (isset($o['FullName'])) $this->FullName = $o['FullName'];
        if (isset($o['ByLastName'])) $this->ByLastName = $o['ByLastName'];
        if (isset($o['IsSecurityLicensed'])) $this->IsSecurityLicensed = $o['IsSecurityLicensed'];
        if (isset($o['IsEncompassAdmin'])) $this->IsEncompassAdmin = $o['IsEncompassAdmin'];
        if (isset($o['ApiKey'])) $this->ApiKey = $o['ApiKey'];
        if (isset($o['LastSessionId'])) $this->LastSessionId = $o['LastSessionId'];
        if (isset($o['LastLogin'])) $this->LastLogin = JsonConverters::from('DateTime', $o['LastLogin']);
        if (isset($o['MfaActive'])) $this->MfaActive = $o['MfaActive'];
        if (isset($o['RequireMFA'])) $this->RequireMFA = $o['RequireMFA'];
        if (isset($o['SMSPhoneNumber'])) $this->SMSPhoneNumber = $o['SMSPhoneNumber'];
        if (isset($o['VerifiedEmailStatus'])) $this->VerifiedEmailStatus = $o['VerifiedEmailStatus'];
        if (isset($o['VerifiedCellPhoneStatus'])) $this->VerifiedCellPhoneStatus = $o['VerifiedCellPhoneStatus'];
        if (isset($o['SchedulerUrl'])) $this->SchedulerUrl = $o['SchedulerUrl'];
        if (isset($o['QueueDefaults'])) $this->QueueDefaults = JsonConverters::from('QueueDefault', $o['QueueDefaults']);
        if (isset($o['Roles'])) $this->Roles = JsonConverters::fromArray('string', $o['Roles']);
        if (isset($o['PasswordUpdated'])) $this->PasswordUpdated = $o['PasswordUpdated'];
        if (isset($o['RestrictToSingleSession'])) $this->RestrictToSingleSession = $o['RestrictToSingleSession'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
        if (isset($this->Company)) $o['Company'] = $this->Company;
        if (isset($this->AgentName)) $o['AgentName'] = $this->AgentName;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->MiddleInitial)) $o['MiddleInitial'] = $this->MiddleInitial;
        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->Country)) $o['Country'] = $this->Country;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->EmailSignature)) $o['EmailSignature'] = $this->EmailSignature;
        if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
        if (isset($this->CellPhone)) $o['CellPhone'] = $this->CellPhone;
        if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
        if (isset($this->InsLicensed)) $o['InsLicensed'] = $this->InsLicensed;
        if (isset($this->AgreeToDisclosures)) $o['AgreeToDisclosures'] = $this->AgreeToDisclosures;
        if (isset($this->AgreeToDate)) $o['AgreeToDate'] = JsonConverters::to('DateTime', $this->AgreeToDate);
        if (isset($this->PaidDate)) $o['PaidDate'] = JsonConverters::to('DateTime', $this->PaidDate);
        if (isset($this->AgentNumber)) $o['AgentNumber'] = $this->AgentNumber;
        if (isset($this->ReferringAgent)) $o['ReferringAgent'] = $this->ReferringAgent;
        if (isset($this->PlacementAgent)) $o['PlacementAgent'] = $this->PlacementAgent;
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->IsAgent)) $o['IsAgent'] = $this->IsAgent;
        if (isset($this->Package)) $o['Package'] = $this->Package;
        if (isset($this->StoreName)) $o['StoreName'] = $this->StoreName;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->Upline1)) $o['Upline1'] = $this->Upline1;
        if (isset($this->Upline2)) $o['Upline2'] = $this->Upline2;
        if (isset($this->Upline3)) $o['Upline3'] = $this->Upline3;
        if (isset($this->Upline4)) $o['Upline4'] = $this->Upline4;
        if (isset($this->MVPID)) $o['MVPID'] = $this->MVPID;
        if (isset($this->AVPID)) $o['AVPID'] = $this->AVPID;
        if (isset($this->RVPID)) $o['RVPID'] = $this->RVPID;
        if (isset($this->AgentLevel)) $o['AgentLevel'] = $this->AgentLevel;
        if (isset($this->IsMVP)) $o['IsMVP'] = $this->IsMVP;
        if (isset($this->IsRVP)) $o['IsRVP'] = $this->IsRVP;
        if (isset($this->IsAVP)) $o['IsAVP'] = $this->IsAVP;
        if (isset($this->IsAdmin)) $o['IsAdmin'] = $this->IsAdmin;
        if (isset($this->IsBusinessCardAdmin)) $o['IsBusinessCardAdmin'] = $this->IsBusinessCardAdmin;
        if (isset($this->TeamName)) $o['TeamName'] = $this->TeamName;
        if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
        if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
        if (isset($this->Rank)) $o['Rank'] = $this->Rank;
        if (isset($this->NBC)) $o['NBC'] = $this->NBC;
        if (isset($this->Upline1Percent)) $o['Upline1Percent'] = $this->Upline1Percent;
        if (isset($this->Upline2Percent)) $o['Upline2Percent'] = $this->Upline2Percent;
        if (isset($this->Upline3Percent)) $o['Upline3Percent'] = $this->Upline3Percent;
        if (isset($this->Upline4Percent)) $o['Upline4Percent'] = $this->Upline4Percent;
        if (isset($this->AgentStatus)) $o['AgentStatus'] = $this->AgentStatus;
        if (isset($this->Office)) $o['Office'] = $this->Office;
        if (isset($this->DOB)) $o['DOB'] = JsonConverters::to('DateTime', $this->DOB);
        if (isset($this->SSN)) $o['SSN'] = $this->SSN;
        if (isset($this->Fax)) $o['Fax'] = $this->Fax;
        if (isset($this->BusinessEmail)) $o['BusinessEmail'] = $this->BusinessEmail;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTime', $this->ModifiedDate);
        if (isset($this->ModifiedBy)) $o['ModifiedBy'] = $this->ModifiedBy;
        if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
        if (isset($this->LeaderLocked)) $o['LeaderLocked'] = $this->LeaderLocked;
        if (isset($this->LastSubmittedBusinessDate)) $o['LastSubmittedBusinessDate'] = JsonConverters::to('DateTime', $this->LastSubmittedBusinessDate);
        if (isset($this->GracePeriodDate)) $o['GracePeriodDate'] = JsonConverters::to('DateTime', $this->GracePeriodDate);
        if (isset($this->Vested)) $o['Vested'] = $this->Vested;
        if (isset($this->DirectPay)) $o['DirectPay'] = JsonConverters::to('DateTime', $this->DirectPay);
        if (isset($this->DirectPayApprBy)) $o['DirectPayApprBy'] = $this->DirectPayApprBy;
        if (isset($this->FactFinderBilling)) $o['FactFinderBilling'] = $this->FactFinderBilling;
        if (isset($this->FullName)) $o['FullName'] = $this->FullName;
        if (isset($this->ByLastName)) $o['ByLastName'] = $this->ByLastName;
        if (isset($this->IsSecurityLicensed)) $o['IsSecurityLicensed'] = $this->IsSecurityLicensed;
        if (isset($this->IsEncompassAdmin)) $o['IsEncompassAdmin'] = $this->IsEncompassAdmin;
        if (isset($this->ApiKey)) $o['ApiKey'] = $this->ApiKey;
        if (isset($this->LastSessionId)) $o['LastSessionId'] = $this->LastSessionId;
        if (isset($this->LastLogin)) $o['LastLogin'] = JsonConverters::to('DateTime', $this->LastLogin);
        if (isset($this->MfaActive)) $o['MfaActive'] = $this->MfaActive;
        if (isset($this->RequireMFA)) $o['RequireMFA'] = $this->RequireMFA;
        if (isset($this->SMSPhoneNumber)) $o['SMSPhoneNumber'] = $this->SMSPhoneNumber;
        if (isset($this->VerifiedEmailStatus)) $o['VerifiedEmailStatus'] = $this->VerifiedEmailStatus;
        if (isset($this->VerifiedCellPhoneStatus)) $o['VerifiedCellPhoneStatus'] = $this->VerifiedCellPhoneStatus;
        if (isset($this->SchedulerUrl)) $o['SchedulerUrl'] = $this->SchedulerUrl;
        if (isset($this->QueueDefaults)) $o['QueueDefaults'] = JsonConverters::to('QueueDefault', $this->QueueDefaults);
        if (isset($this->Roles)) $o['Roles'] = JsonConverters::toArray('string', $this->Roles);
        if (isset($this->PasswordUpdated)) $o['PasswordUpdated'] = $this->PasswordUpdated;
        if (isset($this->RestrictToSingleSession)) $o['RestrictToSingleSession'] = $this->RestrictToSingleSession;
        return empty($o) ? new class(){} : $o;
    }
}

class AgentRegistrationTemp implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentRegistrationTempId=0,
        /** @var string|null */
        public ?string $ApplicationId=null,
        /** @var string|null */
        public ?string $Company=null,
        /** @var string|null */
        public ?string $EIN=null,
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $MiddleName=null,
        /** @var string|null */
        public ?string $LastName=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 string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $HomePhone=null,
        /** @var string|null */
        public ?string $CellPhone=null,
        /** @var string|null */
        public ?string $WorkPhone=null,
        /** @var bool|null */
        public ?bool $AgreeToDisclosures=null,
        /** @var DateTime */
        public DateTime $AgreeToDate=new DateTime(),
        /** @var DateTime */
        public DateTime $PaidDate=new DateTime(),
        /** @var string|null */
        public ?string $AgentNumber=null,
        /** @var string|null */
        public ?string $Upline1Name=null,
        /** @var int */
        public int $Upline1=0,
        /** @var string|null */
        public ?string $Upline2Name=null,
        /** @var int */
        public int $Upline2=0,
        /** @var string|null */
        public ?string $RecruitedBy=null,
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),
        /** @var DateTime|null */
        public ?DateTime $DOB=null,
        /** @var string|null */
        public ?string $SSN=null,
        /** @var string|null */
        public ?string $Password=null,
        /** @var float */
        public float $Upline1Percent=0.0,
        /** @var float */
        public float $Upline2Percent=0.0,
        /** @var int */
        public int $AgentId=0,
        /** @var string|null */
        public ?string $AccountName=null,
        /** @var string|null */
        public ?string $AccountType=null,
        /** @var string|null */
        public ?string $AccountNumber=null,
        /** @var string|null */
        public ?string $AccountRouting=null,
        /** @var string|null */
        public ?string $w9_1=null,
        /** @var string|null */
        public ?string $w9_2=null,
        /** @var string|null */
        public ?string $w9_3_1=null,
        /** @var string|null */
        public ?string $w9_3_2=null,
        /** @var string|null */
        public ?string $w9_3_3=null,
        /** @var string|null */
        public ?string $w9_3_4=null,
        /** @var string|null */
        public ?string $w9_3_5=null,
        /** @var string|null */
        public ?string $w9_3_6=null,
        /** @var string|null */
        public ?string $w9_3_7=null,
        /** @var string|null */
        public ?string $w9_3_8=null,
        /** @var string|null */
        public ?string $w9_4_1=null,
        /** @var string|null */
        public ?string $w9_4_2=null,
        /** @var string|null */
        public ?string $w9_5=null,
        /** @var string|null */
        public ?string $w9_6=null,
        /** @var string|null */
        public ?string $w9_7=null,
        /** @var bool|null */
        public ?bool $IsSecurityLicensed=null,
        /** @var string|null */
        public ?string $SecurityLicense=null,
        /** @var string|null */
        public ?string $Position=null,
        /** @var string|null */
        public ?string $School=null,
        /** @var string|null */
        public ?string $District=null,
        /** @var string|null */
        public ?string $StoreName=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AgentRegistrationTempId'])) $this->AgentRegistrationTempId = $o['AgentRegistrationTempId'];
        if (isset($o['ApplicationId'])) $this->ApplicationId = $o['ApplicationId'];
        if (isset($o['Company'])) $this->Company = $o['Company'];
        if (isset($o['EIN'])) $this->EIN = $o['EIN'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['MiddleName'])) $this->MiddleName = $o['MiddleName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        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['Email'])) $this->Email = $o['Email'];
        if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
        if (isset($o['CellPhone'])) $this->CellPhone = $o['CellPhone'];
        if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
        if (isset($o['AgreeToDisclosures'])) $this->AgreeToDisclosures = $o['AgreeToDisclosures'];
        if (isset($o['AgreeToDate'])) $this->AgreeToDate = JsonConverters::from('DateTime', $o['AgreeToDate']);
        if (isset($o['PaidDate'])) $this->PaidDate = JsonConverters::from('DateTime', $o['PaidDate']);
        if (isset($o['AgentNumber'])) $this->AgentNumber = $o['AgentNumber'];
        if (isset($o['Upline1Name'])) $this->Upline1Name = $o['Upline1Name'];
        if (isset($o['Upline1'])) $this->Upline1 = $o['Upline1'];
        if (isset($o['Upline2Name'])) $this->Upline2Name = $o['Upline2Name'];
        if (isset($o['Upline2'])) $this->Upline2 = $o['Upline2'];
        if (isset($o['RecruitedBy'])) $this->RecruitedBy = $o['RecruitedBy'];
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['DOB'])) $this->DOB = JsonConverters::from('DateTime', $o['DOB']);
        if (isset($o['SSN'])) $this->SSN = $o['SSN'];
        if (isset($o['Password'])) $this->Password = $o['Password'];
        if (isset($o['Upline1Percent'])) $this->Upline1Percent = $o['Upline1Percent'];
        if (isset($o['Upline2Percent'])) $this->Upline2Percent = $o['Upline2Percent'];
        if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
        if (isset($o['AccountName'])) $this->AccountName = $o['AccountName'];
        if (isset($o['AccountType'])) $this->AccountType = $o['AccountType'];
        if (isset($o['AccountNumber'])) $this->AccountNumber = $o['AccountNumber'];
        if (isset($o['AccountRouting'])) $this->AccountRouting = $o['AccountRouting'];
        if (isset($o['w9_1'])) $this->w9_1 = $o['w9_1'];
        if (isset($o['w9_2'])) $this->w9_2 = $o['w9_2'];
        if (isset($o['w9_3_1'])) $this->w9_3_1 = $o['w9_3_1'];
        if (isset($o['w9_3_2'])) $this->w9_3_2 = $o['w9_3_2'];
        if (isset($o['w9_3_3'])) $this->w9_3_3 = $o['w9_3_3'];
        if (isset($o['w9_3_4'])) $this->w9_3_4 = $o['w9_3_4'];
        if (isset($o['w9_3_5'])) $this->w9_3_5 = $o['w9_3_5'];
        if (isset($o['w9_3_6'])) $this->w9_3_6 = $o['w9_3_6'];
        if (isset($o['w9_3_7'])) $this->w9_3_7 = $o['w9_3_7'];
        if (isset($o['w9_3_8'])) $this->w9_3_8 = $o['w9_3_8'];
        if (isset($o['w9_4_1'])) $this->w9_4_1 = $o['w9_4_1'];
        if (isset($o['w9_4_2'])) $this->w9_4_2 = $o['w9_4_2'];
        if (isset($o['w9_5'])) $this->w9_5 = $o['w9_5'];
        if (isset($o['w9_6'])) $this->w9_6 = $o['w9_6'];
        if (isset($o['w9_7'])) $this->w9_7 = $o['w9_7'];
        if (isset($o['IsSecurityLicensed'])) $this->IsSecurityLicensed = $o['IsSecurityLicensed'];
        if (isset($o['SecurityLicense'])) $this->SecurityLicense = $o['SecurityLicense'];
        if (isset($o['Position'])) $this->Position = $o['Position'];
        if (isset($o['School'])) $this->School = $o['School'];
        if (isset($o['District'])) $this->District = $o['District'];
        if (isset($o['StoreName'])) $this->StoreName = $o['StoreName'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AgentRegistrationTempId)) $o['AgentRegistrationTempId'] = $this->AgentRegistrationTempId;
        if (isset($this->ApplicationId)) $o['ApplicationId'] = $this->ApplicationId;
        if (isset($this->Company)) $o['Company'] = $this->Company;
        if (isset($this->EIN)) $o['EIN'] = $this->EIN;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->MiddleName)) $o['MiddleName'] = $this->MiddleName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        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->Email)) $o['Email'] = $this->Email;
        if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
        if (isset($this->CellPhone)) $o['CellPhone'] = $this->CellPhone;
        if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
        if (isset($this->AgreeToDisclosures)) $o['AgreeToDisclosures'] = $this->AgreeToDisclosures;
        if (isset($this->AgreeToDate)) $o['AgreeToDate'] = JsonConverters::to('DateTime', $this->AgreeToDate);
        if (isset($this->PaidDate)) $o['PaidDate'] = JsonConverters::to('DateTime', $this->PaidDate);
        if (isset($this->AgentNumber)) $o['AgentNumber'] = $this->AgentNumber;
        if (isset($this->Upline1Name)) $o['Upline1Name'] = $this->Upline1Name;
        if (isset($this->Upline1)) $o['Upline1'] = $this->Upline1;
        if (isset($this->Upline2Name)) $o['Upline2Name'] = $this->Upline2Name;
        if (isset($this->Upline2)) $o['Upline2'] = $this->Upline2;
        if (isset($this->RecruitedBy)) $o['RecruitedBy'] = $this->RecruitedBy;
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->DOB)) $o['DOB'] = JsonConverters::to('DateTime', $this->DOB);
        if (isset($this->SSN)) $o['SSN'] = $this->SSN;
        if (isset($this->Password)) $o['Password'] = $this->Password;
        if (isset($this->Upline1Percent)) $o['Upline1Percent'] = $this->Upline1Percent;
        if (isset($this->Upline2Percent)) $o['Upline2Percent'] = $this->Upline2Percent;
        if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
        if (isset($this->AccountName)) $o['AccountName'] = $this->AccountName;
        if (isset($this->AccountType)) $o['AccountType'] = $this->AccountType;
        if (isset($this->AccountNumber)) $o['AccountNumber'] = $this->AccountNumber;
        if (isset($this->AccountRouting)) $o['AccountRouting'] = $this->AccountRouting;
        if (isset($this->w9_1)) $o['w9_1'] = $this->w9_1;
        if (isset($this->w9_2)) $o['w9_2'] = $this->w9_2;
        if (isset($this->w9_3_1)) $o['w9_3_1'] = $this->w9_3_1;
        if (isset($this->w9_3_2)) $o['w9_3_2'] = $this->w9_3_2;
        if (isset($this->w9_3_3)) $o['w9_3_3'] = $this->w9_3_3;
        if (isset($this->w9_3_4)) $o['w9_3_4'] = $this->w9_3_4;
        if (isset($this->w9_3_5)) $o['w9_3_5'] = $this->w9_3_5;
        if (isset($this->w9_3_6)) $o['w9_3_6'] = $this->w9_3_6;
        if (isset($this->w9_3_7)) $o['w9_3_7'] = $this->w9_3_7;
        if (isset($this->w9_3_8)) $o['w9_3_8'] = $this->w9_3_8;
        if (isset($this->w9_4_1)) $o['w9_4_1'] = $this->w9_4_1;
        if (isset($this->w9_4_2)) $o['w9_4_2'] = $this->w9_4_2;
        if (isset($this->w9_5)) $o['w9_5'] = $this->w9_5;
        if (isset($this->w9_6)) $o['w9_6'] = $this->w9_6;
        if (isset($this->w9_7)) $o['w9_7'] = $this->w9_7;
        if (isset($this->IsSecurityLicensed)) $o['IsSecurityLicensed'] = $this->IsSecurityLicensed;
        if (isset($this->SecurityLicense)) $o['SecurityLicense'] = $this->SecurityLicense;
        if (isset($this->Position)) $o['Position'] = $this->Position;
        if (isset($this->School)) $o['School'] = $this->School;
        if (isset($this->District)) $o['District'] = $this->District;
        if (isset($this->StoreName)) $o['StoreName'] = $this->StoreName;
        return empty($o) ? new class(){} : $o;
    }
}

class AgentRegistrationAnswer implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentRegistrationTempId=0,
        /** @var int */
        public int $QuestionId=0,
        /** @var bool|null */
        public ?bool $AnswerYN=null,
        /** @var string|null */
        public ?string $AnswerText=null,
        /** @var DateTime */
        public DateTime $DateCreated=new DateTime()
    ) {
    }

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

class AgentRegistrationQuestionAnswer extends AgentRegistrationAnswer implements JsonSerializable
{
    /**
     * @param int $AgentRegistrationTempId
     * @param int $QuestionId
     * @param bool|null $AnswerYN
     * @param string|null $AnswerText
     * @param DateTime $DateCreated
     */
    public function __construct(
        int $AgentRegistrationTempId=0,
        int $QuestionId=0,
        ?bool $AnswerYN=null,
        ?string $AnswerText=null,
        DateTime $DateCreated=new DateTime(),
        /** @var string|null */
        public ?string $Details=null,
        /** @var string|null */
        public ?string $QuestionType=null,
        /** @var string|null */
        public ?string $Group=null,
        /** @var int */
        public int $IndexOrder=0
    ) {
        parent::__construct($AgentRegistrationTempId,$QuestionId,$AnswerYN,$AnswerText,$DateCreated);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Details'])) $this->Details = $o['Details'];
        if (isset($o['QuestionType'])) $this->QuestionType = $o['QuestionType'];
        if (isset($o['Group'])) $this->Group = $o['Group'];
        if (isset($o['IndexOrder'])) $this->IndexOrder = $o['IndexOrder'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Details)) $o['Details'] = $this->Details;
        if (isset($this->QuestionType)) $o['QuestionType'] = $this->QuestionType;
        if (isset($this->Group)) $o['Group'] = $this->Group;
        if (isset($this->IndexOrder)) $o['IndexOrder'] = $this->IndexOrder;
        return empty($o) ? new class(){} : $o;
    }
}

class AgentStateLicense implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentRegistrationTempId=0,
        /** @var string|null */
        public ?string $State=null,
        /** @var string|null */
        public ?string $LicenseNum=null
    ) {
    }

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

class AgentContractExtended extends Agent implements JsonSerializable
{
    /**
     * @param int $AgentId
     * @param string|null $Company
     * @param string|null $AgentName
     * @param string|null $FirstName
     * @param string|null $LastName
     * @param string|null $MiddleInitial
     * @param string|null $Address1
     * @param string|null $Address2
     * @param string|null $City
     * @param string|null $State
     * @param string|null $Zip
     * @param string|null $Country
     * @param string|null $Email
     * @param string|null $EmailSignature
     * @param string|null $HomePhone
     * @param string|null $CellPhone
     * @param string|null $WorkPhone
     * @param bool|null $InsLicensed
     * @param bool|null $AgreeToDisclosures
     * @param DateTime|null $AgreeToDate
     * @param DateTime|null $PaidDate
     * @param string|null $AgentNumber
     * @param string|null $ReferringAgent
     * @param string|null $PlacementAgent
     * @param DateTime|null $CreatedDate
     * @param string $UserId
     * @param bool|null $IsAgent
     * @param string|null $Package
     * @param string|null $StoreName
     * @param string|null $Notes
     * @param int|null $Upline1
     * @param int|null $Upline2
     * @param int|null $Upline3
     * @param int|null $Upline4
     * @param int|null $MVPID
     * @param int|null $AVPID
     * @param int|null $RVPID
     * @param float|null $AgentLevel
     * @param bool|null $IsMVP
     * @param bool|null $IsRVP
     * @param bool|null $IsAVP
     * @param bool|null $IsAdmin
     * @param bool|null $IsBusinessCardAdmin
     * @param string|null $TeamName
     * @param string $LocationId
     * @param string $CalendarId
     * @param string|null $Rank
     * @param bool|null $NBC
     * @param float|null $Upline1Percent
     * @param float|null $Upline2Percent
     * @param float|null $Upline3Percent
     * @param float|null $Upline4Percent
     * @param string|null $AgentStatus
     * @param string|null $Office
     * @param DateTime|null $DOB
     * @param string|null $SSN
     * @param string|null $Fax
     * @param string|null $BusinessEmail
     * @param DateTime|null $ModifiedDate
     * @param string|null $ModifiedBy
     * @param string|null $TimeZone
     * @param bool|null $LeaderLocked
     * @param DateTime $LastSubmittedBusinessDate
     * @param DateTime $GracePeriodDate
     * @param bool|null $Vested
     * @param DateTime $DirectPay
     * @param string|null $DirectPayApprBy
     * @param float|null $FactFinderBilling
     * @param string|null $FullName
     * @param string|null $ByLastName
     * @param bool|null $IsSecurityLicensed
     * @param bool|null $IsEncompassAdmin
     * @param string $ApiKey
     * @param string|null $LastSessionId
     * @param DateTime|null $LastLogin
     * @param bool|null $MfaActive
     * @param bool|null $RequireMFA
     * @param string|null $SMSPhoneNumber
     * @param bool|null $VerifiedEmailStatus
     * @param bool|null $VerifiedCellPhoneStatus
     * @param string|null $SchedulerUrl
     * @param QueueDefault|null $QueueDefaults
     * @param array<string>|null $Roles
     * @param bool|null $PasswordUpdated
     * @param bool|null $RestrictToSingleSession
     */
    public function __construct(
        int $AgentId=0,
        ?string $Company=null,
        ?string $AgentName=null,
        ?string $FirstName=null,
        ?string $LastName=null,
        ?string $MiddleInitial=null,
        ?string $Address1=null,
        ?string $Address2=null,
        ?string $City=null,
        ?string $State=null,
        ?string $Zip=null,
        ?string $Country=null,
        ?string $Email=null,
        ?string $EmailSignature=null,
        ?string $HomePhone=null,
        ?string $CellPhone=null,
        ?string $WorkPhone=null,
        ?bool $InsLicensed=null,
        ?bool $AgreeToDisclosures=null,
        ?DateTime $AgreeToDate=null,
        ?DateTime $PaidDate=null,
        ?string $AgentNumber=null,
        ?string $ReferringAgent=null,
        ?string $PlacementAgent=null,
        ?DateTime $CreatedDate=null,
        string $UserId='',
        ?bool $IsAgent=null,
        ?string $Package=null,
        ?string $StoreName=null,
        ?string $Notes=null,
        ?int $Upline1=null,
        ?int $Upline2=null,
        ?int $Upline3=null,
        ?int $Upline4=null,
        ?int $MVPID=null,
        ?int $AVPID=null,
        ?int $RVPID=null,
        ?float $AgentLevel=null,
        ?bool $IsMVP=null,
        ?bool $IsRVP=null,
        ?bool $IsAVP=null,
        ?bool $IsAdmin=null,
        ?bool $IsBusinessCardAdmin=null,
        ?string $TeamName=null,
        string $LocationId='',
        string $CalendarId='',
        ?string $Rank=null,
        ?bool $NBC=null,
        ?float $Upline1Percent=null,
        ?float $Upline2Percent=null,
        ?float $Upline3Percent=null,
        ?float $Upline4Percent=null,
        ?string $AgentStatus=null,
        ?string $Office=null,
        ?DateTime $DOB=null,
        ?string $SSN=null,
        ?string $Fax=null,
        ?string $BusinessEmail=null,
        ?DateTime $ModifiedDate=null,
        ?string $ModifiedBy=null,
        ?string $TimeZone=null,
        ?bool $LeaderLocked=null,
        DateTime $LastSubmittedBusinessDate=new DateTime(),
        DateTime $GracePeriodDate=new DateTime(),
        ?bool $Vested=null,
        DateTime $DirectPay=new DateTime(),
        ?string $DirectPayApprBy=null,
        ?float $FactFinderBilling=null,
        ?string $FullName=null,
        ?string $ByLastName=null,
        ?bool $IsSecurityLicensed=null,
        ?bool $IsEncompassAdmin=null,
        string $ApiKey='',
        ?string $LastSessionId=null,
        ?DateTime $LastLogin=null,
        ?bool $MfaActive=null,
        ?bool $RequireMFA=null,
        ?string $SMSPhoneNumber=null,
        ?bool $VerifiedEmailStatus=null,
        ?bool $VerifiedCellPhoneStatus=null,
        ?string $SchedulerUrl=null,
        ?QueueDefault $QueueDefaults=null,
        ?array $Roles=null,
        ?bool $PasswordUpdated=null,
        ?bool $RestrictToSingleSession=null,
        /** @var int */
        public int $AgentContractId=0,
        /** @var DateTime */
        public DateTime $AFAgreementReceivedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $DirectDepositReceivedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $DotNETCompleteDate=new DateTime(),
        /** @var DateTime */
        public DateTime $AssociateAppUploadedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $LSWContractLinkSentDate=new DateTime(),
        /** @var DateTime */
        public DateTime $LSWContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $LSWLifeAgentCode=null,
        /** @var string|null */
        public ?string $LSWAnnuityAgentCode=null,
        /** @var string|null */
        public ?string $LSWWebsiteUserId=null,
        /** @var DateTime */
        public DateTime $AMLCompletedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $StateAnnuityTrainingCompletedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $LSWProductTrainingCompletedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $EOExpirationDate=new DateTime(),
        /** @var DateTime */
        public DateTime $SureLCLinkSentDate=new DateTime(),
        /** @var DateTime */
        public DateTime $AEContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $AEAgentCode=null,
        /** @var DateTime */
        public DateTime $MGANorthAmericanContractSentDate=new DateTime(),
        /** @var string|null */
        public ?string $MGANorthAmericanAgentCode=null,
        /** @var DateTime */
        public DateTime $AmericoContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $AmericoAgentCode=null,
        /** @var DateTime */
        public DateTime $MidlandContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $MidlandAgentCode=null,
        /** @var DateTime */
        public DateTime $JacksonContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $JacksonAgentCode=null,
        /** @var DateTime */
        public DateTime $VoyaContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $VoyaAgentCode=null,
        /** @var DateTime */
        public DateTime $HoraceMannContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $HoraceMannAgentCode=null,
        /** @var DateTime */
        public DateTime $GreatAmericanContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $GreatAmericanAgentCode=null,
        /** @var DateTime */
        public DateTime $MutualOfOmahaContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $MutualOfOmahaAgentCode=null,
        /** @var DateTime */
        public DateTime $AllanzContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $AllanzAgentCode=null,
        /** @var DateTime */
        public DateTime $FGContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $FGAgentCode=null,
        /** @var string|null */
        public ?string $ResidentLicenseState=null,
        /** @var string|null */
        public ?string $ResidentLicenseNumber=null,
        /** @var DateTime */
        public DateTime $ResidentLicenseExpirationDate=new DateTime(),
        /** @var DateTime */
        public DateTime $ContractingComplete=new DateTime(),
        /** @var DateTime */
        public DateTime $PackageMailed=new DateTime(),
        /** @var string|null */
        public ?string $TrackingNum=null,
        /** @var DateTime */
        public DateTime $ProtectiveContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $ProtectiveCode=null,
        /** @var DateTime */
        public DateTime $AtheneContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $AtheneCode=null,
        /** @var DateTime */
        public DateTime $ForestersContractDoneDate=new DateTime(),
        /** @var string|null */
        public ?string $ForestersCode=null,
        /** @var string|null */
        public ?string $ACHName=null,
        /** @var string|null */
        public ?string $ACHNumber=null,
        /** @var string|null */
        public ?string $ACHRouting=null,
        /** @var string|null */
        public ?string $ACHAccountType=null,
        /** @var string|null */
        public ?string $w9_1=null,
        /** @var string|null */
        public ?string $w9_2=null,
        /** @var string|null */
        public ?string $w9_3_1=null,
        /** @var string|null */
        public ?string $w9_3_2=null,
        /** @var string|null */
        public ?string $w9_3_3=null,
        /** @var string|null */
        public ?string $w9_3_4=null,
        /** @var string|null */
        public ?string $w9_3_5=null,
        /** @var string|null */
        public ?string $w9_3_6=null,
        /** @var string|null */
        public ?string $w9_3_7=null,
        /** @var string|null */
        public ?string $w9_3_8=null,
        /** @var string|null */
        public ?string $w9_4_1=null,
        /** @var string|null */
        public ?string $w9_4_2=null,
        /** @var string|null */
        public ?string $w9_5=null,
        /** @var string|null */
        public ?string $w9_6=null,
        /** @var string|null */
        public ?string $w9_7=null,
        /** @var AgentRegistrationTemp|null */
        public ?AgentRegistrationTemp $AgentRegistration=null,
        /** @var array<AgentRegistrationQuestionAnswer>|null */
        public ?array $AgentRegistrationAnswers=null,
        /** @var array<AgentStateLicense>|null */
        public ?array $AgentStateLicenses=null,
        /** @var int */
        public int $ContactCount=0,
        /** @var string|null */
        public ?string $PayChexId=null,
        /** @var bool|null */
        public ?bool $AgentLevelLocked=null,
        /** @var string|null */
        public ?string $SecurityLicense=null
    ) {
        parent::__construct($AgentId,$Company,$AgentName,$FirstName,$LastName,$MiddleInitial,$Address1,$Address2,$City,$State,$Zip,$Country,$Email,$EmailSignature,$HomePhone,$CellPhone,$WorkPhone,$InsLicensed,$AgreeToDisclosures,$AgreeToDate,$PaidDate,$AgentNumber,$ReferringAgent,$PlacementAgent,$CreatedDate,$UserId,$IsAgent,$Package,$StoreName,$Notes,$Upline1,$Upline2,$Upline3,$Upline4,$MVPID,$AVPID,$RVPID,$AgentLevel,$IsMVP,$IsRVP,$IsAVP,$IsAdmin,$IsBusinessCardAdmin,$TeamName,$LocationId,$CalendarId,$Rank,$NBC,$Upline1Percent,$Upline2Percent,$Upline3Percent,$Upline4Percent,$AgentStatus,$Office,$DOB,$SSN,$Fax,$BusinessEmail,$ModifiedDate,$ModifiedBy,$TimeZone,$LeaderLocked,$LastSubmittedBusinessDate,$GracePeriodDate,$Vested,$DirectPay,$DirectPayApprBy,$FactFinderBilling,$FullName,$ByLastName,$IsSecurityLicensed,$IsEncompassAdmin,$ApiKey,$LastSessionId,$LastLogin,$MfaActive,$RequireMFA,$SMSPhoneNumber,$VerifiedEmailStatus,$VerifiedCellPhoneStatus,$SchedulerUrl,$QueueDefaults,$Roles,$PasswordUpdated,$RestrictToSingleSession);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['AgentContractId'])) $this->AgentContractId = $o['AgentContractId'];
        if (isset($o['AFAgreementReceivedDate'])) $this->AFAgreementReceivedDate = JsonConverters::from('DateTime', $o['AFAgreementReceivedDate']);
        if (isset($o['DirectDepositReceivedDate'])) $this->DirectDepositReceivedDate = JsonConverters::from('DateTime', $o['DirectDepositReceivedDate']);
        if (isset($o['DotNETCompleteDate'])) $this->DotNETCompleteDate = JsonConverters::from('DateTime', $o['DotNETCompleteDate']);
        if (isset($o['AssociateAppUploadedDate'])) $this->AssociateAppUploadedDate = JsonConverters::from('DateTime', $o['AssociateAppUploadedDate']);
        if (isset($o['LSWContractLinkSentDate'])) $this->LSWContractLinkSentDate = JsonConverters::from('DateTime', $o['LSWContractLinkSentDate']);
        if (isset($o['LSWContractDoneDate'])) $this->LSWContractDoneDate = JsonConverters::from('DateTime', $o['LSWContractDoneDate']);
        if (isset($o['LSWLifeAgentCode'])) $this->LSWLifeAgentCode = $o['LSWLifeAgentCode'];
        if (isset($o['LSWAnnuityAgentCode'])) $this->LSWAnnuityAgentCode = $o['LSWAnnuityAgentCode'];
        if (isset($o['LSWWebsiteUserId'])) $this->LSWWebsiteUserId = $o['LSWWebsiteUserId'];
        if (isset($o['AMLCompletedDate'])) $this->AMLCompletedDate = JsonConverters::from('DateTime', $o['AMLCompletedDate']);
        if (isset($o['StateAnnuityTrainingCompletedDate'])) $this->StateAnnuityTrainingCompletedDate = JsonConverters::from('DateTime', $o['StateAnnuityTrainingCompletedDate']);
        if (isset($o['LSWProductTrainingCompletedDate'])) $this->LSWProductTrainingCompletedDate = JsonConverters::from('DateTime', $o['LSWProductTrainingCompletedDate']);
        if (isset($o['EOExpirationDate'])) $this->EOExpirationDate = JsonConverters::from('DateTime', $o['EOExpirationDate']);
        if (isset($o['SureLCLinkSentDate'])) $this->SureLCLinkSentDate = JsonConverters::from('DateTime', $o['SureLCLinkSentDate']);
        if (isset($o['AEContractDoneDate'])) $this->AEContractDoneDate = JsonConverters::from('DateTime', $o['AEContractDoneDate']);
        if (isset($o['AEAgentCode'])) $this->AEAgentCode = $o['AEAgentCode'];
        if (isset($o['MGANorthAmericanContractSentDate'])) $this->MGANorthAmericanContractSentDate = JsonConverters::from('DateTime', $o['MGANorthAmericanContractSentDate']);
        if (isset($o['MGANorthAmericanAgentCode'])) $this->MGANorthAmericanAgentCode = $o['MGANorthAmericanAgentCode'];
        if (isset($o['AmericoContractDoneDate'])) $this->AmericoContractDoneDate = JsonConverters::from('DateTime', $o['AmericoContractDoneDate']);
        if (isset($o['AmericoAgentCode'])) $this->AmericoAgentCode = $o['AmericoAgentCode'];
        if (isset($o['MidlandContractDoneDate'])) $this->MidlandContractDoneDate = JsonConverters::from('DateTime', $o['MidlandContractDoneDate']);
        if (isset($o['MidlandAgentCode'])) $this->MidlandAgentCode = $o['MidlandAgentCode'];
        if (isset($o['JacksonContractDoneDate'])) $this->JacksonContractDoneDate = JsonConverters::from('DateTime', $o['JacksonContractDoneDate']);
        if (isset($o['JacksonAgentCode'])) $this->JacksonAgentCode = $o['JacksonAgentCode'];
        if (isset($o['VoyaContractDoneDate'])) $this->VoyaContractDoneDate = JsonConverters::from('DateTime', $o['VoyaContractDoneDate']);
        if (isset($o['VoyaAgentCode'])) $this->VoyaAgentCode = $o['VoyaAgentCode'];
        if (isset($o['HoraceMannContractDoneDate'])) $this->HoraceMannContractDoneDate = JsonConverters::from('DateTime', $o['HoraceMannContractDoneDate']);
        if (isset($o['HoraceMannAgentCode'])) $this->HoraceMannAgentCode = $o['HoraceMannAgentCode'];
        if (isset($o['GreatAmericanContractDoneDate'])) $this->GreatAmericanContractDoneDate = JsonConverters::from('DateTime', $o['GreatAmericanContractDoneDate']);
        if (isset($o['GreatAmericanAgentCode'])) $this->GreatAmericanAgentCode = $o['GreatAmericanAgentCode'];
        if (isset($o['MutualOfOmahaContractDoneDate'])) $this->MutualOfOmahaContractDoneDate = JsonConverters::from('DateTime', $o['MutualOfOmahaContractDoneDate']);
        if (isset($o['MutualOfOmahaAgentCode'])) $this->MutualOfOmahaAgentCode = $o['MutualOfOmahaAgentCode'];
        if (isset($o['AllanzContractDoneDate'])) $this->AllanzContractDoneDate = JsonConverters::from('DateTime', $o['AllanzContractDoneDate']);
        if (isset($o['AllanzAgentCode'])) $this->AllanzAgentCode = $o['AllanzAgentCode'];
        if (isset($o['FGContractDoneDate'])) $this->FGContractDoneDate = JsonConverters::from('DateTime', $o['FGContractDoneDate']);
        if (isset($o['FGAgentCode'])) $this->FGAgentCode = $o['FGAgentCode'];
        if (isset($o['ResidentLicenseState'])) $this->ResidentLicenseState = $o['ResidentLicenseState'];
        if (isset($o['ResidentLicenseNumber'])) $this->ResidentLicenseNumber = $o['ResidentLicenseNumber'];
        if (isset($o['ResidentLicenseExpirationDate'])) $this->ResidentLicenseExpirationDate = JsonConverters::from('DateTime', $o['ResidentLicenseExpirationDate']);
        if (isset($o['ContractingComplete'])) $this->ContractingComplete = JsonConverters::from('DateTime', $o['ContractingComplete']);
        if (isset($o['PackageMailed'])) $this->PackageMailed = JsonConverters::from('DateTime', $o['PackageMailed']);
        if (isset($o['TrackingNum'])) $this->TrackingNum = $o['TrackingNum'];
        if (isset($o['ProtectiveContractDoneDate'])) $this->ProtectiveContractDoneDate = JsonConverters::from('DateTime', $o['ProtectiveContractDoneDate']);
        if (isset($o['ProtectiveCode'])) $this->ProtectiveCode = $o['ProtectiveCode'];
        if (isset($o['AtheneContractDoneDate'])) $this->AtheneContractDoneDate = JsonConverters::from('DateTime', $o['AtheneContractDoneDate']);
        if (isset($o['AtheneCode'])) $this->AtheneCode = $o['AtheneCode'];
        if (isset($o['ForestersContractDoneDate'])) $this->ForestersContractDoneDate = JsonConverters::from('DateTime', $o['ForestersContractDoneDate']);
        if (isset($o['ForestersCode'])) $this->ForestersCode = $o['ForestersCode'];
        if (isset($o['ACHName'])) $this->ACHName = $o['ACHName'];
        if (isset($o['ACHNumber'])) $this->ACHNumber = $o['ACHNumber'];
        if (isset($o['ACHRouting'])) $this->ACHRouting = $o['ACHRouting'];
        if (isset($o['ACHAccountType'])) $this->ACHAccountType = $o['ACHAccountType'];
        if (isset($o['w9_1'])) $this->w9_1 = $o['w9_1'];
        if (isset($o['w9_2'])) $this->w9_2 = $o['w9_2'];
        if (isset($o['w9_3_1'])) $this->w9_3_1 = $o['w9_3_1'];
        if (isset($o['w9_3_2'])) $this->w9_3_2 = $o['w9_3_2'];
        if (isset($o['w9_3_3'])) $this->w9_3_3 = $o['w9_3_3'];
        if (isset($o['w9_3_4'])) $this->w9_3_4 = $o['w9_3_4'];
        if (isset($o['w9_3_5'])) $this->w9_3_5 = $o['w9_3_5'];
        if (isset($o['w9_3_6'])) $this->w9_3_6 = $o['w9_3_6'];
        if (isset($o['w9_3_7'])) $this->w9_3_7 = $o['w9_3_7'];
        if (isset($o['w9_3_8'])) $this->w9_3_8 = $o['w9_3_8'];
        if (isset($o['w9_4_1'])) $this->w9_4_1 = $o['w9_4_1'];
        if (isset($o['w9_4_2'])) $this->w9_4_2 = $o['w9_4_2'];
        if (isset($o['w9_5'])) $this->w9_5 = $o['w9_5'];
        if (isset($o['w9_6'])) $this->w9_6 = $o['w9_6'];
        if (isset($o['w9_7'])) $this->w9_7 = $o['w9_7'];
        if (isset($o['AgentRegistration'])) $this->AgentRegistration = JsonConverters::from('AgentRegistrationTemp', $o['AgentRegistration']);
        if (isset($o['AgentRegistrationAnswers'])) $this->AgentRegistrationAnswers = JsonConverters::fromArray('AgentRegistrationQuestionAnswer', $o['AgentRegistrationAnswers']);
        if (isset($o['AgentStateLicenses'])) $this->AgentStateLicenses = JsonConverters::fromArray('AgentStateLicense', $o['AgentStateLicenses']);
        if (isset($o['ContactCount'])) $this->ContactCount = $o['ContactCount'];
        if (isset($o['PayChexId'])) $this->PayChexId = $o['PayChexId'];
        if (isset($o['AgentLevelLocked'])) $this->AgentLevelLocked = $o['AgentLevelLocked'];
        if (isset($o['SecurityLicense'])) $this->SecurityLicense = $o['SecurityLicense'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->AgentContractId)) $o['AgentContractId'] = $this->AgentContractId;
        if (isset($this->AFAgreementReceivedDate)) $o['AFAgreementReceivedDate'] = JsonConverters::to('DateTime', $this->AFAgreementReceivedDate);
        if (isset($this->DirectDepositReceivedDate)) $o['DirectDepositReceivedDate'] = JsonConverters::to('DateTime', $this->DirectDepositReceivedDate);
        if (isset($this->DotNETCompleteDate)) $o['DotNETCompleteDate'] = JsonConverters::to('DateTime', $this->DotNETCompleteDate);
        if (isset($this->AssociateAppUploadedDate)) $o['AssociateAppUploadedDate'] = JsonConverters::to('DateTime', $this->AssociateAppUploadedDate);
        if (isset($this->LSWContractLinkSentDate)) $o['LSWContractLinkSentDate'] = JsonConverters::to('DateTime', $this->LSWContractLinkSentDate);
        if (isset($this->LSWContractDoneDate)) $o['LSWContractDoneDate'] = JsonConverters::to('DateTime', $this->LSWContractDoneDate);
        if (isset($this->LSWLifeAgentCode)) $o['LSWLifeAgentCode'] = $this->LSWLifeAgentCode;
        if (isset($this->LSWAnnuityAgentCode)) $o['LSWAnnuityAgentCode'] = $this->LSWAnnuityAgentCode;
        if (isset($this->LSWWebsiteUserId)) $o['LSWWebsiteUserId'] = $this->LSWWebsiteUserId;
        if (isset($this->AMLCompletedDate)) $o['AMLCompletedDate'] = JsonConverters::to('DateTime', $this->AMLCompletedDate);
        if (isset($this->StateAnnuityTrainingCompletedDate)) $o['StateAnnuityTrainingCompletedDate'] = JsonConverters::to('DateTime', $this->StateAnnuityTrainingCompletedDate);
        if (isset($this->LSWProductTrainingCompletedDate)) $o['LSWProductTrainingCompletedDate'] = JsonConverters::to('DateTime', $this->LSWProductTrainingCompletedDate);
        if (isset($this->EOExpirationDate)) $o['EOExpirationDate'] = JsonConverters::to('DateTime', $this->EOExpirationDate);
        if (isset($this->SureLCLinkSentDate)) $o['SureLCLinkSentDate'] = JsonConverters::to('DateTime', $this->SureLCLinkSentDate);
        if (isset($this->AEContractDoneDate)) $o['AEContractDoneDate'] = JsonConverters::to('DateTime', $this->AEContractDoneDate);
        if (isset($this->AEAgentCode)) $o['AEAgentCode'] = $this->AEAgentCode;
        if (isset($this->MGANorthAmericanContractSentDate)) $o['MGANorthAmericanContractSentDate'] = JsonConverters::to('DateTime', $this->MGANorthAmericanContractSentDate);
        if (isset($this->MGANorthAmericanAgentCode)) $o['MGANorthAmericanAgentCode'] = $this->MGANorthAmericanAgentCode;
        if (isset($this->AmericoContractDoneDate)) $o['AmericoContractDoneDate'] = JsonConverters::to('DateTime', $this->AmericoContractDoneDate);
        if (isset($this->AmericoAgentCode)) $o['AmericoAgentCode'] = $this->AmericoAgentCode;
        if (isset($this->MidlandContractDoneDate)) $o['MidlandContractDoneDate'] = JsonConverters::to('DateTime', $this->MidlandContractDoneDate);
        if (isset($this->MidlandAgentCode)) $o['MidlandAgentCode'] = $this->MidlandAgentCode;
        if (isset($this->JacksonContractDoneDate)) $o['JacksonContractDoneDate'] = JsonConverters::to('DateTime', $this->JacksonContractDoneDate);
        if (isset($this->JacksonAgentCode)) $o['JacksonAgentCode'] = $this->JacksonAgentCode;
        if (isset($this->VoyaContractDoneDate)) $o['VoyaContractDoneDate'] = JsonConverters::to('DateTime', $this->VoyaContractDoneDate);
        if (isset($this->VoyaAgentCode)) $o['VoyaAgentCode'] = $this->VoyaAgentCode;
        if (isset($this->HoraceMannContractDoneDate)) $o['HoraceMannContractDoneDate'] = JsonConverters::to('DateTime', $this->HoraceMannContractDoneDate);
        if (isset($this->HoraceMannAgentCode)) $o['HoraceMannAgentCode'] = $this->HoraceMannAgentCode;
        if (isset($this->GreatAmericanContractDoneDate)) $o['GreatAmericanContractDoneDate'] = JsonConverters::to('DateTime', $this->GreatAmericanContractDoneDate);
        if (isset($this->GreatAmericanAgentCode)) $o['GreatAmericanAgentCode'] = $this->GreatAmericanAgentCode;
        if (isset($this->MutualOfOmahaContractDoneDate)) $o['MutualOfOmahaContractDoneDate'] = JsonConverters::to('DateTime', $this->MutualOfOmahaContractDoneDate);
        if (isset($this->MutualOfOmahaAgentCode)) $o['MutualOfOmahaAgentCode'] = $this->MutualOfOmahaAgentCode;
        if (isset($this->AllanzContractDoneDate)) $o['AllanzContractDoneDate'] = JsonConverters::to('DateTime', $this->AllanzContractDoneDate);
        if (isset($this->AllanzAgentCode)) $o['AllanzAgentCode'] = $this->AllanzAgentCode;
        if (isset($this->FGContractDoneDate)) $o['FGContractDoneDate'] = JsonConverters::to('DateTime', $this->FGContractDoneDate);
        if (isset($this->FGAgentCode)) $o['FGAgentCode'] = $this->FGAgentCode;
        if (isset($this->ResidentLicenseState)) $o['ResidentLicenseState'] = $this->ResidentLicenseState;
        if (isset($this->ResidentLicenseNumber)) $o['ResidentLicenseNumber'] = $this->ResidentLicenseNumber;
        if (isset($this->ResidentLicenseExpirationDate)) $o['ResidentLicenseExpirationDate'] = JsonConverters::to('DateTime', $this->ResidentLicenseExpirationDate);
        if (isset($this->ContractingComplete)) $o['ContractingComplete'] = JsonConverters::to('DateTime', $this->ContractingComplete);
        if (isset($this->PackageMailed)) $o['PackageMailed'] = JsonConverters::to('DateTime', $this->PackageMailed);
        if (isset($this->TrackingNum)) $o['TrackingNum'] = $this->TrackingNum;
        if (isset($this->ProtectiveContractDoneDate)) $o['ProtectiveContractDoneDate'] = JsonConverters::to('DateTime', $this->ProtectiveContractDoneDate);
        if (isset($this->ProtectiveCode)) $o['ProtectiveCode'] = $this->ProtectiveCode;
        if (isset($this->AtheneContractDoneDate)) $o['AtheneContractDoneDate'] = JsonConverters::to('DateTime', $this->AtheneContractDoneDate);
        if (isset($this->AtheneCode)) $o['AtheneCode'] = $this->AtheneCode;
        if (isset($this->ForestersContractDoneDate)) $o['ForestersContractDoneDate'] = JsonConverters::to('DateTime', $this->ForestersContractDoneDate);
        if (isset($this->ForestersCode)) $o['ForestersCode'] = $this->ForestersCode;
        if (isset($this->ACHName)) $o['ACHName'] = $this->ACHName;
        if (isset($this->ACHNumber)) $o['ACHNumber'] = $this->ACHNumber;
        if (isset($this->ACHRouting)) $o['ACHRouting'] = $this->ACHRouting;
        if (isset($this->ACHAccountType)) $o['ACHAccountType'] = $this->ACHAccountType;
        if (isset($this->w9_1)) $o['w9_1'] = $this->w9_1;
        if (isset($this->w9_2)) $o['w9_2'] = $this->w9_2;
        if (isset($this->w9_3_1)) $o['w9_3_1'] = $this->w9_3_1;
        if (isset($this->w9_3_2)) $o['w9_3_2'] = $this->w9_3_2;
        if (isset($this->w9_3_3)) $o['w9_3_3'] = $this->w9_3_3;
        if (isset($this->w9_3_4)) $o['w9_3_4'] = $this->w9_3_4;
        if (isset($this->w9_3_5)) $o['w9_3_5'] = $this->w9_3_5;
        if (isset($this->w9_3_6)) $o['w9_3_6'] = $this->w9_3_6;
        if (isset($this->w9_3_7)) $o['w9_3_7'] = $this->w9_3_7;
        if (isset($this->w9_3_8)) $o['w9_3_8'] = $this->w9_3_8;
        if (isset($this->w9_4_1)) $o['w9_4_1'] = $this->w9_4_1;
        if (isset($this->w9_4_2)) $o['w9_4_2'] = $this->w9_4_2;
        if (isset($this->w9_5)) $o['w9_5'] = $this->w9_5;
        if (isset($this->w9_6)) $o['w9_6'] = $this->w9_6;
        if (isset($this->w9_7)) $o['w9_7'] = $this->w9_7;
        if (isset($this->AgentRegistration)) $o['AgentRegistration'] = JsonConverters::to('AgentRegistrationTemp', $this->AgentRegistration);
        if (isset($this->AgentRegistrationAnswers)) $o['AgentRegistrationAnswers'] = JsonConverters::toArray('AgentRegistrationQuestionAnswer', $this->AgentRegistrationAnswers);
        if (isset($this->AgentStateLicenses)) $o['AgentStateLicenses'] = JsonConverters::toArray('AgentStateLicense', $this->AgentStateLicenses);
        if (isset($this->ContactCount)) $o['ContactCount'] = $this->ContactCount;
        if (isset($this->PayChexId)) $o['PayChexId'] = $this->PayChexId;
        if (isset($this->AgentLevelLocked)) $o['AgentLevelLocked'] = $this->AgentLevelLocked;
        if (isset($this->SecurityLicense)) $o['SecurityLicense'] = $this->SecurityLicense;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class AgentContractRequest implements JsonSerializable
{
    public function __construct(
        /** @var array<AgentContractExtended>|null */
        public ?array $AgentContract=null,
        /** @var int */
        public int $AgentId=0
    ) {
    }

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

PHP AgentContractRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

PUT /v1/AgentContract/{AgentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"AgentContract":[{"AgentContractId":0,"AFAgreementReceivedDate":"0001-01-01T00:00:00.0000000","DirectDepositReceivedDate":"0001-01-01T00:00:00.0000000","DotNETCompleteDate":"0001-01-01T00:00:00.0000000","AssociateAppUploadedDate":"0001-01-01T00:00:00.0000000","LSWContractLinkSentDate":"0001-01-01T00:00:00.0000000","LSWContractDoneDate":"0001-01-01T00:00:00.0000000","LSWLifeAgentCode":"String","LSWAnnuityAgentCode":"String","LSWWebsiteUserId":"String","AMLCompletedDate":"0001-01-01T00:00:00.0000000","StateAnnuityTrainingCompletedDate":"0001-01-01T00:00:00.0000000","LSWProductTrainingCompletedDate":"0001-01-01T00:00:00.0000000","EOExpirationDate":"0001-01-01T00:00:00.0000000","SureLCLinkSentDate":"0001-01-01T00:00:00.0000000","AEContractDoneDate":"0001-01-01T00:00:00.0000000","AEAgentCode":"String","MGANorthAmericanContractSentDate":"0001-01-01T00:00:00.0000000","MGANorthAmericanAgentCode":"String","AmericoContractDoneDate":"0001-01-01T00:00:00.0000000","AmericoAgentCode":"String","MidlandContractDoneDate":"0001-01-01T00:00:00.0000000","MidlandAgentCode":"String","JacksonContractDoneDate":"0001-01-01T00:00:00.0000000","JacksonAgentCode":"String","VoyaContractDoneDate":"0001-01-01T00:00:00.0000000","VoyaAgentCode":"String","HoraceMannContractDoneDate":"0001-01-01T00:00:00.0000000","HoraceMannAgentCode":"String","GreatAmericanContractDoneDate":"0001-01-01T00:00:00.0000000","GreatAmericanAgentCode":"String","MutualOfOmahaContractDoneDate":"0001-01-01T00:00:00.0000000","MutualOfOmahaAgentCode":"String","AllanzContractDoneDate":"0001-01-01T00:00:00.0000000","AllanzAgentCode":"String","FGContractDoneDate":"0001-01-01T00:00:00.0000000","FGAgentCode":"String","ResidentLicenseState":"String","ResidentLicenseNumber":"String","ResidentLicenseExpirationDate":"0001-01-01T00:00:00.0000000","ContractingComplete":"0001-01-01T00:00:00.0000000","PackageMailed":"0001-01-01T00:00:00.0000000","TrackingNum":"String","ProtectiveContractDoneDate":"0001-01-01T00:00:00.0000000","ProtectiveCode":"String","AtheneContractDoneDate":"0001-01-01T00:00:00.0000000","AtheneCode":"String","ForestersContractDoneDate":"0001-01-01T00:00:00.0000000","ForestersCode":"String","ACHName":"String","ACHNumber":"String","ACHRouting":"String","ACHAccountType":"String","w9_1":"String","w9_2":"String","w9_3_1":"String","w9_3_2":"String","w9_3_3":"String","w9_3_4":"String","w9_3_5":"String","w9_3_6":"String","w9_3_7":"String","w9_3_8":"String","w9_4_1":"String","w9_4_2":"String","w9_5":"String","w9_6":"String","w9_7":"String","AgentRegistration":{"AgentRegistrationTempId":0,"ApplicationId":"String","Company":"String","EIN":"String","FirstName":"String","MiddleName":"String","LastName":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Email":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","Upline1Name":"String","Upline1":0,"Upline2Name":"String","Upline2":0,"RecruitedBy":"String","CreatedDate":"0001-01-01T00:00:00.0000000","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Password":"String","Upline1Percent":0,"Upline2Percent":0,"AgentId":0,"AccountName":"String","AccountType":"String","AccountNumber":"String","AccountRouting":"String","w9_1":"String","w9_2":"String","w9_3_1":"String","w9_3_2":"String","w9_3_3":"String","w9_3_4":"String","w9_3_5":"String","w9_3_6":"String","w9_3_7":"String","w9_3_8":"String","w9_4_1":"String","w9_4_2":"String","w9_5":"String","w9_6":"String","w9_7":"String","IsSecurityLicensed":false,"SecurityLicense":"String","Position":"String","School":"String","District":"String","StoreName":"String"},"AgentRegistrationAnswers":[{"Details":"String","QuestionType":"String","Group":"String","IndexOrder":0,"AgentRegistrationTempId":0,"QuestionId":0,"AnswerYN":false,"AnswerText":"String","DateCreated":"0001-01-01T00:00:00.0000000"}],"AgentStateLicenses":[{"AgentRegistrationTempId":0,"State":"String","LicenseNum":"String"}],"ContactCount":0,"PayChexId":"String","AgentLevelLocked":false,"SecurityLicense":"String","AgentId":0,"Company":"String","AgentName":"String","FirstName":"String","LastName":"String","MiddleInitial":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","Email":"String","EmailSignature":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","InsLicensed":false,"AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","ReferringAgent":"String","PlacementAgent":"String","CreatedDate":"0001-01-01T00:00:00.0000000","UserId":"00000000000000000000000000000000","IsAgent":false,"Package":"String","StoreName":"String","Notes":"String","Upline1":0,"Upline2":0,"Upline3":0,"Upline4":0,"MVPID":0,"AVPID":0,"RVPID":0,"AgentLevel":0,"IsMVP":false,"IsRVP":false,"IsAVP":false,"IsAdmin":false,"IsBusinessCardAdmin":false,"TeamName":"String","LocationId":"00000000000000000000000000000000","CalendarId":"00000000000000000000000000000000","Rank":"String","NBC":false,"Upline1Percent":0,"Upline2Percent":0,"Upline3Percent":0,"Upline4Percent":0,"AgentStatus":"String","Office":"String","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Fax":"String","BusinessEmail":"String","ModifiedDate":"0001-01-01T00:00:00.0000000","ModifiedBy":"String","TimeZone":"String","LeaderLocked":false,"LastSubmittedBusinessDate":"0001-01-01T00:00:00.0000000","GracePeriodDate":"0001-01-01T00:00:00.0000000","Vested":false,"DirectPay":"0001-01-01T00:00:00.0000000","DirectPayApprBy":"String","FactFinderBilling":0,"FullName":"String","ByLastName":"String","IsSecurityLicensed":false,"IsEncompassAdmin":false,"ApiKey":"00000000000000000000000000000000","LastSessionId":"String","LastLogin":"0001-01-01T00:00:00.0000000","MfaActive":false,"RequireMFA":false,"SMSPhoneNumber":"String","VerifiedEmailStatus":false,"VerifiedCellPhoneStatus":false,"SchedulerUrl":"String","QueueDefaults":{"LocationId":"00000000000000000000000000000000","Services":["00000000000000000000000000000000"]},"Roles":["String"],"PasswordUpdated":false,"RestrictToSingleSession":false}],"AgentId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"AgentContract":[{"AgentContractId":0,"AFAgreementReceivedDate":"0001-01-01T00:00:00.0000000","DirectDepositReceivedDate":"0001-01-01T00:00:00.0000000","DotNETCompleteDate":"0001-01-01T00:00:00.0000000","AssociateAppUploadedDate":"0001-01-01T00:00:00.0000000","LSWContractLinkSentDate":"0001-01-01T00:00:00.0000000","LSWContractDoneDate":"0001-01-01T00:00:00.0000000","LSWLifeAgentCode":"String","LSWAnnuityAgentCode":"String","LSWWebsiteUserId":"String","AMLCompletedDate":"0001-01-01T00:00:00.0000000","StateAnnuityTrainingCompletedDate":"0001-01-01T00:00:00.0000000","LSWProductTrainingCompletedDate":"0001-01-01T00:00:00.0000000","EOExpirationDate":"0001-01-01T00:00:00.0000000","SureLCLinkSentDate":"0001-01-01T00:00:00.0000000","AEContractDoneDate":"0001-01-01T00:00:00.0000000","AEAgentCode":"String","MGANorthAmericanContractSentDate":"0001-01-01T00:00:00.0000000","MGANorthAmericanAgentCode":"String","AmericoContractDoneDate":"0001-01-01T00:00:00.0000000","AmericoAgentCode":"String","MidlandContractDoneDate":"0001-01-01T00:00:00.0000000","MidlandAgentCode":"String","JacksonContractDoneDate":"0001-01-01T00:00:00.0000000","JacksonAgentCode":"String","VoyaContractDoneDate":"0001-01-01T00:00:00.0000000","VoyaAgentCode":"String","HoraceMannContractDoneDate":"0001-01-01T00:00:00.0000000","HoraceMannAgentCode":"String","GreatAmericanContractDoneDate":"0001-01-01T00:00:00.0000000","GreatAmericanAgentCode":"String","MutualOfOmahaContractDoneDate":"0001-01-01T00:00:00.0000000","MutualOfOmahaAgentCode":"String","AllanzContractDoneDate":"0001-01-01T00:00:00.0000000","AllanzAgentCode":"String","FGContractDoneDate":"0001-01-01T00:00:00.0000000","FGAgentCode":"String","ResidentLicenseState":"String","ResidentLicenseNumber":"String","ResidentLicenseExpirationDate":"0001-01-01T00:00:00.0000000","ContractingComplete":"0001-01-01T00:00:00.0000000","PackageMailed":"0001-01-01T00:00:00.0000000","TrackingNum":"String","ProtectiveContractDoneDate":"0001-01-01T00:00:00.0000000","ProtectiveCode":"String","AtheneContractDoneDate":"0001-01-01T00:00:00.0000000","AtheneCode":"String","ForestersContractDoneDate":"0001-01-01T00:00:00.0000000","ForestersCode":"String","ACHName":"String","ACHNumber":"String","ACHRouting":"String","ACHAccountType":"String","w9_1":"String","w9_2":"String","w9_3_1":"String","w9_3_2":"String","w9_3_3":"String","w9_3_4":"String","w9_3_5":"String","w9_3_6":"String","w9_3_7":"String","w9_3_8":"String","w9_4_1":"String","w9_4_2":"String","w9_5":"String","w9_6":"String","w9_7":"String","AgentRegistration":{"AgentRegistrationTempId":0,"ApplicationId":"String","Company":"String","EIN":"String","FirstName":"String","MiddleName":"String","LastName":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Email":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","Upline1Name":"String","Upline1":0,"Upline2Name":"String","Upline2":0,"RecruitedBy":"String","CreatedDate":"0001-01-01T00:00:00.0000000","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Password":"String","Upline1Percent":0,"Upline2Percent":0,"AgentId":0,"AccountName":"String","AccountType":"String","AccountNumber":"String","AccountRouting":"String","w9_1":"String","w9_2":"String","w9_3_1":"String","w9_3_2":"String","w9_3_3":"String","w9_3_4":"String","w9_3_5":"String","w9_3_6":"String","w9_3_7":"String","w9_3_8":"String","w9_4_1":"String","w9_4_2":"String","w9_5":"String","w9_6":"String","w9_7":"String","IsSecurityLicensed":false,"SecurityLicense":"String","Position":"String","School":"String","District":"String","StoreName":"String"},"AgentRegistrationAnswers":[{"Details":"String","QuestionType":"String","Group":"String","IndexOrder":0,"AgentRegistrationTempId":0,"QuestionId":0,"AnswerYN":false,"AnswerText":"String","DateCreated":"0001-01-01T00:00:00.0000000"}],"AgentStateLicenses":[{"AgentRegistrationTempId":0,"State":"String","LicenseNum":"String"}],"ContactCount":0,"PayChexId":"String","AgentLevelLocked":false,"SecurityLicense":"String","AgentId":0,"Company":"String","AgentName":"String","FirstName":"String","LastName":"String","MiddleInitial":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","Email":"String","EmailSignature":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","InsLicensed":false,"AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","ReferringAgent":"String","PlacementAgent":"String","CreatedDate":"0001-01-01T00:00:00.0000000","UserId":"00000000000000000000000000000000","IsAgent":false,"Package":"String","StoreName":"String","Notes":"String","Upline1":0,"Upline2":0,"Upline3":0,"Upline4":0,"MVPID":0,"AVPID":0,"RVPID":0,"AgentLevel":0,"IsMVP":false,"IsRVP":false,"IsAVP":false,"IsAdmin":false,"IsBusinessCardAdmin":false,"TeamName":"String","LocationId":"00000000000000000000000000000000","CalendarId":"00000000000000000000000000000000","Rank":"String","NBC":false,"Upline1Percent":0,"Upline2Percent":0,"Upline3Percent":0,"Upline4Percent":0,"AgentStatus":"String","Office":"String","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Fax":"String","BusinessEmail":"String","ModifiedDate":"0001-01-01T00:00:00.0000000","ModifiedBy":"String","TimeZone":"String","LeaderLocked":false,"LastSubmittedBusinessDate":"0001-01-01T00:00:00.0000000","GracePeriodDate":"0001-01-01T00:00:00.0000000","Vested":false,"DirectPay":"0001-01-01T00:00:00.0000000","DirectPayApprBy":"String","FactFinderBilling":0,"FullName":"String","ByLastName":"String","IsSecurityLicensed":false,"IsEncompassAdmin":false,"ApiKey":"00000000000000000000000000000000","LastSessionId":"String","LastLogin":"0001-01-01T00:00:00.0000000","MfaActive":false,"RequireMFA":false,"SMSPhoneNumber":"String","VerifiedEmailStatus":false,"VerifiedCellPhoneStatus":false,"SchedulerUrl":"String","QueueDefaults":{"LocationId":"00000000000000000000000000000000","Services":["00000000000000000000000000000000"]},"Roles":["String"],"PasswordUpdated":false,"RestrictToSingleSession":false}]}