<?php

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

declare(strict_types=1);

namespace Dagger;

/**
 * The configuration of dependency of a module.
 */
class ModuleDependency extends Client\AbstractObject implements Client\IdAble
{
    /**
     * A unique identifier for this ModuleDependency.
     */
    public function id(): ModuleDependencyId
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('id');
        return new \Dagger\ModuleDependencyId((string)$this->queryLeaf($leafQueryBuilder, 'id'));
    }

    public function name(): string
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('name');
        return (string)$this->queryLeaf($leafQueryBuilder, 'name');
    }

    public function source(): ModuleSource
    {
        $innerQueryBuilder = new \Dagger\Client\QueryBuilder('source');
        return new \Dagger\ModuleSource($this->client, $this->queryBuilderChain->chain($innerQueryBuilder));
    }
}
