pet.v1.PurchasePetRequest
*/
class PurchasePetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field string pet_id = 1 [json_name = "petId"];
*/
protected $pet_id = '';
/**
* Generated from protobuf field .payment.v1.Order order = 2 [json_name = "order"];
*/
protected $order = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* @type \Payment\V1\Order $order
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field string pet_id = 1 [json_name = "petId"];
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field string pet_id = 1 [json_name = "petId"];
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
/**
* Generated from protobuf field .payment.v1.Order order = 2 [json_name = "order"];
* @return \Payment\V1\Order|null
*/
public function getOrder()
{
return $this->order;
}
public function hasOrder()
{
return isset($this->order);
}
public function clearOrder()
{
unset($this->order);
}
/**
* Generated from protobuf field .payment.v1.Order order = 2 [json_name = "order"];
* @param \Payment\V1\Order $var
* @return $this
*/
public function setOrder($var)
{
GPBUtil::checkMessage($var, \Payment\V1\Order::class);
$this->order = $var;
return $this;
}
}