<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/identity_b2b/v1/keyapis_identity_b2b_authorization_v1.proto

namespace Keyapis\IdentityB2b\V1;

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

/**
 * Ошибки из ССО
 *
 * Generated from protobuf message <code>keyapis.identity_b2b.v1.SsoError</code>
 */
class SsoError extends \Google\Protobuf\Internal\Message
{
    protected $reason;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\IdentityB2b\V1\SsoError\UserIsTemporaryBlocked $user_is_temporary_blocked
     *           Пользователь временно заблокирован
     *     @type \Keyapis\IdentityB2b\V1\SsoError\UserNotFound $user_not_found
     *           Пользователь не найден
     *     @type \Keyapis\IdentityB2b\V1\SsoError\WrongCredentials $wrong_credentials
     *           Неверный пароль
     *     @type \Keyapis\IdentityB2b\V1\SsoError\UserIsBlocked $user_is_blocked
     *           Пользователь заблокирован
     *     @type \Keyapis\IdentityB2b\V1\SsoError\IntervalExceeded $interval_exceeded
     *           Превышен интервал отправки кода подтверждения
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\IdentityB2B\V1\KeyapisIdentityB2BAuthorizationV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Пользователь временно заблокирован
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserIsTemporaryBlocked user_is_temporary_blocked = 1;</code>
     * @return \Keyapis\IdentityB2b\V1\SsoError\UserIsTemporaryBlocked|null
     */
    public function getUserIsTemporaryBlocked()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Пользователь временно заблокирован
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserIsTemporaryBlocked user_is_temporary_blocked = 1;</code>
     * @param \Keyapis\IdentityB2b\V1\SsoError\UserIsTemporaryBlocked $var
     * @return $this
     */
    public function setUserIsTemporaryBlocked($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IdentityB2b\V1\SsoError\UserIsTemporaryBlocked::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Пользователь не найден
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserNotFound user_not_found = 2;</code>
     * @return \Keyapis\IdentityB2b\V1\SsoError\UserNotFound|null
     */
    public function getUserNotFound()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Пользователь не найден
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserNotFound user_not_found = 2;</code>
     * @param \Keyapis\IdentityB2b\V1\SsoError\UserNotFound $var
     * @return $this
     */
    public function setUserNotFound($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IdentityB2b\V1\SsoError\UserNotFound::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Неверный пароль
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.WrongCredentials wrong_credentials = 3;</code>
     * @return \Keyapis\IdentityB2b\V1\SsoError\WrongCredentials|null
     */
    public function getWrongCredentials()
    {
        return $this->readOneof(3);
    }

    public function hasWrongCredentials()
    {
        return $this->hasOneof(3);
    }

    /**
     * Неверный пароль
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.WrongCredentials wrong_credentials = 3;</code>
     * @param \Keyapis\IdentityB2b\V1\SsoError\WrongCredentials $var
     * @return $this
     */
    public function setWrongCredentials($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IdentityB2b\V1\SsoError\WrongCredentials::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Пользователь заблокирован
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserIsBlocked user_is_blocked = 4;</code>
     * @return \Keyapis\IdentityB2b\V1\SsoError\UserIsBlocked|null
     */
    public function getUserIsBlocked()
    {
        return $this->readOneof(4);
    }

    public function hasUserIsBlocked()
    {
        return $this->hasOneof(4);
    }

    /**
     * Пользователь заблокирован
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.UserIsBlocked user_is_blocked = 4;</code>
     * @param \Keyapis\IdentityB2b\V1\SsoError\UserIsBlocked $var
     * @return $this
     */
    public function setUserIsBlocked($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IdentityB2b\V1\SsoError\UserIsBlocked::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Превышен интервал отправки кода подтверждения
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.IntervalExceeded interval_exceeded = 5;</code>
     * @return \Keyapis\IdentityB2b\V1\SsoError\IntervalExceeded|null
     */
    public function getIntervalExceeded()
    {
        return $this->readOneof(5);
    }

    public function hasIntervalExceeded()
    {
        return $this->hasOneof(5);
    }

    /**
     * Превышен интервал отправки кода подтверждения
     *
     * Generated from protobuf field <code>.keyapis.identity_b2b.v1.SsoError.IntervalExceeded interval_exceeded = 5;</code>
     * @param \Keyapis\IdentityB2b\V1\SsoError\IntervalExceeded $var
     * @return $this
     */
    public function setIntervalExceeded($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IdentityB2b\V1\SsoError\IntervalExceeded::class);
        $this->writeOneof(5, $var);

        return $this;
    }

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

}

