pet.v1.PutPetRequest */ class PutPetRequest extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field .pet.v1.PetType pet_type = 1 [json_name = "petType"]; */ protected $pet_type = 0; /** * Generated from protobuf field string name = 2 [json_name = "name"]; */ protected $name = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $pet_type * @type string $name * } */ public function __construct($data = NULL) { \Pet\V1\GPBMetadata\Pet::initOnce(); parent::__construct($data); } /** * Generated from protobuf field .pet.v1.PetType pet_type = 1 [json_name = "petType"]; * @return int */ public function getPetType() { return $this->pet_type; } /** * Generated from protobuf field .pet.v1.PetType pet_type = 1 [json_name = "petType"]; * @param int $var * @return $this */ public function setPetType($var) { GPBUtil::checkEnum($var, \Pet\V1\PetType::class); $this->pet_type = $var; return $this; } /** * Generated from protobuf field string name = 2 [json_name = "name"]; * @return string */ public function getName() { return $this->name; } /** * Generated from protobuf field string name = 2 [json_name = "name"]; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } }