InstanceGroupManagerStandbyPolicy.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 InstanceGroupManagerStandbyPolicy extends \Google\Model
  19. {
  20. /**
  21. * MIG does not automatically resume or start VMs in the standby pool when the
  22. * group scales out.
  23. */
  24. public const MODE_MANUAL = 'MANUAL';
  25. /**
  26. * MIG automatically resumes or starts VMs in the standby pool when the group
  27. * scales out, and replenishes the standby pool afterwards.
  28. */
  29. public const MODE_SCALE_OUT_POOL = 'SCALE_OUT_POOL';
  30. /**
  31. * Specifies the number of seconds that the MIG should wait to suspend or stop
  32. * a VM after that VM was created. The initial delay gives the initialization
  33. * script the time to prepare your VM for a quick scale out. The value of
  34. * initial delay must be between 0 and 3600 seconds. The default value is 0.
  35. *
  36. * @var int
  37. */
  38. public $initialDelaySec;
  39. /**
  40. * Defines how a MIG resumes or starts VMs from a standby pool when the group
  41. * scales out. The default mode is `MANUAL`.
  42. *
  43. * @var string
  44. */
  45. public $mode;
  46. /**
  47. * Specifies the number of seconds that the MIG should wait to suspend or stop
  48. * a VM after that VM was created. The initial delay gives the initialization
  49. * script the time to prepare your VM for a quick scale out. The value of
  50. * initial delay must be between 0 and 3600 seconds. The default value is 0.
  51. *
  52. * @param int $initialDelaySec
  53. */
  54. public function setInitialDelaySec($initialDelaySec)
  55. {
  56. $this->initialDelaySec = $initialDelaySec;
  57. }
  58. /**
  59. * @return int
  60. */
  61. public function getInitialDelaySec()
  62. {
  63. return $this->initialDelaySec;
  64. }
  65. /**
  66. * Defines how a MIG resumes or starts VMs from a standby pool when the group
  67. * scales out. The default mode is `MANUAL`.
  68. *
  69. * Accepted values: MANUAL, SCALE_OUT_POOL
  70. *
  71. * @param self::MODE_* $mode
  72. */
  73. public function setMode($mode)
  74. {
  75. $this->mode = $mode;
  76. }
  77. /**
  78. * @return self::MODE_*
  79. */
  80. public function getMode()
  81. {
  82. return $this->mode;
  83. }
  84. }
  85. // Adding a class alias for backwards compatibility with the previous class name.
  86. class_alias(InstanceGroupManagerStandbyPolicy::class, 'Google_Service_Compute_InstanceGroupManagerStandbyPolicy');