<?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 DeviceGroupRuleType
 * The device group rule type
 */
final class DeviceGroupRuleTypeEnum implements EnumInterface
{
    public const GroupByIP4Network = 'GroupByIP4Network';
    public const GroupByIP4Range = 'GroupByIP4Range';
    public const GroupByModel = 'GroupByModel';
    public const GroupByOsVersion = 'GroupByOsVersion';
    public const GroupByOsPatchLevel = 'GroupByOsPatchLevel';
    public const GroupByType = 'GroupByType';
    public const GroupBySysLocation = 'GroupBySysLocation';
    public const GroupByWindowsDomain = 'GroupByWindowsDomain';
    public const GroupByDirectory = 'GroupByDirectory';
    public const GroupByIP6Network = 'GroupByIP6Network';
    public const GroupByName = 'GroupByName';
    public const GroupByManufacturer = 'GroupByManufacturer';
    public const GroupByOsFamily = 'GroupByOsFamily';
    public const GroupByWindowsComputername = 'GroupByWindowsComputername';
    public const GroupBySerialNumber = 'GroupBySerialNumber';
    public const GroupByDeviceList = 'GroupByDeviceList';
    public string $value;
    private static array $map = [
        self::GroupByIP4Network => true,
        self::GroupByIP4Range => true,
        self::GroupByModel => true,
        self::GroupByOsVersion => true,
        self::GroupByOsPatchLevel => true,
        self::GroupByType => true,
        self::GroupBySysLocation => true,
        self::GroupByWindowsDomain => true,
        self::GroupByDirectory => true,
        self::GroupByIP6Network => true,
        self::GroupByName => true,
        self::GroupByManufacturer => true,
        self::GroupByOsFamily => true,
        self::GroupByWindowsComputername => true,
        self::GroupBySerialNumber => true,
        self::GroupByDeviceList => 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;
    }
}