<?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 DashboardItemLocationInput
 * A dashboard item location. * @property null|string $id = null The dashboard id identifying the dashboard item.
 * @property null|LocationInputInputType $location = null the dashboard item location in the dashboard grid.
 * @property bool $minimized a flag whether the dashboard item is minimized.
 * @property null|SizeInputInputType $size = null the dashboard size in the dashboard grid.
 * @property bool $visible a flag whether the dashboard item is visible.
 */
final class DashboardItemLocationInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'location') {
            return new LocationInputInputType($value);
        }

        if ($name === 'size') {
            return new SizeInputInputType($value);
        }

        return $value;
    }
}