<?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 ScheduledDiscoveryJobInput
 * Scheduled discovery job * @property null|ScheduleActionEnum $action = null The scheduled job action
 * @property mixed $creationTime = null The scheduled job creation time.
 * @property null|string $description = null The scheduled job description
 * @property null|bool $enabled = null The scheduled job enabled flag
 * @property mixed $modificationTime = null The scheduled job modification time.
 * @property null|string $name = null The scheduled job name
 * @property null|ScheduleInputInputType $schedule = null The schedule linked to this scheduled job
 * @property null|DiscoveryJobInputInputType $discoveryJob = null The discovery job having this scheduled job. Can be null when the scheduled job does not belong to an entity
 */
final class ScheduledDiscoveryJobInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'action') {
            return new ScheduleActionEnum($value);
        }

        if ($name === 'schedule') {
            return new ScheduleInputInputType($value);
        }

        if ($name === 'discoveryJob') {
            return new DiscoveryJobInputInputType($value);
        }

        return $value;
    }
}