<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/video/transcoder/v1beta1/resources.proto

namespace Google\Cloud\Video\Transcoder\V1beta1\TextStream;

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

/**
 * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1beta1.TextStream.TextAtom</code>
 */
class TextAtom extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The `EditAtom.key` that references atom with text inputs in the
     * `Job.edit_list`.
     *
     * Generated from protobuf field <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $key = '';
    /**
     * List of `Job.inputs` that should be embedded in this atom. Only one
     * input is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput inputs = 2;</code>
     */
    private $inputs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *           Required. The `EditAtom.key` that references atom with text inputs in the
     *           `Job.edit_list`.
     *     @type \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom\TextInput[]|\Google\Protobuf\Internal\RepeatedField $inputs
     *           List of `Job.inputs` that should be embedded in this atom. Only one
     *           input is supported.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The `EditAtom.key` that references atom with text inputs in the
     * `Job.edit_list`.
     *
     * Generated from protobuf field <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * Required. The `EditAtom.key` that references atom with text inputs in the
     * `Job.edit_list`.
     *
     * Generated from protobuf field <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->key = $var;

        return $this;
    }

    /**
     * List of `Job.inputs` that should be embedded in this atom. Only one
     * input is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput inputs = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInputs()
    {
        return $this->inputs;
    }

    /**
     * List of `Job.inputs` that should be embedded in this atom. Only one
     * input is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput inputs = 2;</code>
     * @param \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom\TextInput[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInputs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom\TextInput::class);
        $this->inputs = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TextAtom::class, \Google\Cloud\Video\Transcoder\V1beta1\TextStream_TextAtom::class);

