<?php
namespace Fifa\ConnectId\Sdk\Model\DataStandard;

use DateTime;
use Fifa\ConnectId\Sdk\Util\ToString\Exception\ToStringException;

/**
 * Class TeamOfficialRegistration
 * @package Fifa\ConnectId\Sdk\Model\DataStandard
 */
class TeamOfficialRegistration extends Registration
{
    /**
     * @var string
     * @required
     */
    public $TeamOfficialRole;

    /**
     * @var string
     * @required
     */
    public $Discipline;

    /**
     * TeamOfficialRegistration constructor.
     *
     * @param string $PersonFIFAId
     * @param string $Status
     * @param string $OrganisationFIFAId
     * @param DateTime $RegistrationValidFrom
     * @param string $TeamOfficialRole
     * @param string $Discipline
     *
     * @throws ToStringException
     */
    public function __construct(string $PersonFIFAId, string $Status, string $OrganisationFIFAId, DateTime $RegistrationValidFrom, string $TeamOfficialRole, string $Discipline)
    {
        parent::__construct($PersonFIFAId, $Status, $OrganisationFIFAId, $RegistrationValidFrom);
        $this->TeamOfficialRole = $TeamOfficialRole;
        $this->Discipline = $Discipline;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        $registration = parent::__toString();
        $required = sprintf('TeamOfficialRole: %s, Discipline: %s', $this->TeamOfficialRole, $this->Discipline);

        return sprintf('%s, %s', $registration, $required);
    }
}