<?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;

/**
 * Multiplexing settings for output stream.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1beta1.MuxStream</code>
 */
class MuxStream extends \Google\Protobuf\Internal\Message
{
    /**
     * A unique key for this multiplexed stream. HLS media manifests will be
     * named `MuxStream.key` with the `".m3u8"` extension suffix.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     */
    private $key = '';
    /**
     * The name of the generated file. The default is `MuxStream.key` with the
     * extension suffix corresponding to the `MuxStream.container`.
     * Individual segments also have an incremental 10-digit zero-padded suffix
     * starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
     *
     * Generated from protobuf field <code>string file_name = 2;</code>
     */
    private $file_name = '';
    /**
     * The container format. The default is `"mp4"`
     * Supported container formats:
     * - 'ts'
     * - 'fmp4'- the corresponding file extension is `".m4s"`
     * - 'mp4'
     * - 'vtt'
     *
     * Generated from protobuf field <code>string container = 3;</code>
     */
    private $container = '';
    /**
     * List of `ElementaryStream.key`s multiplexed in this stream.
     *
     * Generated from protobuf field <code>repeated string elementary_streams = 4;</code>
     */
    private $elementary_streams;
    /**
     * Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.SegmentSettings segment_settings = 5;</code>
     */
    private $segment_settings = null;
    /**
     * Encryption settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.Encryption encryption = 6;</code>
     */
    private $encryption = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *           A unique key for this multiplexed stream. HLS media manifests will be
     *           named `MuxStream.key` with the `".m3u8"` extension suffix.
     *     @type string $file_name
     *           The name of the generated file. The default is `MuxStream.key` with the
     *           extension suffix corresponding to the `MuxStream.container`.
     *           Individual segments also have an incremental 10-digit zero-padded suffix
     *           starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
     *     @type string $container
     *           The container format. The default is `"mp4"`
     *           Supported container formats:
     *           - 'ts'
     *           - 'fmp4'- the corresponding file extension is `".m4s"`
     *           - 'mp4'
     *           - 'vtt'
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $elementary_streams
     *           List of `ElementaryStream.key`s multiplexed in this stream.
     *     @type \Google\Cloud\Video\Transcoder\V1beta1\SegmentSettings $segment_settings
     *           Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
     *     @type \Google\Cloud\Video\Transcoder\V1beta1\Encryption $encryption
     *           Encryption settings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * A unique key for this multiplexed stream. HLS media manifests will be
     * named `MuxStream.key` with the `".m3u8"` extension suffix.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * A unique key for this multiplexed stream. HLS media manifests will be
     * named `MuxStream.key` with the `".m3u8"` extension suffix.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->key = $var;

        return $this;
    }

    /**
     * The name of the generated file. The default is `MuxStream.key` with the
     * extension suffix corresponding to the `MuxStream.container`.
     * Individual segments also have an incremental 10-digit zero-padded suffix
     * starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
     *
     * Generated from protobuf field <code>string file_name = 2;</code>
     * @return string
     */
    public function getFileName()
    {
        return $this->file_name;
    }

    /**
     * The name of the generated file. The default is `MuxStream.key` with the
     * extension suffix corresponding to the `MuxStream.container`.
     * Individual segments also have an incremental 10-digit zero-padded suffix
     * starting from 0 before the extension, such as `"mux_stream0000000123.ts"`.
     *
     * Generated from protobuf field <code>string file_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setFileName($var)
    {
        GPBUtil::checkString($var, True);
        $this->file_name = $var;

        return $this;
    }

    /**
     * The container format. The default is `"mp4"`
     * Supported container formats:
     * - 'ts'
     * - 'fmp4'- the corresponding file extension is `".m4s"`
     * - 'mp4'
     * - 'vtt'
     *
     * Generated from protobuf field <code>string container = 3;</code>
     * @return string
     */
    public function getContainer()
    {
        return $this->container;
    }

    /**
     * The container format. The default is `"mp4"`
     * Supported container formats:
     * - 'ts'
     * - 'fmp4'- the corresponding file extension is `".m4s"`
     * - 'mp4'
     * - 'vtt'
     *
     * Generated from protobuf field <code>string container = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setContainer($var)
    {
        GPBUtil::checkString($var, True);
        $this->container = $var;

        return $this;
    }

    /**
     * List of `ElementaryStream.key`s multiplexed in this stream.
     *
     * Generated from protobuf field <code>repeated string elementary_streams = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getElementaryStreams()
    {
        return $this->elementary_streams;
    }

    /**
     * List of `ElementaryStream.key`s multiplexed in this stream.
     *
     * Generated from protobuf field <code>repeated string elementary_streams = 4;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setElementaryStreams($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->elementary_streams = $arr;

        return $this;
    }

    /**
     * Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.SegmentSettings segment_settings = 5;</code>
     * @return \Google\Cloud\Video\Transcoder\V1beta1\SegmentSettings|null
     */
    public function getSegmentSettings()
    {
        return $this->segment_settings;
    }

    public function hasSegmentSettings()
    {
        return isset($this->segment_settings);
    }

    public function clearSegmentSettings()
    {
        unset($this->segment_settings);
    }

    /**
     * Segment settings for `"ts"`, `"fmp4"` and `"vtt"`.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.SegmentSettings segment_settings = 5;</code>
     * @param \Google\Cloud\Video\Transcoder\V1beta1\SegmentSettings $var
     * @return $this
     */
    public function setSegmentSettings($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1beta1\SegmentSettings::class);
        $this->segment_settings = $var;

        return $this;
    }

    /**
     * Encryption settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.Encryption encryption = 6;</code>
     * @return \Google\Cloud\Video\Transcoder\V1beta1\Encryption|null
     */
    public function getEncryption()
    {
        return $this->encryption;
    }

    public function hasEncryption()
    {
        return isset($this->encryption);
    }

    public function clearEncryption()
    {
        unset($this->encryption);
    }

    /**
     * Encryption settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1beta1.Encryption encryption = 6;</code>
     * @param \Google\Cloud\Video\Transcoder\V1beta1\Encryption $var
     * @return $this
     */
    public function setEncryption($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1beta1\Encryption::class);
        $this->encryption = $var;

        return $this;
    }

}

