<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/cached_content.proto

namespace Google\Cloud\AIPlatform\V1\CachedContent;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Metadata on the usage of the cached content.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.CachedContent.UsageMetadata</code>
 */
class UsageMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Total number of tokens that the cached content consumes.
     *
     * Generated from protobuf field <code>int32 total_token_count = 1;</code>
     */
    protected $total_token_count = 0;
    /**
     * Number of text characters.
     *
     * Generated from protobuf field <code>int32 text_count = 2;</code>
     */
    protected $text_count = 0;
    /**
     * Number of images.
     *
     * Generated from protobuf field <code>int32 image_count = 3;</code>
     */
    protected $image_count = 0;
    /**
     * Duration of video in seconds.
     *
     * Generated from protobuf field <code>int32 video_duration_seconds = 4;</code>
     */
    protected $video_duration_seconds = 0;
    /**
     * Duration of audio in seconds.
     *
     * Generated from protobuf field <code>int32 audio_duration_seconds = 5;</code>
     */
    protected $audio_duration_seconds = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $total_token_count
     *           Total number of tokens that the cached content consumes.
     *     @type int $text_count
     *           Number of text characters.
     *     @type int $image_count
     *           Number of images.
     *     @type int $video_duration_seconds
     *           Duration of video in seconds.
     *     @type int $audio_duration_seconds
     *           Duration of audio in seconds.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\CachedContent::initOnce();
        parent::__construct($data);
    }

    /**
     * Total number of tokens that the cached content consumes.
     *
     * Generated from protobuf field <code>int32 total_token_count = 1;</code>
     * @return int
     */
    public function getTotalTokenCount()
    {
        return $this->total_token_count;
    }

    /**
     * Total number of tokens that the cached content consumes.
     *
     * Generated from protobuf field <code>int32 total_token_count = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalTokenCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_token_count = $var;

        return $this;
    }

    /**
     * Number of text characters.
     *
     * Generated from protobuf field <code>int32 text_count = 2;</code>
     * @return int
     */
    public function getTextCount()
    {
        return $this->text_count;
    }

    /**
     * Number of text characters.
     *
     * Generated from protobuf field <code>int32 text_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setTextCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->text_count = $var;

        return $this;
    }

    /**
     * Number of images.
     *
     * Generated from protobuf field <code>int32 image_count = 3;</code>
     * @return int
     */
    public function getImageCount()
    {
        return $this->image_count;
    }

    /**
     * Number of images.
     *
     * Generated from protobuf field <code>int32 image_count = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setImageCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->image_count = $var;

        return $this;
    }

    /**
     * Duration of video in seconds.
     *
     * Generated from protobuf field <code>int32 video_duration_seconds = 4;</code>
     * @return int
     */
    public function getVideoDurationSeconds()
    {
        return $this->video_duration_seconds;
    }

    /**
     * Duration of video in seconds.
     *
     * Generated from protobuf field <code>int32 video_duration_seconds = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setVideoDurationSeconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->video_duration_seconds = $var;

        return $this;
    }

    /**
     * Duration of audio in seconds.
     *
     * Generated from protobuf field <code>int32 audio_duration_seconds = 5;</code>
     * @return int
     */
    public function getAudioDurationSeconds()
    {
        return $this->audio_duration_seconds;
    }

    /**
     * Duration of audio in seconds.
     *
     * Generated from protobuf field <code>int32 audio_duration_seconds = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setAudioDurationSeconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->audio_duration_seconds = $var;

        return $this;
    }

}


