<?php

declare (strict_types=1);
namespace idoit\Module\JDisc\Graphql\Schema\Model;

use Axtiva\FlexibleGraphql\Type\InputType;

/**
 * This code is @generated by axtiva/flexible-graphql-php do not edit it
 * PHP representation of graphql type CertificateInput
 * A certificate installed on an operating systems's certificate store. * @property null|iterable|InstalledCertificateInputInputType[] $installations = null The list of installations for this certificate
 * @property null|string $issuer = null The certificate's issuer
 * @property null|int $keyLength = null The certificate's key length
 * @property null|PublicKeyEncryptionTypeEnum $keyType = null The certificate's key type
 * @property mixed $notAfter = null The certificate is not valid after this date
 * @property mixed $notBefore = null The certificate is not valid before this date
 * @property null|string $oid = null The certificate's oid
 * @property null|string $serialNumber = null The certificate's serial number
 * @property null|string $subject = null The certificate's subject
 * @property null|string $version = null The certificate's version
 */
final class CertificateInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'installations') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new InstalledCertificateInputInputType($v)); })($value);
        }

        if ($name === 'keyType') {
            return new PublicKeyEncryptionTypeEnum($value);
        }

        return $value;
    }
}