RolloutControl.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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\SaaSServiceManagement;
  18. class RolloutControl extends \Google\Model
  19. {
  20. /**
  21. * Unspecified action, will be treated as RUN by default.
  22. */
  23. public const ACTION_ROLLOUT_ACTION_UNSPECIFIED = 'ROLLOUT_ACTION_UNSPECIFIED';
  24. /**
  25. * Run the Rollout until it naturally reaches a terminal state. A rollout
  26. * requested to run will progress through all natural Rollout States (such as
  27. * RUNNING -> SUCCEEDED or RUNNING -> FAILED). If retriable errors are
  28. * encountered during the rollout, the rollout will paused by default and can
  29. * be resumed by re-requesting this RUN action.
  30. */
  31. public const ACTION_ROLLOUT_ACTION_RUN = 'ROLLOUT_ACTION_RUN';
  32. /**
  33. * Pause the Rollout until it is resumed (i.e. RUN is requested).
  34. */
  35. public const ACTION_ROLLOUT_ACTION_PAUSE = 'ROLLOUT_ACTION_PAUSE';
  36. /**
  37. * Cancel the Rollout permanently.
  38. */
  39. public const ACTION_ROLLOUT_ACTION_CANCEL = 'ROLLOUT_ACTION_CANCEL';
  40. /**
  41. * Required. Action to be performed on the Rollout. The default behavior is to
  42. * run the rollout until it naturally reaches a terminal state.
  43. *
  44. * @var string
  45. */
  46. public $action;
  47. protected $runParamsType = RunRolloutActionParams::class;
  48. protected $runParamsDataType = '';
  49. /**
  50. * Required. Action to be performed on the Rollout. The default behavior is to
  51. * run the rollout until it naturally reaches a terminal state.
  52. *
  53. * Accepted values: ROLLOUT_ACTION_UNSPECIFIED, ROLLOUT_ACTION_RUN,
  54. * ROLLOUT_ACTION_PAUSE, ROLLOUT_ACTION_CANCEL
  55. *
  56. * @param self::ACTION_* $action
  57. */
  58. public function setAction($action)
  59. {
  60. $this->action = $action;
  61. }
  62. /**
  63. * @return self::ACTION_*
  64. */
  65. public function getAction()
  66. {
  67. return $this->action;
  68. }
  69. /**
  70. * Optional. Parameters for the RUN action. It is an error to specify this if
  71. * the RolloutAction is not set to RUN. By default, the rollout will retry
  72. * failed operations when resumed.
  73. *
  74. * @param RunRolloutActionParams $runParams
  75. */
  76. public function setRunParams(RunRolloutActionParams $runParams)
  77. {
  78. $this->runParams = $runParams;
  79. }
  80. /**
  81. * @return RunRolloutActionParams
  82. */
  83. public function getRunParams()
  84. {
  85. return $this->runParams;
  86. }
  87. }
  88. // Adding a class alias for backwards compatibility with the previous class name.
  89. class_alias(RolloutControl::class, 'Google_Service_SaaSServiceManagement_RolloutControl');