<?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.LabelEditAction</code>
 */
class LabelEditAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string name = 1;</code>
     */
    protected $name = null;
    /**
     * Generated from protobuf field <code>optional int32 color = 2;</code>
     */
    protected $color = null;
    /**
     * Generated from protobuf field <code>optional int32 predefinedId = 3;</code>
     */
    protected $predefinedId = null;
    /**
     * Generated from protobuf field <code>optional bool deleted = 4;</code>
     */
    protected $deleted = null;
    /**
     * Generated from protobuf field <code>optional int32 orderIndex = 5;</code>
     */
    protected $orderIndex = null;
    /**
     * Generated from protobuf field <code>optional bool isActive = 6;</code>
     */
    protected $isActive = null;
    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.LabelEditAction.ListType type = 7;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional bool isImmutable = 8;</code>
     */
    protected $isImmutable = null;
    /**
     * Generated from protobuf field <code>optional int64 muteEndTimeMs = 9;</code>
     */
    protected $muteEndTimeMs = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $color
     *     @type int $predefinedId
     *     @type bool $deleted
     *     @type int $orderIndex
     *     @type bool $isActive
     *     @type int $type
     *     @type bool $isImmutable
     *     @type int|string $muteEndTimeMs
     * }
     */
    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 int32 color = 2;</code>
     * @return int
     */
    public function getColor()
    {
        return isset($this->color) ? $this->color : 0;
    }

    public function hasColor()
    {
        return isset($this->color);
    }

    public function clearColor()
    {
        unset($this->color);
    }

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

        return $this;
    }

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

    public function hasPredefinedId()
    {
        return isset($this->predefinedId);
    }

    public function clearPredefinedId()
    {
        unset($this->predefinedId);
    }

    /**
     * Generated from protobuf field <code>optional int32 predefinedId = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPredefinedId($var)
    {
        GPBUtil::checkInt32($var);
        $this->predefinedId = $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 int32 orderIndex = 5;</code>
     * @return int
     */
    public function getOrderIndex()
    {
        return isset($this->orderIndex) ? $this->orderIndex : 0;
    }

    public function hasOrderIndex()
    {
        return isset($this->orderIndex);
    }

    public function clearOrderIndex()
    {
        unset($this->orderIndex);
    }

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

        return $this;
    }

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

    public function hasIsActive()
    {
        return isset($this->isActive);
    }

    public function clearIsActive()
    {
        unset($this->isActive);
    }

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

        return $this;
    }

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

        return $this;
    }

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

    public function hasIsImmutable()
    {
        return isset($this->isImmutable);
    }

    public function clearIsImmutable()
    {
        unset($this->isImmutable);
    }

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

        return $this;
    }

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

    public function hasMuteEndTimeMs()
    {
        return isset($this->muteEndTimeMs);
    }

    public function clearMuteEndTimeMs()
    {
        unset($this->muteEndTimeMs);
    }

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

        return $this;
    }

}

