<?php

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

declare(strict_types=1);

namespace Dagger;

/**
 * Module source originating from a git repo.
 */
class GitModuleSource extends Client\AbstractObject implements Client\IdAble
{
    /**
     * The URL from which the source's git repo can be cloned.
     */
    public function cloneURL(): string
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('cloneURL');
        return (string)$this->queryLeaf($leafQueryBuilder, 'cloneURL');
    }

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

    /**
     * The URL to the source's git repo in a web browser
     */
    public function htmlURL(): string
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('htmlURL');
        return (string)$this->queryLeaf($leafQueryBuilder, 'htmlURL');
    }

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

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

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