<?php

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

declare(strict_types=1);

namespace Dagger;

class LLMTokenUsage extends Client\AbstractObject implements Client\IdAble
{
    public function cachedTokenReads(): int
    {
        $leafQueryBuilder = new \Dagger\Client\QueryBuilder('cachedTokenReads');
        return (int)$this->queryLeaf($leafQueryBuilder, 'cachedTokenReads');
    }

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

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

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

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

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