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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.SyncActionData</code>
 */
class SyncActionData extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes index = 1;</code>
     */
    protected $index = null;
    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue value = 2;</code>
     */
    protected $value = null;
    /**
     * Generated from protobuf field <code>optional bytes padding = 3;</code>
     */
    protected $padding = null;
    /**
     * Generated from protobuf field <code>optional int32 version = 4;</code>
     */
    protected $version = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $index
     *     @type \PhpWA\Protocol\Proto\SyncActionValue $value
     *     @type string $padding
     *     @type int $version
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasIndex()
    {
        return isset($this->index);
    }

    public function clearIndex()
    {
        unset($this->index);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue value = 2;</code>
     * @return \PhpWA\Protocol\Proto\SyncActionValue|null
     */
    public function getValue()
    {
        return $this->value;
    }

    public function hasValue()
    {
        return isset($this->value);
    }

    public function clearValue()
    {
        unset($this->value);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue value = 2;</code>
     * @param \PhpWA\Protocol\Proto\SyncActionValue $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SyncActionValue::class);
        $this->value = $var;

        return $this;
    }

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

    public function hasPadding()
    {
        return isset($this->padding);
    }

    public function clearPadding()
    {
        unset($this->padding);
    }

    /**
     * Generated from protobuf field <code>optional bytes padding = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPadding($var)
    {
        GPBUtil::checkString($var, False);
        $this->padding = $var;

        return $this;
    }

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

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

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

        return $this;
    }

}

