<?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 MappedPrinterInput
 * A mapped printer mapped by the operating system. * @property null|string $ip4Address = null The printer's IP4 address.
 * @property null|string $ip6Address = null The printer's IP6 address.
 * @property null|string $name = null The printer name.
 * @property null|OperatingSystemInputInputType $operatingSystem = null The operating system.
 * @property null|string $portName = null The printer port name.
 * @property null|DeviceInputInputType $printerDevice = null The printer device.
 */
final class MappedPrinterInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'operatingSystem') {
            return new OperatingSystemInputInputType($value);
        }

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

        return $value;
    }
}