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

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

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

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

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

    /**
     * @var string
     */
    public $ClubTrainingCategory;

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

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

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

    /**
     * @param string $clubTrainingCategory
     */
    public function setClubTrainingCategory(string $clubTrainingCategory)
    {
        $this->ClubTrainingCategory = $clubTrainingCategory;
    }
}