<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\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 DeviceAttributeInput
 * a device attribute * @property null|bool $booleanValue = null Gets the boolean value
 * @property null|CustomAttributeInputInputType $customAttribute = null The corresponding custom attribute definition
 * @property null|DeviceInputInputType $device = null The corresponding device
 * @property null|float $floatValue = null Gets the float value
 * @property null|int $intValue = null Gets the integer value
 * @property mixed $lastUpdate = null The last update timestamp.
 * @property mixed $longValue = null Gets the long value
 * @property null|string $name = null The name for device attributes which are no custom attributes.
 * @property null|string $stringValue = null Gets the string value
 * @property mixed $timestampValue = null Gets the timestamp value
 * @property mixed $value = null The corresponding custom attribute definition
 */
final class DeviceAttributeInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'customAttribute') {
            return new CustomAttributeInputInputType($value);
        }

        if ($name === 'device') {
            return new DeviceInputInputType($value);
        }

        return $value;
    }
}