<?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 CloudFoundrySpaceInput
 * A CloudFoundry space object. * @property null|iterable|CloudFoundryApplicationInputInputType[] $appliations = null The list of CloudFoundry applications.
 * @property mixed $discoveryTime = null The last discovery timestamp. This is the timestamp of the current data.
 * @property null|string $name = null The CloudFoundry space name
 * @property null|CloudFoundryOrganizationInputInputType $organization = null The organization that this space belongs to
 * @property null|iterable|CloudFoundryServiceInstanceInputInputType[] $serviceInstances = null The list of CloudFoundry service instances within this space.
 * @property null|string $uniqueId = null The CloudFoundry space unique id.
 */
final class CloudFoundrySpaceInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        if ($name === 'organization') {
            return new CloudFoundryOrganizationInputInputType($value);
        }

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

        return $value;
    }
}