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

namespace Google\Cloud\Video\Stitcher\V1;

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

/**
 * Describes what was stitched into a VOD session's manifest.
 *
 * Generated from protobuf message <code>google.cloud.video.stitcher.v1.Interstitials</code>
 */
class Interstitials extends \Google\Protobuf\Internal\Message
{
    /**
     * List of ad breaks ordered by time.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1;</code>
     */
    private $ad_breaks;
    /**
     * Information related to the content of the VOD session.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.VodSessionContent session_content = 2;</code>
     */
    private $session_content = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks
     *           List of ad breaks ordered by time.
     *     @type \Google\Cloud\Video\Stitcher\V1\VodSessionContent $session_content
     *           Information related to the content of the VOD session.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce();
        parent::__construct($data);
    }

    /**
     * List of ad breaks ordered by time.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdBreaks()
    {
        return $this->ad_breaks;
    }

    /**
     * List of ad breaks ordered by time.
     *
     * Generated from protobuf field <code>repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1;</code>
     * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdBreaks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak::class);
        $this->ad_breaks = $arr;

        return $this;
    }

    /**
     * Information related to the content of the VOD session.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.VodSessionContent session_content = 2;</code>
     * @return \Google\Cloud\Video\Stitcher\V1\VodSessionContent|null
     */
    public function getSessionContent()
    {
        return $this->session_content;
    }

    public function hasSessionContent()
    {
        return isset($this->session_content);
    }

    public function clearSessionContent()
    {
        unset($this->session_content);
    }

    /**
     * Information related to the content of the VOD session.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.VodSessionContent session_content = 2;</code>
     * @param \Google\Cloud\Video\Stitcher\V1\VodSessionContent $var
     * @return $this
     */
    public function setSessionContent($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSessionContent::class);
        $this->session_content = $var;

        return $this;
    }

}

