<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: plugnmeet_room_artifacts.proto

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * RoomArtifactMetadata is the universal structure for the 'metadata' JSON field
 * in the pnm_room_artifacts table. All fields are optional.
 *
 * Generated from protobuf message <code>plugnmeet.RoomArtifactMetadata</code>
 */
class RoomArtifactMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional: Information about the user who initiated or is associated with the artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactUserInfo user_info = 1;</code>
     */
    protected $user_info = null;
    /**
     * Optional: Information about an asynchronous provider job.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactProviderJobInfo provider_job_info = 2;</code>
     */
    protected $provider_job_info = null;
    /**
     * Optional: Information about the final generated file artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactFileInfo file_info = 3;</code>
     */
    protected $file_info = null;
    /**
     * A field to link a file artifact back to its usage artifact.
     *
     * Generated from protobuf field <code>optional string reference_artifact_id = 10;</code>
     */
    protected $reference_artifact_id = null;
    protected $usage_details;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactUserInfo $user_info
     *           Optional: Information about the user who initiated or is associated with the artifact.
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactProviderJobInfo $provider_job_info
     *           Optional: Information about an asynchronous provider job.
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactFileInfo $file_info
     *           Optional: Information about the final generated file artifact.
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactTokenUsage $token_usage
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactDurationUsage $duration_usage
     *     @type \Mynaparrot\PlugnmeetProto\RoomArtifactCharacterCountUsage $character_count_usage
     *     @type string $reference_artifact_id
     *           A field to link a file artifact back to its usage artifact.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetRoomArtifacts::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional: Information about the user who initiated or is associated with the artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactUserInfo user_info = 1;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactUserInfo|null
     */
    public function getUserInfo()
    {
        return $this->user_info;
    }

    public function hasUserInfo()
    {
        return isset($this->user_info);
    }

    public function clearUserInfo()
    {
        unset($this->user_info);
    }

    /**
     * Optional: Information about the user who initiated or is associated with the artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactUserInfo user_info = 1;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactUserInfo $var
     * @return $this
     */
    public function setUserInfo($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactUserInfo::class);
        $this->user_info = $var;

        return $this;
    }

    /**
     * Optional: Information about an asynchronous provider job.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactProviderJobInfo provider_job_info = 2;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactProviderJobInfo|null
     */
    public function getProviderJobInfo()
    {
        return $this->provider_job_info;
    }

    public function hasProviderJobInfo()
    {
        return isset($this->provider_job_info);
    }

    public function clearProviderJobInfo()
    {
        unset($this->provider_job_info);
    }

    /**
     * Optional: Information about an asynchronous provider job.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactProviderJobInfo provider_job_info = 2;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactProviderJobInfo $var
     * @return $this
     */
    public function setProviderJobInfo($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactProviderJobInfo::class);
        $this->provider_job_info = $var;

        return $this;
    }

    /**
     * Optional: Information about the final generated file artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactFileInfo file_info = 3;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactFileInfo|null
     */
    public function getFileInfo()
    {
        return $this->file_info;
    }

    public function hasFileInfo()
    {
        return isset($this->file_info);
    }

    public function clearFileInfo()
    {
        unset($this->file_info);
    }

    /**
     * Optional: Information about the final generated file artifact.
     *
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactFileInfo file_info = 3;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactFileInfo $var
     * @return $this
     */
    public function setFileInfo($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactFileInfo::class);
        $this->file_info = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactTokenUsage token_usage = 4;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactTokenUsage|null
     */
    public function getTokenUsage()
    {
        return $this->readOneof(4);
    }

    public function hasTokenUsage()
    {
        return $this->hasOneof(4);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactTokenUsage token_usage = 4;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactTokenUsage $var
     * @return $this
     */
    public function setTokenUsage($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactTokenUsage::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactDurationUsage duration_usage = 5;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactDurationUsage|null
     */
    public function getDurationUsage()
    {
        return $this->readOneof(5);
    }

    public function hasDurationUsage()
    {
        return $this->hasOneof(5);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactDurationUsage duration_usage = 5;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactDurationUsage $var
     * @return $this
     */
    public function setDurationUsage($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactDurationUsage::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactCharacterCountUsage character_count_usage = 6;</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomArtifactCharacterCountUsage|null
     */
    public function getCharacterCountUsage()
    {
        return $this->readOneof(6);
    }

    public function hasCharacterCountUsage()
    {
        return $this->hasOneof(6);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomArtifactCharacterCountUsage character_count_usage = 6;</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomArtifactCharacterCountUsage $var
     * @return $this
     */
    public function setCharacterCountUsage($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomArtifactCharacterCountUsage::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * A field to link a file artifact back to its usage artifact.
     *
     * Generated from protobuf field <code>optional string reference_artifact_id = 10;</code>
     * @return string
     */
    public function getReferenceArtifactId()
    {
        return isset($this->reference_artifact_id) ? $this->reference_artifact_id : '';
    }

    public function hasReferenceArtifactId()
    {
        return isset($this->reference_artifact_id);
    }

    public function clearReferenceArtifactId()
    {
        unset($this->reference_artifact_id);
    }

    /**
     * A field to link a file artifact back to its usage artifact.
     *
     * Generated from protobuf field <code>optional string reference_artifact_id = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setReferenceArtifactId($var)
    {
        GPBUtil::checkString($var, True);
        $this->reference_artifact_id = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getUsageDetails()
    {
        return $this->whichOneof("usage_details");
    }

}

