TestFailure.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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 TestFailure extends \Google\Collection
  19. {
  20. protected $collection_key = 'headers';
  21. /**
  22. * The actual output URL evaluated by a load balancer containing the scheme,
  23. * host, path and query parameters.
  24. *
  25. * @var string
  26. */
  27. public $actualOutputUrl;
  28. /**
  29. * Actual HTTP status code for rule with `urlRedirect` calculated by load
  30. * balancer
  31. *
  32. * @var int
  33. */
  34. public $actualRedirectResponseCode;
  35. /**
  36. * BackendService or BackendBucket returned by load balancer.
  37. *
  38. * @var string
  39. */
  40. public $actualService;
  41. /**
  42. * The expected output URL evaluated by a load balancer containing the scheme,
  43. * host, path and query parameters.
  44. *
  45. * @var string
  46. */
  47. public $expectedOutputUrl;
  48. /**
  49. * Expected HTTP status code for rule with `urlRedirect` calculated by load
  50. * balancer
  51. *
  52. * @var int
  53. */
  54. public $expectedRedirectResponseCode;
  55. /**
  56. * Expected BackendService or BackendBucket resource the given URL should be
  57. * mapped to.
  58. *
  59. * @var string
  60. */
  61. public $expectedService;
  62. protected $headersType = UrlMapTestHeader::class;
  63. protected $headersDataType = 'array';
  64. /**
  65. * Host portion of the URL.
  66. *
  67. * @var string
  68. */
  69. public $host;
  70. /**
  71. * Path portion including query parameters in the URL.
  72. *
  73. * @var string
  74. */
  75. public $path;
  76. /**
  77. * The actual output URL evaluated by a load balancer containing the scheme,
  78. * host, path and query parameters.
  79. *
  80. * @param string $actualOutputUrl
  81. */
  82. public function setActualOutputUrl($actualOutputUrl)
  83. {
  84. $this->actualOutputUrl = $actualOutputUrl;
  85. }
  86. /**
  87. * @return string
  88. */
  89. public function getActualOutputUrl()
  90. {
  91. return $this->actualOutputUrl;
  92. }
  93. /**
  94. * Actual HTTP status code for rule with `urlRedirect` calculated by load
  95. * balancer
  96. *
  97. * @param int $actualRedirectResponseCode
  98. */
  99. public function setActualRedirectResponseCode($actualRedirectResponseCode)
  100. {
  101. $this->actualRedirectResponseCode = $actualRedirectResponseCode;
  102. }
  103. /**
  104. * @return int
  105. */
  106. public function getActualRedirectResponseCode()
  107. {
  108. return $this->actualRedirectResponseCode;
  109. }
  110. /**
  111. * BackendService or BackendBucket returned by load balancer.
  112. *
  113. * @param string $actualService
  114. */
  115. public function setActualService($actualService)
  116. {
  117. $this->actualService = $actualService;
  118. }
  119. /**
  120. * @return string
  121. */
  122. public function getActualService()
  123. {
  124. return $this->actualService;
  125. }
  126. /**
  127. * The expected output URL evaluated by a load balancer containing the scheme,
  128. * host, path and query parameters.
  129. *
  130. * @param string $expectedOutputUrl
  131. */
  132. public function setExpectedOutputUrl($expectedOutputUrl)
  133. {
  134. $this->expectedOutputUrl = $expectedOutputUrl;
  135. }
  136. /**
  137. * @return string
  138. */
  139. public function getExpectedOutputUrl()
  140. {
  141. return $this->expectedOutputUrl;
  142. }
  143. /**
  144. * Expected HTTP status code for rule with `urlRedirect` calculated by load
  145. * balancer
  146. *
  147. * @param int $expectedRedirectResponseCode
  148. */
  149. public function setExpectedRedirectResponseCode($expectedRedirectResponseCode)
  150. {
  151. $this->expectedRedirectResponseCode = $expectedRedirectResponseCode;
  152. }
  153. /**
  154. * @return int
  155. */
  156. public function getExpectedRedirectResponseCode()
  157. {
  158. return $this->expectedRedirectResponseCode;
  159. }
  160. /**
  161. * Expected BackendService or BackendBucket resource the given URL should be
  162. * mapped to.
  163. *
  164. * @param string $expectedService
  165. */
  166. public function setExpectedService($expectedService)
  167. {
  168. $this->expectedService = $expectedService;
  169. }
  170. /**
  171. * @return string
  172. */
  173. public function getExpectedService()
  174. {
  175. return $this->expectedService;
  176. }
  177. /**
  178. * HTTP headers of the request.
  179. *
  180. * @param UrlMapTestHeader[] $headers
  181. */
  182. public function setHeaders($headers)
  183. {
  184. $this->headers = $headers;
  185. }
  186. /**
  187. * @return UrlMapTestHeader[]
  188. */
  189. public function getHeaders()
  190. {
  191. return $this->headers;
  192. }
  193. /**
  194. * Host portion of the URL.
  195. *
  196. * @param string $host
  197. */
  198. public function setHost($host)
  199. {
  200. $this->host = $host;
  201. }
  202. /**
  203. * @return string
  204. */
  205. public function getHost()
  206. {
  207. return $this->host;
  208. }
  209. /**
  210. * Path portion including query parameters in the URL.
  211. *
  212. * @param string $path
  213. */
  214. public function setPath($path)
  215. {
  216. $this->path = $path;
  217. }
  218. /**
  219. * @return string
  220. */
  221. public function getPath()
  222. {
  223. return $this->path;
  224. }
  225. }
  226. // Adding a class alias for backwards compatibility with the previous class name.
  227. class_alias(TestFailure::class, 'Google_Service_Compute_TestFailure');