<?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 ScheduleType
 * The discovery job schedule type.
 */
final class ScheduleTypeEnum implements EnumInterface
{
    public const Daily = 'Daily';
    public const Weekly = 'Weekly';
    public const Monthly = 'Monthly';
    public const IntervalInSeconds = 'IntervalInSeconds';
    public const Once = 'Once';
    public const NotScheduled = 'NotScheduled';
    public string $value;
    private static array $map = [
        self::Daily => true,
        self::Weekly => true,
        self::Monthly => true,
        self::IntervalInSeconds => true,
        self::Once => true,
        self::NotScheduled => 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;
    }
}