<?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 DatabaseInput
 * A database * @property null|ApplicationInstanceInputInputType $applicationInstance = null The owning instance
 * @property mixed $creationTime = null The time when the service was detected for the first time.
 * @property null|iterable|DatabaseSchemaInputInputType[] $databaseSchemas = null The list of database schemas within this database
 * @property mixed $maxSize = null The database max size in bytes
 * @property null|string $name = null The database name
 * @property mixed $size = null The database size in bytes
 * @property null|SoftwareInstanceStateEnum $state = null The database state
 */
final class DatabaseInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'applicationInstance') {
            return new ApplicationInstanceInputInputType($value);
        }

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

        if ($name === 'state') {
            return new SoftwareInstanceStateEnum($value);
        }

        return $value;
    }
}