<?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 TopologyConnectionInput
 * A relation between two devices. The kind of relation is defined by the relation type. * @property mixed $lastSeenTimestamp = null The timestamp when this connection was seen the last time
 * @property null|NetworkInterfaceInputInputType $networkInterface1 = null The first network interface for the topology
 * @property null|NetworkInterfaceInputInputType $networkInterface2 = null The second network interface for the topology
 * @property null|LinkLayerNeighborProtocolEnum $protocol = null The protocol which has been used to determine this connection
 */
final class TopologyConnectionInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'networkInterface1') {
            return new NetworkInterfaceInputInputType($value);
        }

        if ($name === 'networkInterface2') {
            return new NetworkInterfaceInputInputType($value);
        }

        if ($name === 'protocol') {
            return new LinkLayerNeighborProtocolEnum($value);
        }

        return $value;
    }
}