<?php

namespace Fifa\ConnectId\Sdk\ApiModelValidation;

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

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

        ApiModelValidator::cannotBeNull($validationSubject, $validationSubjectName);
        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getPictureLink(), $validationSubjectName.".pictureLink");
        ApiModelValidator::cannotBeNullOrWhitespace($validationSubject->getMimeType(), $validationSubjectName.".mimeType");
    }
}