<?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.BotSignatureVerificationUseCaseProof</code>
 */
class BotSignatureVerificationUseCaseProof extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional int32 version = 1;</code>
     */
    protected $version = null;
    /**
     * Generated from protobuf field <code>optional .proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase useCase = 2;</code>
     */
    protected $useCase = null;
    /**
     * Generated from protobuf field <code>optional bytes signature = 3;</code>
     */
    protected $signature = null;
    /**
     * Generated from protobuf field <code>repeated bytes certificateChain = 4;</code>
     */
    private $certificateChain;

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

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

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    /**
     * Generated from protobuf field <code>optional int32 version = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkInt32($var);
        $this->version = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase useCase = 2;</code>
     * @return int
     */
    public function getUseCase()
    {
        return isset($this->useCase) ? $this->useCase : 0;
    }

    public function hasUseCase()
    {
        return isset($this->useCase);
    }

    public function clearUseCase()
    {
        unset($this->useCase);
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase useCase = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setUseCase($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\BotSignatureVerificationUseCaseProof\BotSignatureUseCase::class);
        $this->useCase = $var;

        return $this;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated bytes certificateChain = 4;</code>
     * @return RepeatedField<string>
     */
    public function getCertificateChain()
    {
        return $this->certificateChain;
    }

    /**
     * Generated from protobuf field <code>repeated bytes certificateChain = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setCertificateChain($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES);
        $this->certificateChain = $arr;

        return $this;
    }

}

