<?php

namespace Fifa\ConnectId\Sdk\ApiModelValidation;

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

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

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

        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getQueriedHash(), $validationSubjectName.".queriedHash");
        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getQueriedDateOfBirth(), $validationSubjectName.".queriedDateOfBirth");
        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getMatchedHash(), $validationSubjectName.".matchedHash");
        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getMatchedDateOfBirth(), $validationSubjectName.".matchedDateOfBirth");
    }
}