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

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

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

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

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

        return $this;
    }

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

    public function hasIteration()
    {
        return isset($this->iteration);
    }

    public function clearIteration()
    {
        unset($this->iteration);
    }

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

        return $this;
    }

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

    public function hasCiphertext()
    {
        return isset($this->ciphertext);
    }

    public function clearCiphertext()
    {
        unset($this->ciphertext);
    }

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

        return $this;
    }

}

