Rectangle.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 latitude-longitude rectangle, represented as two diagonally opposite
  10. * points "lo" and "hi".
  11. *
  12. * Generated from protobuf message <code>routeguide.Rectangle</code>
  13. */
  14. class Rectangle extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * One corner of the rectangle.
  18. *
  19. * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
  20. */
  21. protected $lo = null;
  22. /**
  23. * The other corner of the rectangle.
  24. *
  25. * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
  26. */
  27. protected $hi = null;
  28. /**
  29. * Constructor.
  30. *
  31. * @param array $data {
  32. * Optional. Data for populating the Message object.
  33. *
  34. * @type \Routeguide\Point $lo
  35. * One corner of the rectangle.
  36. * @type \Routeguide\Point $hi
  37. * The other corner of the rectangle.
  38. * }
  39. */
  40. public function __construct($data = NULL) {
  41. \GPBMetadata\RouteGuide::initOnce();
  42. parent::__construct($data);
  43. }
  44. /**
  45. * One corner of the rectangle.
  46. *
  47. * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
  48. * @return \Routeguide\Point|null
  49. */
  50. public function getLo()
  51. {
  52. return isset($this->lo) ? $this->lo : null;
  53. }
  54. public function hasLo()
  55. {
  56. return isset($this->lo);
  57. }
  58. public function clearLo()
  59. {
  60. unset($this->lo);
  61. }
  62. /**
  63. * One corner of the rectangle.
  64. *
  65. * Generated from protobuf field <code>.routeguide.Point lo = 1;</code>
  66. * @param \Routeguide\Point $var
  67. * @return $this
  68. */
  69. public function setLo($var)
  70. {
  71. GPBUtil::checkMessage($var, \Routeguide\Point::class);
  72. $this->lo = $var;
  73. return $this;
  74. }
  75. /**
  76. * The other corner of the rectangle.
  77. *
  78. * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
  79. * @return \Routeguide\Point|null
  80. */
  81. public function getHi()
  82. {
  83. return isset($this->hi) ? $this->hi : null;
  84. }
  85. public function hasHi()
  86. {
  87. return isset($this->hi);
  88. }
  89. public function clearHi()
  90. {
  91. unset($this->hi);
  92. }
  93. /**
  94. * The other corner of the rectangle.
  95. *
  96. * Generated from protobuf field <code>.routeguide.Point hi = 2;</code>
  97. * @param \Routeguide\Point $var
  98. * @return $this
  99. */
  100. public function setHi($var)
  101. {
  102. GPBUtil::checkMessage($var, \Routeguide\Point::class);
  103. $this->hi = $var;
  104. return $this;
  105. }
  106. }