HealthAggregationPolicy.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  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 HealthAggregationPolicy extends \Google\Model
  19. {
  20. public const POLICY_TYPE_BACKEND_SERVICE_POLICY = 'BACKEND_SERVICE_POLICY';
  21. public const POLICY_TYPE_DNS_PUBLIC_IP_POLICY = 'DNS_PUBLIC_IP_POLICY';
  22. /**
  23. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  24. *
  25. * @var string
  26. */
  27. public $creationTimestamp;
  28. /**
  29. * An optional description of this resource. Provide this property when you
  30. * create the resource.
  31. *
  32. * @var string
  33. */
  34. public $description;
  35. /**
  36. * Fingerprint of this resource. A hash of the contents stored in this object.
  37. * This field is used in optimistic locking. This field will be ignored when
  38. * inserting a HealthAggregationPolicy. An up-to-date fingerprint must be
  39. * provided in order to patch the HealthAggregationPolicy; Otherwise, the
  40. * request will fail with error 412 conditionNotMet. To see the latest
  41. * fingerprint, make a get() request to retrieve the HealthAggregationPolicy.
  42. *
  43. * @var string
  44. */
  45. public $fingerprint;
  46. /**
  47. * Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies
  48. * the threshold (as a percentage) of healthy endpoints required in order to
  49. * consider the aggregated health result HEALTHY. Defaults to 60. Must be in
  50. * range [0, 100]. Not applicable if the policyType field
  51. * isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, and will be
  52. * set to the default if unspecified. Note that both this threshold and
  53. * minHealthyThreshold must be satisfied in order for HEALTHY to be the
  54. * aggregated result. "Endpoints" refers to network endpoints within a Network
  55. * Endpoint Group or instances within an Instance Group.
  56. *
  57. * @var string
  58. */
  59. public $healthyPercentThreshold;
  60. /**
  61. * Output only. [Output Only] The unique identifier for the resource. This
  62. * identifier is defined by the server.
  63. *
  64. * @var string
  65. */
  66. public $id;
  67. /**
  68. * Output only. [Output Only] Type of the resource.
  69. * Alwayscompute#healthAggregationPolicy for health aggregation policies.
  70. *
  71. * @var string
  72. */
  73. public $kind;
  74. /**
  75. * Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies
  76. * the minimum number of healthy endpoints required in order to consider the
  77. * aggregated health result HEALTHY. Defaults to 1. Must be positive. Not
  78. * applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated.
  79. * This field is optional, and will be set to the default if unspecified. Note
  80. * that both this threshold and healthyPercentThreshold must be satisfied in
  81. * order for HEALTHY to be the aggregated result. "Endpoints" refers to
  82. * network endpoints within a Network Endpoint Group or instances within an
  83. * Instance Group.
  84. *
  85. * @var string
  86. */
  87. public $minHealthyThreshold;
  88. /**
  89. * Name of the resource. Provided by the client when the resource is created.
  90. * The name must be 1-63 characters long, and comply withRFC1035.
  91. * Specifically, the name must be 1-63 characters long and match the regular
  92. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  93. * must be a lowercase letter, and all following characters must be a dash,
  94. * lowercase letter, or digit, except the last character, which cannot be a
  95. * dash.
  96. *
  97. * @var string
  98. */
  99. public $name;
  100. /**
  101. * Specifies the type of the healthAggregationPolicy. The only allowed value
  102. * for global resources is DNS_PUBLIC_IP_POLICY. The only allowed value for
  103. * regional resources is BACKEND_SERVICE_POLICY. Must be specified when the
  104. * healthAggregationPolicy is created, and cannot be mutated.
  105. *
  106. * @var string
  107. */
  108. public $policyType;
  109. /**
  110. * Output only. [Output Only] URL of the region where the health aggregation
  111. * policy resides. This field applies only to the regional resource. You must
  112. * specify this field as part of the HTTP request URL. It is not settable as a
  113. * field in the request body.
  114. *
  115. * @var string
  116. */
  117. public $region;
  118. /**
  119. * Output only. [Output Only] Server-defined URL for the resource.
  120. *
  121. * @var string
  122. */
  123. public $selfLink;
  124. /**
  125. * Output only. [Output Only] Server-defined URL with id for the resource.
  126. *
  127. * @var string
  128. */
  129. public $selfLinkWithId;
  130. /**
  131. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  132. *
  133. * @param string $creationTimestamp
  134. */
  135. public function setCreationTimestamp($creationTimestamp)
  136. {
  137. $this->creationTimestamp = $creationTimestamp;
  138. }
  139. /**
  140. * @return string
  141. */
  142. public function getCreationTimestamp()
  143. {
  144. return $this->creationTimestamp;
  145. }
  146. /**
  147. * An optional description of this resource. Provide this property when you
  148. * create the resource.
  149. *
  150. * @param string $description
  151. */
  152. public function setDescription($description)
  153. {
  154. $this->description = $description;
  155. }
  156. /**
  157. * @return string
  158. */
  159. public function getDescription()
  160. {
  161. return $this->description;
  162. }
  163. /**
  164. * Fingerprint of this resource. A hash of the contents stored in this object.
  165. * This field is used in optimistic locking. This field will be ignored when
  166. * inserting a HealthAggregationPolicy. An up-to-date fingerprint must be
  167. * provided in order to patch the HealthAggregationPolicy; Otherwise, the
  168. * request will fail with error 412 conditionNotMet. To see the latest
  169. * fingerprint, make a get() request to retrieve the HealthAggregationPolicy.
  170. *
  171. * @param string $fingerprint
  172. */
  173. public function setFingerprint($fingerprint)
  174. {
  175. $this->fingerprint = $fingerprint;
  176. }
  177. /**
  178. * @return string
  179. */
  180. public function getFingerprint()
  181. {
  182. return $this->fingerprint;
  183. }
  184. /**
  185. * Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies
  186. * the threshold (as a percentage) of healthy endpoints required in order to
  187. * consider the aggregated health result HEALTHY. Defaults to 60. Must be in
  188. * range [0, 100]. Not applicable if the policyType field
  189. * isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, and will be
  190. * set to the default if unspecified. Note that both this threshold and
  191. * minHealthyThreshold must be satisfied in order for HEALTHY to be the
  192. * aggregated result. "Endpoints" refers to network endpoints within a Network
  193. * Endpoint Group or instances within an Instance Group.
  194. *
  195. * @param string $healthyPercentThreshold
  196. */
  197. public function setHealthyPercentThreshold($healthyPercentThreshold)
  198. {
  199. $this->healthyPercentThreshold = $healthyPercentThreshold;
  200. }
  201. /**
  202. * @return string
  203. */
  204. public function getHealthyPercentThreshold()
  205. {
  206. return $this->healthyPercentThreshold;
  207. }
  208. /**
  209. * Output only. [Output Only] The unique identifier for the resource. This
  210. * identifier is defined by the server.
  211. *
  212. * @param string $id
  213. */
  214. public function setId($id)
  215. {
  216. $this->id = $id;
  217. }
  218. /**
  219. * @return string
  220. */
  221. public function getId()
  222. {
  223. return $this->id;
  224. }
  225. /**
  226. * Output only. [Output Only] Type of the resource.
  227. * Alwayscompute#healthAggregationPolicy for health aggregation policies.
  228. *
  229. * @param string $kind
  230. */
  231. public function setKind($kind)
  232. {
  233. $this->kind = $kind;
  234. }
  235. /**
  236. * @return string
  237. */
  238. public function getKind()
  239. {
  240. return $this->kind;
  241. }
  242. /**
  243. * Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies
  244. * the minimum number of healthy endpoints required in order to consider the
  245. * aggregated health result HEALTHY. Defaults to 1. Must be positive. Not
  246. * applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated.
  247. * This field is optional, and will be set to the default if unspecified. Note
  248. * that both this threshold and healthyPercentThreshold must be satisfied in
  249. * order for HEALTHY to be the aggregated result. "Endpoints" refers to
  250. * network endpoints within a Network Endpoint Group or instances within an
  251. * Instance Group.
  252. *
  253. * @param string $minHealthyThreshold
  254. */
  255. public function setMinHealthyThreshold($minHealthyThreshold)
  256. {
  257. $this->minHealthyThreshold = $minHealthyThreshold;
  258. }
  259. /**
  260. * @return string
  261. */
  262. public function getMinHealthyThreshold()
  263. {
  264. return $this->minHealthyThreshold;
  265. }
  266. /**
  267. * Name of the resource. Provided by the client when the resource is created.
  268. * The name must be 1-63 characters long, and comply withRFC1035.
  269. * Specifically, the name must be 1-63 characters long and match the regular
  270. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  271. * must be a lowercase letter, and all following characters must be a dash,
  272. * lowercase letter, or digit, except the last character, which cannot be a
  273. * dash.
  274. *
  275. * @param string $name
  276. */
  277. public function setName($name)
  278. {
  279. $this->name = $name;
  280. }
  281. /**
  282. * @return string
  283. */
  284. public function getName()
  285. {
  286. return $this->name;
  287. }
  288. /**
  289. * Specifies the type of the healthAggregationPolicy. The only allowed value
  290. * for global resources is DNS_PUBLIC_IP_POLICY. The only allowed value for
  291. * regional resources is BACKEND_SERVICE_POLICY. Must be specified when the
  292. * healthAggregationPolicy is created, and cannot be mutated.
  293. *
  294. * Accepted values: BACKEND_SERVICE_POLICY, DNS_PUBLIC_IP_POLICY
  295. *
  296. * @param self::POLICY_TYPE_* $policyType
  297. */
  298. public function setPolicyType($policyType)
  299. {
  300. $this->policyType = $policyType;
  301. }
  302. /**
  303. * @return self::POLICY_TYPE_*
  304. */
  305. public function getPolicyType()
  306. {
  307. return $this->policyType;
  308. }
  309. /**
  310. * Output only. [Output Only] URL of the region where the health aggregation
  311. * policy resides. This field applies only to the regional resource. You must
  312. * specify this field as part of the HTTP request URL. It is not settable as a
  313. * field in the request body.
  314. *
  315. * @param string $region
  316. */
  317. public function setRegion($region)
  318. {
  319. $this->region = $region;
  320. }
  321. /**
  322. * @return string
  323. */
  324. public function getRegion()
  325. {
  326. return $this->region;
  327. }
  328. /**
  329. * Output only. [Output Only] Server-defined URL for the resource.
  330. *
  331. * @param string $selfLink
  332. */
  333. public function setSelfLink($selfLink)
  334. {
  335. $this->selfLink = $selfLink;
  336. }
  337. /**
  338. * @return string
  339. */
  340. public function getSelfLink()
  341. {
  342. return $this->selfLink;
  343. }
  344. /**
  345. * Output only. [Output Only] Server-defined URL with id for the resource.
  346. *
  347. * @param string $selfLinkWithId
  348. */
  349. public function setSelfLinkWithId($selfLinkWithId)
  350. {
  351. $this->selfLinkWithId = $selfLinkWithId;
  352. }
  353. /**
  354. * @return string
  355. */
  356. public function getSelfLinkWithId()
  357. {
  358. return $this->selfLinkWithId;
  359. }
  360. }
  361. // Adding a class alias for backwards compatibility with the previous class name.
  362. class_alias(HealthAggregationPolicy::class, 'Google_Service_Compute_HealthAggregationPolicy');