<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\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 ScheduledTaskTriggerInput
 * A trigger for a scheduled task. Triggers define when a scheduled task is supposed to start * @property null|bool $enabled = null The enabled flag for the trigge.
 * @property null|DeviceScheduledTaskTriggerFrequencyEnum $frequency = null The scheduled task's frequency.
 * @property null|string $schedule = null The scheduled task's schedule.
 * @property null|ScheduledTaskInputInputType $scheduledTask = null The trigger's scheduled task.
 * @property null|DeviceScheduledTaskTriggerTypeEnum $type = null The enabled flag for the trigger.
 */
final class ScheduledTaskTriggerInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'frequency') {
            return new DeviceScheduledTaskTriggerFrequencyEnum($value);
        }

        if ($name === 'scheduledTask') {
            return new ScheduledTaskInputInputType($value);
        }

        if ($name === 'type') {
            return new DeviceScheduledTaskTriggerTypeEnum($value);
        }

        return $value;
    }
}