<?php

namespace Fifa\ConnectId\Sdk\ApiModelValidation;

use Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesByFIFAIdRequestType;
use Fifa\ConnectId\Sdk\Registration\ValidationException;

class GetDuplicatesByFIFAIdRequestTypeValidator
{
    /**
     * Method that validates object provided and throws exception when object's properties are invalid
     *
     * @param GetDuplicatesByFIFAIdRequestType|null $validationSubject
     * @param string $validationSubjectName
     * @return void
     * @throws ValidationException
     */
    public static function validate(?GetDuplicatesByFIFAIdRequestType $validationSubject, string $validationSubjectName)
    {
        $validationSubjectName = ApiModelValidator::resolveValidationSubjectName($validationSubject, $validationSubjectName);

        ApiModelValidator::cannotBeNull($validationSubject, $validationSubjectName);

        ApiModelValidator::validateDoNotAllowNull($validationSubject->getPersonFIFAId(), FifaIdValidator::class, $validationSubjectName.".personFIFAId");
        ApiModelValidator::validateAllInCollectionAllowNull($validationSubject->getTrustedOrganisationsFIFAIds(), FifaIdValidator::class, $validationSubjectName.".trustedOrganisationsFIFAIds");
    }
}