<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\VerifiedNameCertificate;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>proto.VerifiedNameCertificate.Details</code>
 */
class Details extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint64 serial = 1;</code>
     */
    protected $serial = null;
    /**
     * Generated from protobuf field <code>optional string issuer = 2;</code>
     */
    protected $issuer = null;
    /**
     * Generated from protobuf field <code>optional string verifiedName = 4;</code>
     */
    protected $verifiedName = null;
    /**
     * Generated from protobuf field <code>repeated .proto.LocalizedName localizedNames = 8;</code>
     */
    private $localizedNames;
    /**
     * Generated from protobuf field <code>optional uint64 issueTime = 10;</code>
     */
    protected $issueTime = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $serial
     *     @type string $issuer
     *     @type string $verifiedName
     *     @type \PhpWA\Protocol\Proto\LocalizedName[] $localizedNames
     *     @type int|string $issueTime
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional uint64 serial = 1;</code>
     * @return int|string
     */
    public function getSerial()
    {
        return isset($this->serial) ? $this->serial : 0;
    }

    public function hasSerial()
    {
        return isset($this->serial);
    }

    public function clearSerial()
    {
        unset($this->serial);
    }

    /**
     * Generated from protobuf field <code>optional uint64 serial = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSerial($var)
    {
        GPBUtil::checkUint64($var);
        $this->serial = $var;

        return $this;
    }

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

    public function hasIssuer()
    {
        return isset($this->issuer);
    }

    public function clearIssuer()
    {
        unset($this->issuer);
    }

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

        return $this;
    }

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

    public function hasVerifiedName()
    {
        return isset($this->verifiedName);
    }

    public function clearVerifiedName()
    {
        unset($this->verifiedName);
    }

    /**
     * Generated from protobuf field <code>optional string verifiedName = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setVerifiedName($var)
    {
        GPBUtil::checkString($var, True);
        $this->verifiedName = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.LocalizedName localizedNames = 8;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\LocalizedName>
     */
    public function getLocalizedNames()
    {
        return $this->localizedNames;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.LocalizedName localizedNames = 8;</code>
     * @param \PhpWA\Protocol\Proto\LocalizedName[] $var
     * @return $this
     */
    public function setLocalizedNames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\LocalizedName::class);
        $this->localizedNames = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint64 issueTime = 10;</code>
     * @return int|string
     */
    public function getIssueTime()
    {
        return isset($this->issueTime) ? $this->issueTime : 0;
    }

    public function hasIssueTime()
    {
        return isset($this->issueTime);
    }

    public function clearIssueTime()
    {
        unset($this->issueTime);
    }

    /**
     * Generated from protobuf field <code>optional uint64 issueTime = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIssueTime($var)
    {
        GPBUtil::checkUint64($var);
        $this->issueTime = $var;

        return $this;
    }

}

