Point.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. * Points are represented as latitude-longitude pairs in the E7 representation
  10. * (degrees multiplied by 10**7 and rounded to the nearest integer).
  11. * Latitudes should be in the range +/- 90 degrees and longitude should be in
  12. * the range +/- 180 degrees (inclusive).
  13. *
  14. * Generated from protobuf message <code>routeguide.Point</code>
  15. */
  16. class Point extends \Google\Protobuf\Internal\Message
  17. {
  18. /**
  19. * Generated from protobuf field <code>int32 latitude = 1;</code>
  20. */
  21. protected $latitude = 0;
  22. /**
  23. * Generated from protobuf field <code>int32 longitude = 2;</code>
  24. */
  25. protected $longitude = 0;
  26. /**
  27. * Constructor.
  28. *
  29. * @param array $data {
  30. * Optional. Data for populating the Message object.
  31. *
  32. * @type int $latitude
  33. * @type int $longitude
  34. * }
  35. */
  36. public function __construct($data = NULL) {
  37. \GPBMetadata\RouteGuide::initOnce();
  38. parent::__construct($data);
  39. }
  40. /**
  41. * Generated from protobuf field <code>int32 latitude = 1;</code>
  42. * @return int
  43. */
  44. public function getLatitude()
  45. {
  46. return $this->latitude;
  47. }
  48. /**
  49. * Generated from protobuf field <code>int32 latitude = 1;</code>
  50. * @param int $var
  51. * @return $this
  52. */
  53. public function setLatitude($var)
  54. {
  55. GPBUtil::checkInt32($var);
  56. $this->latitude = $var;
  57. return $this;
  58. }
  59. /**
  60. * Generated from protobuf field <code>int32 longitude = 2;</code>
  61. * @return int
  62. */
  63. public function getLongitude()
  64. {
  65. return $this->longitude;
  66. }
  67. /**
  68. * Generated from protobuf field <code>int32 longitude = 2;</code>
  69. * @param int $var
  70. * @return $this
  71. */
  72. public function setLongitude($var)
  73. {
  74. GPBUtil::checkInt32($var);
  75. $this->longitude = $var;
  76. return $this;
  77. }
  78. }