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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.AppStateSyncKeyData</code>
 */
class AppStateSyncKeyData extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes keyData = 1;</code>
     */
    protected $keyData = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.AppStateSyncKeyFingerprint fingerprint = 2;</code>
     */
    protected $fingerprint = null;
    /**
     * Generated from protobuf field <code>optional int64 timestamp = 3;</code>
     */
    protected $timestamp = null;

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

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

    public function hasKeyData()
    {
        return isset($this->keyData);
    }

    public function clearKeyData()
    {
        unset($this->keyData);
    }

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

        return $this;
    }

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

    public function hasFingerprint()
    {
        return isset($this->fingerprint);
    }

    public function clearFingerprint()
    {
        unset($this->fingerprint);
    }

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

        return $this;
    }

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

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

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

        return $this;
    }

}

