<?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 IscsiPortConnectionInput
 * An ISCSI port (either initiator or target depending on the type field) * @property null|string $initiatorIPAddress = null The initiators IP address.
 * @property null|string $targetIPAddress = null The target IP address.
 * @property null|IscsiPortInputInputType $initiatorPort = null Get the initiator port
 * @property null|IscsiPortInputInputType $targetPort = null Get the target port
 */
final class IscsiPortConnectionInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'initiatorPort') {
            return new IscsiPortInputInputType($value);
        }

        if ($name === 'targetPort') {
            return new IscsiPortInputInputType($value);
        }

        return $value;
    }
}