<?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.CertChain</code>
 */
class CertChain extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.CertChain.NoiseCertificate leaf = 1;</code>
     */
    protected $leaf = null;
    /**
     * Generated from protobuf field <code>optional .proto.CertChain.NoiseCertificate intermediate = 2;</code>
     */
    protected $intermediate = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.CertChain.NoiseCertificate leaf = 1;</code>
     * @return \PhpWA\Protocol\Proto\CertChain\NoiseCertificate|null
     */
    public function getLeaf()
    {
        return $this->leaf;
    }

    public function hasLeaf()
    {
        return isset($this->leaf);
    }

    public function clearLeaf()
    {
        unset($this->leaf);
    }

    /**
     * Generated from protobuf field <code>optional .proto.CertChain.NoiseCertificate leaf = 1;</code>
     * @param \PhpWA\Protocol\Proto\CertChain\NoiseCertificate $var
     * @return $this
     */
    public function setLeaf($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\CertChain\NoiseCertificate::class);
        $this->leaf = $var;

        return $this;
    }

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

    public function hasIntermediate()
    {
        return isset($this->intermediate);
    }

    public function clearIntermediate()
    {
        unset($this->intermediate);
    }

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

        return $this;
    }

}

