pet.v1.GetPetResponse */ class GetPetResponse extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field .pet.v1.Pet pet = 1 [json_name = "pet"]; */ protected $pet = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type \Pet\V1\Pet $pet * } */ public function __construct($data = NULL) { \Pet\V1\GPBMetadata\Pet::initOnce(); parent::__construct($data); } /** * Generated from protobuf field .pet.v1.Pet pet = 1 [json_name = "pet"]; * @return \Pet\V1\Pet|null */ public function getPet() { return $this->pet; } public function hasPet() { return isset($this->pet); } public function clearPet() { unset($this->pet); } /** * Generated from protobuf field .pet.v1.Pet pet = 1 [json_name = "pet"]; * @param \Pet\V1\Pet $var * @return $this */ public function setPet($var) { GPBUtil::checkMessage($var, \Pet\V1\Pet::class); $this->pet = $var; return $this; } }