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

namespace PhpWA\Protocol\Proto\SyncActionValue;

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

/**
 * Generated from protobuf message <code>proto.SyncActionValue.MarketingMessageAction</code>
 */
class MarketingMessageAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string name = 1;</code>
     */
    protected $name = null;
    /**
     * Generated from protobuf field <code>optional string message = 2;</code>
     */
    protected $message = null;
    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType type = 3;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional int64 createdAt = 4;</code>
     */
    protected $createdAt = null;
    /**
     * Generated from protobuf field <code>optional int64 lastSentAt = 5;</code>
     */
    protected $lastSentAt = null;
    /**
     * Generated from protobuf field <code>optional bool isDeleted = 6;</code>
     */
    protected $isDeleted = null;
    /**
     * Generated from protobuf field <code>optional string mediaId = 7;</code>
     */
    protected $mediaId = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type string $message
     *     @type int $type
     *     @type int|string $createdAt
     *     @type int|string $lastSentAt
     *     @type bool $isDeleted
     *     @type string $mediaId
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * Generated from protobuf field <code>optional string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string message = 2;</code>
     * @return string
     */
    public function getMessage()
    {
        return isset($this->message) ? $this->message : '';
    }

    public function hasMessage()
    {
        return isset($this->message);
    }

    public function clearMessage()
    {
        unset($this->message);
    }

    /**
     * Generated from protobuf field <code>optional string message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType type = 3;</code>
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\SyncActionValue\MarketingMessageAction\MarketingMessagePrototypeType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 createdAt = 4;</code>
     * @return int|string
     */
    public function getCreatedAt()
    {
        return isset($this->createdAt) ? $this->createdAt : 0;
    }

    public function hasCreatedAt()
    {
        return isset($this->createdAt);
    }

    public function clearCreatedAt()
    {
        unset($this->createdAt);
    }

    /**
     * Generated from protobuf field <code>optional int64 createdAt = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->createdAt = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 lastSentAt = 5;</code>
     * @return int|string
     */
    public function getLastSentAt()
    {
        return isset($this->lastSentAt) ? $this->lastSentAt : 0;
    }

    public function hasLastSentAt()
    {
        return isset($this->lastSentAt);
    }

    public function clearLastSentAt()
    {
        unset($this->lastSentAt);
    }

    /**
     * Generated from protobuf field <code>optional int64 lastSentAt = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLastSentAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->lastSentAt = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isDeleted = 6;</code>
     * @return bool
     */
    public function getIsDeleted()
    {
        return isset($this->isDeleted) ? $this->isDeleted : false;
    }

    public function hasIsDeleted()
    {
        return isset($this->isDeleted);
    }

    public function clearIsDeleted()
    {
        unset($this->isDeleted);
    }

    /**
     * Generated from protobuf field <code>optional bool isDeleted = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDeleted($var)
    {
        GPBUtil::checkBool($var);
        $this->isDeleted = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string mediaId = 7;</code>
     * @return string
     */
    public function getMediaId()
    {
        return isset($this->mediaId) ? $this->mediaId : '';
    }

    public function hasMediaId()
    {
        return isset($this->mediaId);
    }

    public function clearMediaId()
    {
        unset($this->mediaId);
    }

    /**
     * Generated from protobuf field <code>optional string mediaId = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setMediaId($var)
    {
        GPBUtil::checkString($var, True);
        $this->mediaId = $var;

        return $this;
    }

}

