payment.v1.Order */ class Order extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field string order_id = 1 [json_name = "orderId"]; */ protected $order_id = ''; /** * Generated from protobuf field string recipient_id = 2 [json_name = "recipientId"]; */ protected $recipient_id = ''; /** * Generated from protobuf field .google.type.Money amount = 3 [json_name = "amount"]; */ protected $amount = null; /** * Generated from protobuf field .payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"]; */ 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 string order_id = 1 [json_name = "orderId"]; * @return string */ public function getOrderId() { return $this->order_id; } /** * Generated from protobuf field string order_id = 1 [json_name = "orderId"]; * @param string $var * @return $this */ public function setOrderId($var) { GPBUtil::checkString($var, True); $this->order_id = $var; return $this; } /** * Generated from protobuf field string recipient_id = 2 [json_name = "recipientId"]; * @return string */ public function getRecipientId() { return $this->recipient_id; } /** * Generated from protobuf field string recipient_id = 2 [json_name = "recipientId"]; * @param string $var * @return $this */ public function setRecipientId($var) { GPBUtil::checkString($var, True); $this->recipient_id = $var; return $this; } /** * Generated from protobuf field .google.type.Money amount = 3 [json_name = "amount"]; * @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 .google.type.Money amount = 3 [json_name = "amount"]; * @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 .payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"]; * @return int */ public function getPaymentProvider() { return $this->payment_provider; } /** * Generated from protobuf field .payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"]; * @param int $var * @return $this */ public function setPaymentProvider($var) { GPBUtil::checkEnum($var, \Payment\V1\PaymentProvider::class); $this->payment_provider = $var; return $this; } }