OperationMetadata.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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\CloudComposer;
  18. class OperationMetadata extends \Google\Model
  19. {
  20. /**
  21. * Unused.
  22. */
  23. public const OPERATION_TYPE_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
  24. /**
  25. * A resource creation operation.
  26. */
  27. public const OPERATION_TYPE_CREATE = 'CREATE';
  28. /**
  29. * A resource deletion operation.
  30. */
  31. public const OPERATION_TYPE_DELETE = 'DELETE';
  32. /**
  33. * A resource update operation.
  34. */
  35. public const OPERATION_TYPE_UPDATE = 'UPDATE';
  36. /**
  37. * A resource check operation.
  38. */
  39. public const OPERATION_TYPE_CHECK = 'CHECK';
  40. /**
  41. * Saves snapshot of the resource operation.
  42. */
  43. public const OPERATION_TYPE_SAVE_SNAPSHOT = 'SAVE_SNAPSHOT';
  44. /**
  45. * Loads snapshot of the resource operation.
  46. */
  47. public const OPERATION_TYPE_LOAD_SNAPSHOT = 'LOAD_SNAPSHOT';
  48. /**
  49. * Triggers failover of environment's Cloud SQL instance (only for highly
  50. * resilient environments).
  51. */
  52. public const OPERATION_TYPE_DATABASE_FAILOVER = 'DATABASE_FAILOVER';
  53. /**
  54. * Migrates resource to a new major version.
  55. */
  56. public const OPERATION_TYPE_MIGRATE = 'MIGRATE';
  57. /**
  58. * Unused.
  59. */
  60. public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
  61. /**
  62. * The operation has been created but is not yet started.
  63. */
  64. public const STATE_PENDING = 'PENDING';
  65. /**
  66. * The operation is underway.
  67. */
  68. public const STATE_RUNNING = 'RUNNING';
  69. /**
  70. * The operation completed successfully.
  71. */
  72. public const STATE_SUCCEEDED = 'SUCCEEDED';
  73. public const STATE_SUCCESSFUL = 'SUCCESSFUL';
  74. /**
  75. * The operation is no longer running but did not succeed.
  76. */
  77. public const STATE_FAILED = 'FAILED';
  78. /**
  79. * Output only. The time the operation was submitted to the server.
  80. *
  81. * @var string
  82. */
  83. public $createTime;
  84. /**
  85. * Output only. The time when the operation terminated, regardless of its
  86. * success. This field is unset if the operation is still ongoing.
  87. *
  88. * @var string
  89. */
  90. public $endTime;
  91. /**
  92. * Output only. The type of operation being performed.
  93. *
  94. * @var string
  95. */
  96. public $operationType;
  97. /**
  98. * Output only. The resource being operated on, as a [relative resource name](
  99. * /apis/design/resource_names#relative_resource_name).
  100. *
  101. * @var string
  102. */
  103. public $resource;
  104. /**
  105. * Output only. The UUID of the resource being operated on.
  106. *
  107. * @var string
  108. */
  109. public $resourceUuid;
  110. /**
  111. * Output only. The current operation state.
  112. *
  113. * @var string
  114. */
  115. public $state;
  116. /**
  117. * Output only. The time the operation was submitted to the server.
  118. *
  119. * @param string $createTime
  120. */
  121. public function setCreateTime($createTime)
  122. {
  123. $this->createTime = $createTime;
  124. }
  125. /**
  126. * @return string
  127. */
  128. public function getCreateTime()
  129. {
  130. return $this->createTime;
  131. }
  132. /**
  133. * Output only. The time when the operation terminated, regardless of its
  134. * success. This field is unset if the operation is still ongoing.
  135. *
  136. * @param string $endTime
  137. */
  138. public function setEndTime($endTime)
  139. {
  140. $this->endTime = $endTime;
  141. }
  142. /**
  143. * @return string
  144. */
  145. public function getEndTime()
  146. {
  147. return $this->endTime;
  148. }
  149. /**
  150. * Output only. The type of operation being performed.
  151. *
  152. * Accepted values: TYPE_UNSPECIFIED, CREATE, DELETE, UPDATE, CHECK,
  153. * SAVE_SNAPSHOT, LOAD_SNAPSHOT, DATABASE_FAILOVER, MIGRATE
  154. *
  155. * @param self::OPERATION_TYPE_* $operationType
  156. */
  157. public function setOperationType($operationType)
  158. {
  159. $this->operationType = $operationType;
  160. }
  161. /**
  162. * @return self::OPERATION_TYPE_*
  163. */
  164. public function getOperationType()
  165. {
  166. return $this->operationType;
  167. }
  168. /**
  169. * Output only. The resource being operated on, as a [relative resource name](
  170. * /apis/design/resource_names#relative_resource_name).
  171. *
  172. * @param string $resource
  173. */
  174. public function setResource($resource)
  175. {
  176. $this->resource = $resource;
  177. }
  178. /**
  179. * @return string
  180. */
  181. public function getResource()
  182. {
  183. return $this->resource;
  184. }
  185. /**
  186. * Output only. The UUID of the resource being operated on.
  187. *
  188. * @param string $resourceUuid
  189. */
  190. public function setResourceUuid($resourceUuid)
  191. {
  192. $this->resourceUuid = $resourceUuid;
  193. }
  194. /**
  195. * @return string
  196. */
  197. public function getResourceUuid()
  198. {
  199. return $this->resourceUuid;
  200. }
  201. /**
  202. * Output only. The current operation state.
  203. *
  204. * Accepted values: STATE_UNSPECIFIED, PENDING, RUNNING, SUCCEEDED,
  205. * SUCCESSFUL, FAILED
  206. *
  207. * @param self::STATE_* $state
  208. */
  209. public function setState($state)
  210. {
  211. $this->state = $state;
  212. }
  213. /**
  214. * @return self::STATE_*
  215. */
  216. public function getState()
  217. {
  218. return $this->state;
  219. }
  220. }
  221. // Adding a class alias for backwards compatibility with the previous class name.
  222. class_alias(OperationMetadata::class, 'Google_Service_CloudComposer_OperationMetadata');