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

namespace Keyapis\Invoice\V1;

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

/**
 * Способ оплаты
 *
 * Generated from protobuf message <code>keyapis.invoice.v1.PayMethod</code>
 */
class PayMethod extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $pay_method_id = '';
    /**
     * Идентификатор пользователя
     *
     * Generated from protobuf field <code>int32 user_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $user_id = 0;
    /**
     * Тип способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * Признак активной записи
     *
     * Generated from protobuf field <code>bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $is_active = false;
    /**
     * Способ оплаты по умолчанию
     *
     * Generated from protobuf field <code>bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $is_default = false;
    /**
     * Мобильный телефон, на который будут отправляться уведомления
     *
     * Generated from protobuf field <code>string pay_method_contact = 6;</code>
     */
    protected $pay_method_contact = '';
    /**
     * Описание способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_description = 7;</code>
     */
    protected $pay_method_description = '';
    /**
     * Псевдоним способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_alias = 8;</code>
     */
    protected $pay_method_alias = '';
    /**
     * Тип банковской карты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $card_type = 0;
    /**
     * Маскированный номер карты или идентификатора привязки счета СБП
     *
     * Generated from protobuf field <code>string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $masked_num = '';
    /**
     * Наименование банка
     *
     * Generated from protobuf field <code>string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $bank_name = '';
    /**
     * Признак авторизации БК
     *
     * Generated from protobuf field <code>bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $is_auth = false;
    /**
     * Статус способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status_type = 0;
    /**
     * Дата регистрации способа оплаты.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $register_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pay_method_id
     *           Идентификатор способа оплаты
     *     @type int $user_id
     *           Идентификатор пользователя
     *     @type int $type
     *           Тип способа оплаты
     *     @type bool $is_active
     *           Признак активной записи
     *     @type bool $is_default
     *           Способ оплаты по умолчанию
     *     @type string $pay_method_contact
     *           Мобильный телефон, на который будут отправляться уведомления
     *     @type string $pay_method_description
     *           Описание способа оплаты
     *     @type string $pay_method_alias
     *           Псевдоним способа оплаты
     *     @type int $card_type
     *           Тип банковской карты
     *     @type string $masked_num
     *           Маскированный номер карты или идентификатора привязки счета СБП
     *     @type string $bank_name
     *           Наименование банка
     *     @type bool $is_auth
     *           Признак авторизации БК
     *     @type int $status_type
     *           Статус способа оплаты
     *     @type \Google\Protobuf\Timestamp $register_at
     *           Дата регистрации способа оплаты.
     *           # Тип: DateTime
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Invoice\V1\KeyapisInvoicePaymethodV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPayMethodId()
    {
        return $this->pay_method_id;
    }

    /**
     * Идентификатор способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPayMethodId($var)
    {
        GPBUtil::checkString($var, True);
        $this->pay_method_id = $var;

        return $this;
    }

    /**
     * Идентификатор пользователя
     *
     * Generated from protobuf field <code>int32 user_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * Идентификатор пользователя
     *
     * Generated from protobuf field <code>int32 user_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkInt32($var);
        $this->user_id = $var;

        return $this;
    }

    /**
     * Тип способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Invoice\V1\PayMethod\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Признак активной записи
     *
     * Generated from protobuf field <code>bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getIsActive()
    {
        return $this->is_active;
    }

    /**
     * Признак активной записи
     *
     * Generated from protobuf field <code>bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsActive($var)
    {
        GPBUtil::checkBool($var);
        $this->is_active = $var;

        return $this;
    }

    /**
     * Способ оплаты по умолчанию
     *
     * Generated from protobuf field <code>bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getIsDefault()
    {
        return $this->is_default;
    }

    /**
     * Способ оплаты по умолчанию
     *
     * Generated from protobuf field <code>bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDefault($var)
    {
        GPBUtil::checkBool($var);
        $this->is_default = $var;

        return $this;
    }

    /**
     * Мобильный телефон, на который будут отправляться уведомления
     *
     * Generated from protobuf field <code>string pay_method_contact = 6;</code>
     * @return string
     */
    public function getPayMethodContact()
    {
        return $this->pay_method_contact;
    }

    /**
     * Мобильный телефон, на который будут отправляться уведомления
     *
     * Generated from protobuf field <code>string pay_method_contact = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setPayMethodContact($var)
    {
        GPBUtil::checkString($var, True);
        $this->pay_method_contact = $var;

        return $this;
    }

    /**
     * Описание способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_description = 7;</code>
     * @return string
     */
    public function getPayMethodDescription()
    {
        return $this->pay_method_description;
    }

    /**
     * Описание способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_description = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setPayMethodDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->pay_method_description = $var;

        return $this;
    }

    /**
     * Псевдоним способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_alias = 8;</code>
     * @return string
     */
    public function getPayMethodAlias()
    {
        return $this->pay_method_alias;
    }

    /**
     * Псевдоним способа оплаты
     *
     * Generated from protobuf field <code>string pay_method_alias = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setPayMethodAlias($var)
    {
        GPBUtil::checkString($var, True);
        $this->pay_method_alias = $var;

        return $this;
    }

    /**
     * Тип банковской карты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCardType()
    {
        return $this->card_type;
    }

    /**
     * Тип банковской карты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCardType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Invoice\V1\PayMethod\CardType::class);
        $this->card_type = $var;

        return $this;
    }

    /**
     * Маскированный номер карты или идентификатора привязки счета СБП
     *
     * Generated from protobuf field <code>string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getMaskedNum()
    {
        return $this->masked_num;
    }

    /**
     * Маскированный номер карты или идентификатора привязки счета СБП
     *
     * Generated from protobuf field <code>string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setMaskedNum($var)
    {
        GPBUtil::checkString($var, True);
        $this->masked_num = $var;

        return $this;
    }

    /**
     * Наименование банка
     *
     * Generated from protobuf field <code>string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBankName()
    {
        return $this->bank_name;
    }

    /**
     * Наименование банка
     *
     * Generated from protobuf field <code>string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBankName($var)
    {
        GPBUtil::checkString($var, True);
        $this->bank_name = $var;

        return $this;
    }

    /**
     * Признак авторизации БК
     *
     * Generated from protobuf field <code>bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getIsAuth()
    {
        return $this->is_auth;
    }

    /**
     * Признак авторизации БК
     *
     * Generated from protobuf field <code>bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsAuth($var)
    {
        GPBUtil::checkBool($var);
        $this->is_auth = $var;

        return $this;
    }

    /**
     * Статус способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус способа оплаты
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Invoice\V1\PayMethod\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Дата регистрации способа оплаты.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getRegisterAt()
    {
        return $this->register_at;
    }

    public function hasRegisterAt()
    {
        return isset($this->register_at);
    }

    public function clearRegisterAt()
    {
        unset($this->register_at);
    }

    /**
     * Дата регистрации способа оплаты.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setRegisterAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->register_at = $var;

        return $this;
    }

}

