<?php

declare (strict_types=1);
namespace idoit\Module\JDisc\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 CustomAttributeReferenceValueInput
 * Custom attribute reference-value pair * @property bool $changed The custom attribute isChanged flag
 * @property null|CustomAttributeReferenceInputInputType $ref = null The custom attribute reference
 * @property null|AttributeTypeEnum $type = null The custom attribute type
 * @property mixed $valueType = null The custom attribute value
 */
final class CustomAttributeReferenceValueInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'ref') {
            return new CustomAttributeReferenceInputInputType($value);
        }

        if ($name === 'type') {
            return new AttributeTypeEnum($value);
        }

        return $value;
    }
}