<?php

/**
 * This class has been generated by dagger-php-sdk. DO NOT EDIT.
 */

declare(strict_types=1);

namespace Dagger;

/**
 * A graphql input type, which is essentially just a group of named args.
 * This is currently only used to represent pre-existing usage of graphql input types
 * in the core API. It is not used by user modules and shouldn't ever be as user
 * module accept input objects via their id rather than graphql input types.
 */
class InputTypeDef extends Client\AbstractObject implements Client\IdAble
{
    /**
     * Static fields defined on this input object, if any.
     */
    public function fields(): array
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('fields');
        return (array)$this->queryLeaf($leafQueryBuilder, 'fields');
    }

    /**
     * A unique identifier for this InputTypeDef.
     */
    public function id(): InputTypeDefId
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('id');
        return new \Dagger\InputTypeDefId((string)$this->queryLeaf($leafQueryBuilder, 'id'));
    }

    /**
     * The name of the input object.
     */
    public function name(): string
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('name');
        return (string)$this->queryLeaf($leafQueryBuilder, 'name');
    }
}
