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

namespace Google\Cloud\Video\Transcoder\V1;

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.v1.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 = '';
    /**
     * 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. Not
     * supported in MP4 files.
     *
     * Generated from protobuf field <code>string language_code = 2;</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.v1.TextStream.TextMapping mapping = 3;</code>
     */
    private $mapping;
    /**
     * The name for this particular text stream that
     * will be added to the HLS/DASH manifest. Not supported in MP4 files.
     *
     * Generated from protobuf field <code>string display_name = 4;</code>
     */
    private $display_name = '';

    /**
     * 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
     *           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. Not
     *           supported in MP4 files.
     *     @type array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $mapping
     *           The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
     *     @type string $display_name
     *           The name for this particular text stream that
     *           will be added to the HLS/DASH manifest. Not supported in MP4 files.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1\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;
    }

    /**
     * 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. Not
     * supported in MP4 files.
     *
     * Generated from protobuf field <code>string language_code = 2;</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * 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. Not
     * supported in MP4 files.
     *
     * Generated from protobuf field <code>string language_code = 2;</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.v1.TextStream.TextMapping 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.v1.TextStream.TextMapping mapping = 3;</code>
     * @param array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMapping($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping::class);
        $this->mapping = $arr;

        return $this;
    }

    /**
     * The name for this particular text stream that
     * will be added to the HLS/DASH manifest. Not supported in MP4 files.
     *
     * Generated from protobuf field <code>string display_name = 4;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The name for this particular text stream that
     * will be added to the HLS/DASH manifest. Not supported in MP4 files.
     *
     * Generated from protobuf field <code>string display_name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

}

