common_pack.ShopItem */ class ShopItem extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field string name = 1; */ protected $name = ''; /** * Generated from protobuf field string id = 2; */ protected $id = ''; /** * Generated from protobuf field int32 price = 3; */ protected $price = 0; /** * Generated from protobuf field int32 num = 4; */ protected $num = 0; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $name * @type string $id * @type int $price * @type int $num * } */ public function __construct($data = NULL) { \GPBMetadata\Common::initOnce(); parent::__construct($data); } /** * Generated from protobuf field string name = 1; * @return string */ public function getName() { return $this->name; } /** * Generated from protobuf field string name = 1; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } /** * Generated from protobuf field string id = 2; * @return string */ public function getId() { return $this->id; } /** * Generated from protobuf field string id = 2; * @param string $var * @return $this */ public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; return $this; } /** * Generated from protobuf field int32 price = 3; * @return int */ public function getPrice() { return $this->price; } /** * Generated from protobuf field int32 price = 3; * @param int $var * @return $this */ public function setPrice($var) { GPBUtil::checkInt32($var); $this->price = $var; return $this; } /** * Generated from protobuf field int32 num = 4; * @return int */ public function getNum() { return $this->num; } /** * Generated from protobuf field int32 num = 4; * @param int $var * @return $this */ public function setNum($var) { GPBUtil::checkInt32($var); $this->num = $var; return $this; } }