LiveMigrationStep.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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\FirebaseHosting;
  18. class LiveMigrationStep extends \Google\Collection
  19. {
  20. /**
  21. * The step's state is unspecified. The message is invalid if this is
  22. * unspecified.
  23. */
  24. public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
  25. /**
  26. * Hosting doesn't have enough information to construct the step yet. Complete
  27. * any prior steps and/or resolve this step's issue to proceed.
  28. */
  29. public const STATE_PREPARING = 'PREPARING';
  30. /**
  31. * The step's state is pending. Complete prior steps before working on a
  32. * `PENDING` step.
  33. */
  34. public const STATE_PENDING = 'PENDING';
  35. /**
  36. * The step is incomplete. You should complete any `certVerification` or
  37. * `dnsUpdates` changes to complete it.
  38. */
  39. public const STATE_INCOMPLETE = 'INCOMPLETE';
  40. /**
  41. * You've done your part to update records and present challenges as
  42. * necessary. Hosting is now completing background processes to complete the
  43. * step, e.g. minting an SSL cert for your domain name.
  44. */
  45. public const STATE_PROCESSING = 'PROCESSING';
  46. /**
  47. * The step is complete. You've already made the necessary changes to your
  48. * domain and/or prior hosting service to advance to the next step. Once all
  49. * steps are complete, Hosting is ready to serve secure content on your
  50. * domain.
  51. */
  52. public const STATE_COMPLETE = 'COMPLETE';
  53. protected $collection_key = 'issues';
  54. protected $certVerificationType = CertVerification::class;
  55. protected $certVerificationDataType = '';
  56. protected $dnsUpdatesType = DnsUpdates::class;
  57. protected $dnsUpdatesDataType = '';
  58. protected $issuesType = Status::class;
  59. protected $issuesDataType = 'array';
  60. /**
  61. * Output only. The state of the live migration step, indicates whether you
  62. * should work to complete the step now, in the future, or have already
  63. * completed it.
  64. *
  65. * @var string
  66. */
  67. public $state;
  68. /**
  69. * Output only. A pair of ACME challenges that Hosting's Certificate Authority
  70. * (CA) can use to create an SSL cert for your domain name. Use either the DNS
  71. * or HTTP challenge; it's not necessary to provide both.
  72. *
  73. * @param CertVerification $certVerification
  74. */
  75. public function setCertVerification(CertVerification $certVerification)
  76. {
  77. $this->certVerification = $certVerification;
  78. }
  79. /**
  80. * @return CertVerification
  81. */
  82. public function getCertVerification()
  83. {
  84. return $this->certVerification;
  85. }
  86. /**
  87. * Output only. DNS updates to facilitate your domain's zero-downtime
  88. * migration to Hosting.
  89. *
  90. * @param DnsUpdates $dnsUpdates
  91. */
  92. public function setDnsUpdates(DnsUpdates $dnsUpdates)
  93. {
  94. $this->dnsUpdates = $dnsUpdates;
  95. }
  96. /**
  97. * @return DnsUpdates
  98. */
  99. public function getDnsUpdates()
  100. {
  101. return $this->dnsUpdates;
  102. }
  103. /**
  104. * Output only. Issues that prevent the current step from completing.
  105. *
  106. * @param Status[] $issues
  107. */
  108. public function setIssues($issues)
  109. {
  110. $this->issues = $issues;
  111. }
  112. /**
  113. * @return Status[]
  114. */
  115. public function getIssues()
  116. {
  117. return $this->issues;
  118. }
  119. /**
  120. * Output only. The state of the live migration step, indicates whether you
  121. * should work to complete the step now, in the future, or have already
  122. * completed it.
  123. *
  124. * Accepted values: STATE_UNSPECIFIED, PREPARING, PENDING, INCOMPLETE,
  125. * PROCESSING, COMPLETE
  126. *
  127. * @param self::STATE_* $state
  128. */
  129. public function setState($state)
  130. {
  131. $this->state = $state;
  132. }
  133. /**
  134. * @return self::STATE_*
  135. */
  136. public function getState()
  137. {
  138. return $this->state;
  139. }
  140. }
  141. // Adding a class alias for backwards compatibility with the previous class name.
  142. class_alias(LiveMigrationStep::class, 'Google_Service_FirebaseHosting_LiveMigrationStep');