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

namespace Google\Cloud\Video\LiveStream\V1;

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

/**
 * Properties of the input stream.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.InputStreamProperty</code>
 */
class InputStreamProperty extends \Google\Protobuf\Internal\Message
{
    /**
     * The time that the current input stream is accepted and the connection is
     * established.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    private $last_establish_time = null;
    /**
     * Properties of the video streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
     */
    private $video_streams;
    /**
     * Properties of the audio streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
     */
    private $audio_streams;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $last_establish_time
     *           The time that the current input stream is accepted and the connection is
     *           established.
     *     @type array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $video_streams
     *           Properties of the video streams.
     *     @type array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $audio_streams
     *           Properties of the audio streams.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The time that the current input stream is accepted and the connection is
     * established.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastEstablishTime()
    {
        return $this->last_establish_time;
    }

    public function hasLastEstablishTime()
    {
        return isset($this->last_establish_time);
    }

    public function clearLastEstablishTime()
    {
        unset($this->last_establish_time);
    }

    /**
     * The time that the current input stream is accepted and the connection is
     * established.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastEstablishTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_establish_time = $var;

        return $this;
    }

    /**
     * Properties of the video streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVideoStreams()
    {
        return $this->video_streams;
    }

    /**
     * Properties of the video streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
     * @param array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setVideoStreams($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\VideoStreamProperty::class);
        $this->video_streams = $arr;

        return $this;
    }

    /**
     * Properties of the audio streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAudioStreams()
    {
        return $this->audio_streams;
    }

    /**
     * Properties of the audio streams.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
     * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAudioStreams($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStreamProperty::class);
        $this->audio_streams = $arr;

        return $this;
    }

}

