<?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.NoteEditAction</code>
 */
class NoteEditAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.NoteEditAction.NoteType type = 1;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional string chatJid = 2;</code>
     */
    protected $chatJid = null;
    /**
     * Generated from protobuf field <code>optional int64 createdAt = 3;</code>
     */
    protected $createdAt = null;
    /**
     * Generated from protobuf field <code>optional bool deleted = 4;</code>
     */
    protected $deleted = null;
    /**
     * Generated from protobuf field <code>optional string unstructuredContent = 5;</code>
     */
    protected $unstructuredContent = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.NoteEditAction.NoteType type = 1;</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.NoteEditAction.NoteType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\SyncActionValue\NoteEditAction\NoteType::class);
        $this->type = $var;

        return $this;
    }

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

    public function hasChatJid()
    {
        return isset($this->chatJid);
    }

    public function clearChatJid()
    {
        unset($this->chatJid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 createdAt = 3;</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 = 3;</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 bool deleted = 4;</code>
     * @return bool
     */
    public function getDeleted()
    {
        return isset($this->deleted) ? $this->deleted : false;
    }

    public function hasDeleted()
    {
        return isset($this->deleted);
    }

    public function clearDeleted()
    {
        unset($this->deleted);
    }

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

        return $this;
    }

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

    public function hasUnstructuredContent()
    {
        return isset($this->unstructuredContent);
    }

    public function clearUnstructuredContent()
    {
        unset($this->unstructuredContent);
    }

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

        return $this;
    }

}

