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

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

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

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

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

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

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