<?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.SyncdRecord</code>
 */
class SyncdRecord extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.SyncdIndex index = 1;</code>
     */
    protected $index = null;
    /**
     * Generated from protobuf field <code>optional .proto.SyncdValue value = 2;</code>
     */
    protected $value = null;
    /**
     * Generated from protobuf field <code>optional .proto.KeyId keyId = 3;</code>
     */
    protected $keyId = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.SyncdIndex index = 1;</code>
     * @return \PhpWA\Protocol\Proto\SyncdIndex|null
     */
    public function getIndex()
    {
        return $this->index;
    }

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

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

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

        return $this;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.KeyId keyId = 3;</code>
     * @return \PhpWA\Protocol\Proto\KeyId|null
     */
    public function getKeyId()
    {
        return $this->keyId;
    }

    public function hasKeyId()
    {
        return isset($this->keyId);
    }

    public function clearKeyId()
    {
        unset($this->keyId);
    }

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

        return $this;
    }

}

