<?php

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

use Axtiva\FlexibleGraphql\Generator\Exception\UnknownEnumValue;
use Axtiva\FlexibleGraphql\Type\EnumInterface;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * and will be regenerated. Do not edit it manually
 * PHP representation of graphql enum CertificateKeyUsage
 * The key usage
 */
final class CertificateKeyUsageEnum implements EnumInterface
{
    public const digitalSignature = 'digitalSignature';
    public const nonRepudiation = 'nonRepudiation';
    public const keyEncipherment = 'keyEncipherment';
    public const dataEncipherment = 'dataEncipherment';
    public const keyAgreement = 'keyAgreement';
    public const keyCertSign = 'keyCertSign';
    public const cRLSign = 'cRLSign';
    public const encipherOnly = 'encipherOnly';
    public const decipherOnly = 'decipherOnly';
    public string $value;
    private static array $map = [
        self::digitalSignature => true,
        self::nonRepudiation => true,
        self::keyEncipherment => true,
        self::dataEncipherment => true,
        self::keyAgreement => true,
        self::keyCertSign => true,
        self::cRLSign => true,
        self::encipherOnly => true,
        self::decipherOnly => true,
    ];

    public function __construct($value)
    {
        if (!isset(self::$map[$value])) {
            throw new UnknownEnumValue(__CLASS__, $value);
        }
        $this->value = $value;
    }

    public function __toString(): string
    {
        return $this->value;
    }
}