RouteSummary.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 RouteSummary is received in response to a RecordRoute rpc.
  10. * It contains the number of individual points received, the number of
  11. * detected features, and the total distance covered as the cumulative sum of
  12. * the distance between each point.
  13. *
  14. * Generated from protobuf message <code>routeguide.RouteSummary</code>
  15. */
  16. class RouteSummary extends \Google\Protobuf\Internal\Message
  17. {
  18. /**
  19. * The number of points received.
  20. *
  21. * Generated from protobuf field <code>int32 point_count = 1;</code>
  22. */
  23. protected $point_count = 0;
  24. /**
  25. * The number of known features passed while traversing the route.
  26. *
  27. * Generated from protobuf field <code>int32 feature_count = 2;</code>
  28. */
  29. protected $feature_count = 0;
  30. /**
  31. * The distance covered in metres.
  32. *
  33. * Generated from protobuf field <code>int32 distance = 3;</code>
  34. */
  35. protected $distance = 0;
  36. /**
  37. * The duration of the traversal in seconds.
  38. *
  39. * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
  40. */
  41. protected $elapsed_time = 0;
  42. /**
  43. * Constructor.
  44. *
  45. * @param array $data {
  46. * Optional. Data for populating the Message object.
  47. *
  48. * @type int $point_count
  49. * The number of points received.
  50. * @type int $feature_count
  51. * The number of known features passed while traversing the route.
  52. * @type int $distance
  53. * The distance covered in metres.
  54. * @type int $elapsed_time
  55. * The duration of the traversal in seconds.
  56. * }
  57. */
  58. public function __construct($data = NULL) {
  59. \GPBMetadata\RouteGuide::initOnce();
  60. parent::__construct($data);
  61. }
  62. /**
  63. * The number of points received.
  64. *
  65. * Generated from protobuf field <code>int32 point_count = 1;</code>
  66. * @return int
  67. */
  68. public function getPointCount()
  69. {
  70. return $this->point_count;
  71. }
  72. /**
  73. * The number of points received.
  74. *
  75. * Generated from protobuf field <code>int32 point_count = 1;</code>
  76. * @param int $var
  77. * @return $this
  78. */
  79. public function setPointCount($var)
  80. {
  81. GPBUtil::checkInt32($var);
  82. $this->point_count = $var;
  83. return $this;
  84. }
  85. /**
  86. * The number of known features passed while traversing the route.
  87. *
  88. * Generated from protobuf field <code>int32 feature_count = 2;</code>
  89. * @return int
  90. */
  91. public function getFeatureCount()
  92. {
  93. return $this->feature_count;
  94. }
  95. /**
  96. * The number of known features passed while traversing the route.
  97. *
  98. * Generated from protobuf field <code>int32 feature_count = 2;</code>
  99. * @param int $var
  100. * @return $this
  101. */
  102. public function setFeatureCount($var)
  103. {
  104. GPBUtil::checkInt32($var);
  105. $this->feature_count = $var;
  106. return $this;
  107. }
  108. /**
  109. * The distance covered in metres.
  110. *
  111. * Generated from protobuf field <code>int32 distance = 3;</code>
  112. * @return int
  113. */
  114. public function getDistance()
  115. {
  116. return $this->distance;
  117. }
  118. /**
  119. * The distance covered in metres.
  120. *
  121. * Generated from protobuf field <code>int32 distance = 3;</code>
  122. * @param int $var
  123. * @return $this
  124. */
  125. public function setDistance($var)
  126. {
  127. GPBUtil::checkInt32($var);
  128. $this->distance = $var;
  129. return $this;
  130. }
  131. /**
  132. * The duration of the traversal in seconds.
  133. *
  134. * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
  135. * @return int
  136. */
  137. public function getElapsedTime()
  138. {
  139. return $this->elapsed_time;
  140. }
  141. /**
  142. * The duration of the traversal in seconds.
  143. *
  144. * Generated from protobuf field <code>int32 elapsed_time = 4;</code>
  145. * @param int $var
  146. * @return $this
  147. */
  148. public function setElapsedTime($var)
  149. {
  150. GPBUtil::checkInt32($var);
  151. $this->elapsed_time = $var;
  152. return $this;
  153. }
  154. }