<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\Message\InteractiveMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.InteractiveMessage.CarouselMessage</code>
 */
class CarouselMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .proto.Message.InteractiveMessage cards = 1;</code>
     */
    private $cards;
    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 2;</code>
     */
    protected $messageVersion = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType carouselCardType = 3;</code>
     */
    protected $carouselCardType = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\Message\InteractiveMessage[] $cards
     *     @type int $messageVersion
     *     @type int $carouselCardType
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.InteractiveMessage cards = 1;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\InteractiveMessage>
     */
    public function getCards()
    {
        return $this->cards;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.InteractiveMessage cards = 1;</code>
     * @param \PhpWA\Protocol\Proto\Message\InteractiveMessage[] $var
     * @return $this
     */
    public function setCards($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Message\InteractiveMessage::class);
        $this->cards = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 2;</code>
     * @return int
     */
    public function getMessageVersion()
    {
        return isset($this->messageVersion) ? $this->messageVersion : 0;
    }

    public function hasMessageVersion()
    {
        return isset($this->messageVersion);
    }

    public function clearMessageVersion()
    {
        unset($this->messageVersion);
    }

    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageVersion($var)
    {
        GPBUtil::checkInt32($var);
        $this->messageVersion = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType carouselCardType = 3;</code>
     * @return int
     */
    public function getCarouselCardType()
    {
        return isset($this->carouselCardType) ? $this->carouselCardType : 0;
    }

    public function hasCarouselCardType()
    {
        return isset($this->carouselCardType);
    }

    public function clearCarouselCardType()
    {
        unset($this->carouselCardType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType carouselCardType = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setCarouselCardType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\InteractiveMessage\CarouselMessage\CarouselCardType::class);
        $this->carouselCardType = $var;

        return $this;
    }

}

