<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\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|string[] $extendedKeyUsage = null The list of extended key usage OIDs
 * @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 null|iterable|CertificateKeyUsageEnum[] $keyUsage = null The list of key usages for this certificate
 * @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|iterable|string[] $subjectAlternativeNames = null The list of subject alternative names for this certificate
 * @property null|string $thumbprint = null The certificate's thumbprint (fingerprint)
 * @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);
        }

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

        return $value;
    }
}