RouteNote.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: route_guide.proto
  4. namespace Routeguide;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * A RouteNote is a message sent while at a given point.
  10. *
  11. * Generated from protobuf message <code>routeguide.RouteNote</code>
  12. */
  13. class RouteNote extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * The location from which the message is sent.
  17. *
  18. * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
  19. */
  20. protected $location = null;
  21. /**
  22. * The message to be sent.
  23. *
  24. * Generated from protobuf field <code>string message = 2;</code>
  25. */
  26. protected $message = '';
  27. /**
  28. * Constructor.
  29. *
  30. * @param array $data {
  31. * Optional. Data for populating the Message object.
  32. *
  33. * @type \Routeguide\Point $location
  34. * The location from which the message is sent.
  35. * @type string $message
  36. * The message to be sent.
  37. * }
  38. */
  39. public function __construct($data = NULL) {
  40. \GPBMetadata\RouteGuide::initOnce();
  41. parent::__construct($data);
  42. }
  43. /**
  44. * The location from which the message is sent.
  45. *
  46. * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
  47. * @return \Routeguide\Point|null
  48. */
  49. public function getLocation()
  50. {
  51. return isset($this->location) ? $this->location : null;
  52. }
  53. public function hasLocation()
  54. {
  55. return isset($this->location);
  56. }
  57. public function clearLocation()
  58. {
  59. unset($this->location);
  60. }
  61. /**
  62. * The location from which the message is sent.
  63. *
  64. * Generated from protobuf field <code>.routeguide.Point location = 1;</code>
  65. * @param \Routeguide\Point $var
  66. * @return $this
  67. */
  68. public function setLocation($var)
  69. {
  70. GPBUtil::checkMessage($var, \Routeguide\Point::class);
  71. $this->location = $var;
  72. return $this;
  73. }
  74. /**
  75. * The message to be sent.
  76. *
  77. * Generated from protobuf field <code>string message = 2;</code>
  78. * @return string
  79. */
  80. public function getMessage()
  81. {
  82. return $this->message;
  83. }
  84. /**
  85. * The message to be sent.
  86. *
  87. * Generated from protobuf field <code>string message = 2;</code>
  88. * @param string $var
  89. * @return $this
  90. */
  91. public function setMessage($var)
  92. {
  93. GPBUtil::checkString($var, True);
  94. $this->message = $var;
  95. return $this;
  96. }
  97. }