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

namespace Registration\Core;

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

/**
 * Generated from protobuf message <code>registration.core.ActivateCodeComplete</code>
 */
class ActivateCodeComplete extends \Google\Protobuf\Internal\Message
{
    protected $status;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Registration\Core\ActivateCodeComplete\Error $error
     *     @type \Registration\Core\ActivateCodeComplete\Success $success
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Registration::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.registration.core.ActivateCodeComplete.Error error = 1;</code>
     * @return \Registration\Core\ActivateCodeComplete\Error|null
     */
    public function getError()
    {
        return $this->readOneof(1);
    }

    public function hasError()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.registration.core.ActivateCodeComplete.Error error = 1;</code>
     * @param \Registration\Core\ActivateCodeComplete\Error $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Registration\Core\ActivateCodeComplete\Error::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.registration.core.ActivateCodeComplete.Success success = 2;</code>
     * @return \Registration\Core\ActivateCodeComplete\Success|null
     */
    public function getSuccess()
    {
        return $this->readOneof(2);
    }

    public function hasSuccess()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.registration.core.ActivateCodeComplete.Success success = 2;</code>
     * @param \Registration\Core\ActivateCodeComplete\Success $var
     * @return $this
     */
    public function setSuccess($var)
    {
        GPBUtil::checkMessage($var, \Registration\Core\ActivateCodeComplete\Success::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getStatus()
    {
        return $this->whichOneof("status");
    }

}

