<?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 ConnectorState
 * The state for a relation between two devices. This state is used
for instance for virtualation relations between the physical host and the VM
in order to indicate the virtual machine state
 */
final class ConnectorStateEnum implements EnumInterface
{
    public const Unknown = 'Unknown';
    public const Running = 'Running';
    public const Stopped = 'Stopped';
    public const Suspended = 'Suspended';
    public const Pending = 'Pending';
    public const Paused = 'Paused';
    public const Pausing = 'Pausing';
    public const Resuming = 'Resuming';
    public const Saving = 'Saving';
    public const Snapshotting = 'Snapshotting';
    public const Starting = 'Starting';
    public const Stopping = 'Stopping';
    public const Configured = 'Configured';
    public const Blocked = 'Blocked';
    public const Dying = 'Dying';
    public const Crashed = 'Crashed';
    public const Creating = 'Creating';
    public const Deallocating = 'Deallocating';
    public const Deallocated = 'Deallocated';
    public const Migrating = 'Migrating';
    public const Rebuilding = 'Rebuilding';
    public const Intune = 'Intune';
    public const Repairing = 'Repairing';
    public const Suspending = 'Suspending';
    public string $value;
    private static array $map = [
        self::Unknown => true,
        self::Running => true,
        self::Stopped => true,
        self::Suspended => true,
        self::Pending => true,
        self::Paused => true,
        self::Pausing => true,
        self::Resuming => true,
        self::Saving => true,
        self::Snapshotting => true,
        self::Starting => true,
        self::Stopping => true,
        self::Configured => true,
        self::Blocked => true,
        self::Dying => true,
        self::Crashed => true,
        self::Creating => true,
        self::Deallocating => true,
        self::Deallocated => true,
        self::Migrating => true,
        self::Rebuilding => true,
        self::Intune => true,
        self::Repairing => true,
        self::Suspending => 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;
    }
}