Files
protobuf/gen/proto/php/Payment/V1/Order.php
2022-05-31 09:30:19 +02:00

152 lines
3.8 KiB
PHP

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: payment/v1/payment.proto
namespace Payment\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Order represents a monetary order.
*
* Generated from protobuf message <code>payment.v1.Order</code>
*/
class Order extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
*/
protected $order_id = '';
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
*/
protected $recipient_id = '';
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
*/
protected $amount = null;
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
*/
protected $payment_provider = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $order_id
* @type string $recipient_id
* @type \Google\Type\Money $amount
* @type int $payment_provider
* }
*/
public function __construct($data = NULL) {
\Payment\V1\GPBMetadata\Payment::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @return string
*/
public function getOrderId()
{
return $this->order_id;
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @param string $var
* @return $this
*/
public function setOrderId($var)
{
GPBUtil::checkString($var, True);
$this->order_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @return string
*/
public function getRecipientId()
{
return $this->recipient_id;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @param string $var
* @return $this
*/
public function setRecipientId($var)
{
GPBUtil::checkString($var, True);
$this->recipient_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @return \Google\Type\Money|null
*/
public function getAmount()
{
return $this->amount;
}
public function hasAmount()
{
return isset($this->amount);
}
public function clearAmount()
{
unset($this->amount);
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @param \Google\Type\Money $var
* @return $this
*/
public function setAmount($var)
{
GPBUtil::checkMessage($var, \Google\Type\Money::class);
$this->amount = $var;
return $this;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @return int
*/
public function getPaymentProvider()
{
return $this->payment_provider;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @param int $var
* @return $this
*/
public function setPaymentProvider($var)
{
GPBUtil::checkEnum($var, \Payment\V1\PaymentProvider::class);
$this->payment_provider = $var;
return $this;
}
}