<?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 ScheduleInput
 * A schedule defines when and how often to execute recurring tasks. * @property mixed $creationTime = null The schedule creation time.
 * @property null|int $dayOfMonth = null The schedule day of month
 * @property null|int $dayOfWeek = null The schedule day of week
 * @property null|iterable|ScheduleExceptionInputInputType[] $exceptions = null The schedule exceptions
 * @property null|string $id = null The internal id this entity. Note that the id might change when the entity gets deleted and recreated.
 * @property mixed $modificationTime = null The schedule modification time.
 * @property null|int $secondsFrequency = null The schedule frequency in seconds
 * @property mixed $ts = null The schedule timestamp
 * @property null|ScheduleTypeEnum $type = null The schedule type
 */
final class ScheduleInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'exceptions') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new ScheduleExceptionInputInputType($v)); })($value);
        }

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

        return $value;
    }
}