<?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.DeviceConsistencyCodeMessage</code>
 */
class DeviceConsistencyCodeMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 generation = 1;</code>
     */
    protected $generation = null;
    /**
     * Generated from protobuf field <code>optional bytes signature = 2;</code>
     */
    protected $signature = null;

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

    /**
     * Generated from protobuf field <code>optional uint32 generation = 1;</code>
     * @return int
     */
    public function getGeneration()
    {
        return isset($this->generation) ? $this->generation : 0;
    }

    public function hasGeneration()
    {
        return isset($this->generation);
    }

    public function clearGeneration()
    {
        unset($this->generation);
    }

    /**
     * Generated from protobuf field <code>optional uint32 generation = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setGeneration($var)
    {
        GPBUtil::checkUint32($var);
        $this->generation = $var;

        return $this;
    }

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

    public function hasSignature()
    {
        return isset($this->signature);
    }

    public function clearSignature()
    {
        unset($this->signature);
    }

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

        return $this;
    }

}

