<?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 CertificateRequest
 * Options to include into a certificate request * @property null|iterable|CertificateKeyUsageEnum[] $keyUsage = null The desired certificate key usage
 * @property null|bool $shouldMakePEM = null Flag to indicate whether the desired certificate request should be delivered in PEM encoding (textual form)
 * @property null|string $subject = null The certificate subject
 * @property null|iterable|string[] $subjectAlternativeNames = null The desired certificate subject alternative name
 */
final class CertificateRequestInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        return $value;
    }
}