PacketIntervals.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Compute;
  18. class PacketIntervals extends \Google\Model
  19. {
  20. public const DURATION_DURATION_UNSPECIFIED = 'DURATION_UNSPECIFIED';
  21. public const DURATION_HOUR = 'HOUR';
  22. /**
  23. * From BfdSession object creation time.
  24. */
  25. public const DURATION_MAX = 'MAX';
  26. public const DURATION_MINUTE = 'MINUTE';
  27. /**
  28. * Only applies to Echo packets. This shows the intervals between sending and
  29. * receiving the same packet.
  30. */
  31. public const TYPE_LOOPBACK = 'LOOPBACK';
  32. /**
  33. * Intervals between received packets.
  34. */
  35. public const TYPE_RECEIVE = 'RECEIVE';
  36. /**
  37. * Intervals between transmitted packets.
  38. */
  39. public const TYPE_TRANSMIT = 'TRANSMIT';
  40. public const TYPE_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
  41. /**
  42. * Average observed inter-packet interval in milliseconds.
  43. *
  44. * @var string
  45. */
  46. public $avgMs;
  47. /**
  48. * From how long ago in the past these intervals were observed.
  49. *
  50. * @var string
  51. */
  52. public $duration;
  53. /**
  54. * Maximum observed inter-packet interval in milliseconds.
  55. *
  56. * @var string
  57. */
  58. public $maxMs;
  59. /**
  60. * Minimum observed inter-packet interval in milliseconds.
  61. *
  62. * @var string
  63. */
  64. public $minMs;
  65. /**
  66. * Number of inter-packet intervals from which these statistics were derived.
  67. *
  68. * @var string
  69. */
  70. public $numIntervals;
  71. /**
  72. * The type of packets for which inter-packet intervals were computed.
  73. *
  74. * @var string
  75. */
  76. public $type;
  77. /**
  78. * Average observed inter-packet interval in milliseconds.
  79. *
  80. * @param string $avgMs
  81. */
  82. public function setAvgMs($avgMs)
  83. {
  84. $this->avgMs = $avgMs;
  85. }
  86. /**
  87. * @return string
  88. */
  89. public function getAvgMs()
  90. {
  91. return $this->avgMs;
  92. }
  93. /**
  94. * From how long ago in the past these intervals were observed.
  95. *
  96. * Accepted values: DURATION_UNSPECIFIED, HOUR, MAX, MINUTE
  97. *
  98. * @param self::DURATION_* $duration
  99. */
  100. public function setDuration($duration)
  101. {
  102. $this->duration = $duration;
  103. }
  104. /**
  105. * @return self::DURATION_*
  106. */
  107. public function getDuration()
  108. {
  109. return $this->duration;
  110. }
  111. /**
  112. * Maximum observed inter-packet interval in milliseconds.
  113. *
  114. * @param string $maxMs
  115. */
  116. public function setMaxMs($maxMs)
  117. {
  118. $this->maxMs = $maxMs;
  119. }
  120. /**
  121. * @return string
  122. */
  123. public function getMaxMs()
  124. {
  125. return $this->maxMs;
  126. }
  127. /**
  128. * Minimum observed inter-packet interval in milliseconds.
  129. *
  130. * @param string $minMs
  131. */
  132. public function setMinMs($minMs)
  133. {
  134. $this->minMs = $minMs;
  135. }
  136. /**
  137. * @return string
  138. */
  139. public function getMinMs()
  140. {
  141. return $this->minMs;
  142. }
  143. /**
  144. * Number of inter-packet intervals from which these statistics were derived.
  145. *
  146. * @param string $numIntervals
  147. */
  148. public function setNumIntervals($numIntervals)
  149. {
  150. $this->numIntervals = $numIntervals;
  151. }
  152. /**
  153. * @return string
  154. */
  155. public function getNumIntervals()
  156. {
  157. return $this->numIntervals;
  158. }
  159. /**
  160. * The type of packets for which inter-packet intervals were computed.
  161. *
  162. * Accepted values: LOOPBACK, RECEIVE, TRANSMIT, TYPE_UNSPECIFIED
  163. *
  164. * @param self::TYPE_* $type
  165. */
  166. public function setType($type)
  167. {
  168. $this->type = $type;
  169. }
  170. /**
  171. * @return self::TYPE_*
  172. */
  173. public function getType()
  174. {
  175. return $this->type;
  176. }
  177. }
  178. // Adding a class alias for backwards compatibility with the previous class name.
  179. class_alias(PacketIntervals::class, 'Google_Service_Compute_PacketIntervals');