<?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.AppStateSyncKey</code>
 */
class AppStateSyncKey extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.AppStateSyncKeyId keyId = 1;</code>
     */
    protected $keyId = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.AppStateSyncKeyData keyData = 2;</code>
     */
    protected $keyData = null;

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

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

        return $this;
    }

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

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

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

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

        return $this;
    }

}

