<?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.DeletePayMethodRequest</code>
 */
class DeletePayMethodRequest 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 = '';
    /**
     * Идентификатор пользователя.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value user_id = 2;</code>
     */
    protected $user_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pay_method_id
     *           Идентификатор способа оплаты
     *     @type \Google\Protobuf\Int32Value $user_id
     *           Идентификатор пользователя.
     *           # Диапазон: 0..2147483647
     * }
     */
    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;
    }

    /**
     * Идентификатор пользователя.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value user_id = 2;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    public function hasUserId()
    {
        return isset($this->user_id);
    }

    public function clearUserId()
    {
        unset($this->user_id);
    }

    /**
     * Returns the unboxed value from <code>getUserId()</code>

     * Идентификатор пользователя.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value user_id = 2;</code>
     * @return int|null
     */
    public function getUserIdUnwrapped()
    {
        return $this->readWrapperValue("user_id");
    }

    /**
     * Идентификатор пользователя.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value user_id = 2;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->user_id = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

     * Идентификатор пользователя.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value user_id = 2;</code>
     * @param int|null $var
     * @return $this
     */
    public function setUserIdUnwrapped($var)
    {
        $this->writeWrapperValue("user_id", $var);
        return $this;}

}

