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

namespace Google\Cloud\Video\Transcoder\V1beta1;

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

/**
 * Encoding of a text stream. For example, closed captions or subtitles.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1beta1.TextStream</code>
 */
class TextStream extends \Google\Protobuf\Internal\Message
{
    /**
     * The codec for this text stream. The default is `"webvtt"`.
     * Supported text codecs:
     * - 'srt'
     * - 'ttml'
     * - 'cea608'
     * - 'cea708'
     * - 'webvtt'
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     */
    private $codec = '';
    /**
     * Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more
     * information, see
     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $language_code = '';
    /**
     * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom mapping = 3;</code>
     */
    private $mapping;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $codec
     *           The codec for this text stream. The default is `"webvtt"`.
     *           Supported text codecs:
     *           - 'srt'
     *           - 'ttml'
     *           - 'cea608'
     *           - 'cea708'
     *           - 'webvtt'
     *     @type string $language_code
     *           Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more
     *           information, see
     *           https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     *     @type \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom[]|\Google\Protobuf\Internal\RepeatedField $mapping
     *           The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The codec for this text stream. The default is `"webvtt"`.
     * Supported text codecs:
     * - 'srt'
     * - 'ttml'
     * - 'cea608'
     * - 'cea708'
     * - 'webvtt'
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     * @return string
     */
    public function getCodec()
    {
        return $this->codec;
    }

    /**
     * The codec for this text stream. The default is `"webvtt"`.
     * Supported text codecs:
     * - 'srt'
     * - 'ttml'
     * - 'cea608'
     * - 'cea708'
     * - 'webvtt'
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCodec($var)
    {
        GPBUtil::checkString($var, True);
        $this->codec = $var;

        return $this;
    }

    /**
     * Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more
     * information, see
     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more
     * information, see
     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

    /**
     * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom mapping = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMapping()
    {
        return $this->mapping;
    }

    /**
     * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.transcoder.v1beta1.TextStream.TextAtom mapping = 3;</code>
     * @param \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMapping($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1beta1\TextStream\TextAtom::class);
        $this->mapping = $arr;

        return $this;
    }

}

