MaintenanceWindow.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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\OracleDatabase;
  18. class MaintenanceWindow extends \Google\Collection
  19. {
  20. /**
  21. * Default unspecified value.
  22. */
  23. public const PATCHING_MODE_PATCHING_MODE_UNSPECIFIED = 'PATCHING_MODE_UNSPECIFIED';
  24. /**
  25. * Updates the Cloud Exadata database server hosts in a rolling fashion.
  26. */
  27. public const PATCHING_MODE_ROLLING = 'ROLLING';
  28. /**
  29. * The non-rolling maintenance method first updates your storage servers at
  30. * the same time, then your database servers at the same time.
  31. */
  32. public const PATCHING_MODE_NON_ROLLING = 'NON_ROLLING';
  33. /**
  34. * Default unspecified value.
  35. */
  36. public const PREFERENCE_MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED = 'MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED';
  37. /**
  38. * Custom preference.
  39. */
  40. public const PREFERENCE_CUSTOM_PREFERENCE = 'CUSTOM_PREFERENCE';
  41. /**
  42. * No preference.
  43. */
  44. public const PREFERENCE_NO_PREFERENCE = 'NO_PREFERENCE';
  45. protected $collection_key = 'weeksOfMonth';
  46. /**
  47. * Optional. Determines the amount of time the system will wait before the
  48. * start of each database server patching operation. Custom action timeout is
  49. * in minutes and valid value is between 15 to 120 (inclusive).
  50. *
  51. * @var int
  52. */
  53. public $customActionTimeoutMins;
  54. /**
  55. * Optional. Days during the week when maintenance should be performed.
  56. *
  57. * @var string[]
  58. */
  59. public $daysOfWeek;
  60. /**
  61. * Optional. The window of hours during the day when maintenance should be
  62. * performed. The window is a 4 hour slot. Valid values are: 0 - represents
  63. * time slot 0:00 - 3:59 UTC 4 - represents time slot 4:00 - 7:59 UTC 8 -
  64. * represents time slot 8:00 - 11:59 UTC 12 - represents time slot 12:00 -
  65. * 15:59 UTC 16 - represents time slot 16:00 - 19:59 UTC 20 - represents time
  66. * slot 20:00 - 23:59 UTC
  67. *
  68. * @var int[]
  69. */
  70. public $hoursOfDay;
  71. /**
  72. * Optional. If true, enables the configuration of a custom action timeout
  73. * (waiting period) between database server patching operations.
  74. *
  75. * @var bool
  76. */
  77. public $isCustomActionTimeoutEnabled;
  78. /**
  79. * Optional. Lead time window allows user to set a lead time to prepare for a
  80. * down time. The lead time is in weeks and valid value is between 1 to 4.
  81. *
  82. * @var int
  83. */
  84. public $leadTimeWeek;
  85. /**
  86. * Optional. Months during the year when maintenance should be performed.
  87. *
  88. * @var string[]
  89. */
  90. public $months;
  91. /**
  92. * Optional. Cloud CloudExadataInfrastructure node patching method, either
  93. * "ROLLING" or "NONROLLING". Default value is ROLLING.
  94. *
  95. * @var string
  96. */
  97. public $patchingMode;
  98. /**
  99. * Optional. The maintenance window scheduling preference.
  100. *
  101. * @var string
  102. */
  103. public $preference;
  104. /**
  105. * Optional. Weeks during the month when maintenance should be performed.
  106. * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a
  107. * duration of 7 days. Weeks start and end based on calendar dates, not days
  108. * of the week.
  109. *
  110. * @var int[]
  111. */
  112. public $weeksOfMonth;
  113. /**
  114. * Optional. Determines the amount of time the system will wait before the
  115. * start of each database server patching operation. Custom action timeout is
  116. * in minutes and valid value is between 15 to 120 (inclusive).
  117. *
  118. * @param int $customActionTimeoutMins
  119. */
  120. public function setCustomActionTimeoutMins($customActionTimeoutMins)
  121. {
  122. $this->customActionTimeoutMins = $customActionTimeoutMins;
  123. }
  124. /**
  125. * @return int
  126. */
  127. public function getCustomActionTimeoutMins()
  128. {
  129. return $this->customActionTimeoutMins;
  130. }
  131. /**
  132. * Optional. Days during the week when maintenance should be performed.
  133. *
  134. * @param string[] $daysOfWeek
  135. */
  136. public function setDaysOfWeek($daysOfWeek)
  137. {
  138. $this->daysOfWeek = $daysOfWeek;
  139. }
  140. /**
  141. * @return string[]
  142. */
  143. public function getDaysOfWeek()
  144. {
  145. return $this->daysOfWeek;
  146. }
  147. /**
  148. * Optional. The window of hours during the day when maintenance should be
  149. * performed. The window is a 4 hour slot. Valid values are: 0 - represents
  150. * time slot 0:00 - 3:59 UTC 4 - represents time slot 4:00 - 7:59 UTC 8 -
  151. * represents time slot 8:00 - 11:59 UTC 12 - represents time slot 12:00 -
  152. * 15:59 UTC 16 - represents time slot 16:00 - 19:59 UTC 20 - represents time
  153. * slot 20:00 - 23:59 UTC
  154. *
  155. * @param int[] $hoursOfDay
  156. */
  157. public function setHoursOfDay($hoursOfDay)
  158. {
  159. $this->hoursOfDay = $hoursOfDay;
  160. }
  161. /**
  162. * @return int[]
  163. */
  164. public function getHoursOfDay()
  165. {
  166. return $this->hoursOfDay;
  167. }
  168. /**
  169. * Optional. If true, enables the configuration of a custom action timeout
  170. * (waiting period) between database server patching operations.
  171. *
  172. * @param bool $isCustomActionTimeoutEnabled
  173. */
  174. public function setIsCustomActionTimeoutEnabled($isCustomActionTimeoutEnabled)
  175. {
  176. $this->isCustomActionTimeoutEnabled = $isCustomActionTimeoutEnabled;
  177. }
  178. /**
  179. * @return bool
  180. */
  181. public function getIsCustomActionTimeoutEnabled()
  182. {
  183. return $this->isCustomActionTimeoutEnabled;
  184. }
  185. /**
  186. * Optional. Lead time window allows user to set a lead time to prepare for a
  187. * down time. The lead time is in weeks and valid value is between 1 to 4.
  188. *
  189. * @param int $leadTimeWeek
  190. */
  191. public function setLeadTimeWeek($leadTimeWeek)
  192. {
  193. $this->leadTimeWeek = $leadTimeWeek;
  194. }
  195. /**
  196. * @return int
  197. */
  198. public function getLeadTimeWeek()
  199. {
  200. return $this->leadTimeWeek;
  201. }
  202. /**
  203. * Optional. Months during the year when maintenance should be performed.
  204. *
  205. * @param string[] $months
  206. */
  207. public function setMonths($months)
  208. {
  209. $this->months = $months;
  210. }
  211. /**
  212. * @return string[]
  213. */
  214. public function getMonths()
  215. {
  216. return $this->months;
  217. }
  218. /**
  219. * Optional. Cloud CloudExadataInfrastructure node patching method, either
  220. * "ROLLING" or "NONROLLING". Default value is ROLLING.
  221. *
  222. * Accepted values: PATCHING_MODE_UNSPECIFIED, ROLLING, NON_ROLLING
  223. *
  224. * @param self::PATCHING_MODE_* $patchingMode
  225. */
  226. public function setPatchingMode($patchingMode)
  227. {
  228. $this->patchingMode = $patchingMode;
  229. }
  230. /**
  231. * @return self::PATCHING_MODE_*
  232. */
  233. public function getPatchingMode()
  234. {
  235. return $this->patchingMode;
  236. }
  237. /**
  238. * Optional. The maintenance window scheduling preference.
  239. *
  240. * Accepted values: MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED,
  241. * CUSTOM_PREFERENCE, NO_PREFERENCE
  242. *
  243. * @param self::PREFERENCE_* $preference
  244. */
  245. public function setPreference($preference)
  246. {
  247. $this->preference = $preference;
  248. }
  249. /**
  250. * @return self::PREFERENCE_*
  251. */
  252. public function getPreference()
  253. {
  254. return $this->preference;
  255. }
  256. /**
  257. * Optional. Weeks during the month when maintenance should be performed.
  258. * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a
  259. * duration of 7 days. Weeks start and end based on calendar dates, not days
  260. * of the week.
  261. *
  262. * @param int[] $weeksOfMonth
  263. */
  264. public function setWeeksOfMonth($weeksOfMonth)
  265. {
  266. $this->weeksOfMonth = $weeksOfMonth;
  267. }
  268. /**
  269. * @return int[]
  270. */
  271. public function getWeeksOfMonth()
  272. {
  273. return $this->weeksOfMonth;
  274. }
  275. }
  276. // Adding a class alias for backwards compatibility with the previous class name.
  277. class_alias(MaintenanceWindow::class, 'Google_Service_OracleDatabase_MaintenanceWindow');