<?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 DeviceCustomAttributeValuesContainerInput
 * A device to custom attribute values container * @property null|DeviceReferenceInputInputType $device = null The device reference
 * @property null|iterable|CustomAttributeReferenceValueInputInputType[] $values = null The custom attribute reference value
 */
final class DeviceCustomAttributeValuesContainerInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        if ($name === 'values') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new CustomAttributeReferenceValueInputInputType($v)); })($value);
        }

        return $value;
    }
}