GoogleCloudSecuritycenterV2Job.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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\SecurityCommandCenter;
  18. class GoogleCloudSecuritycenterV2Job extends \Google\Model
  19. {
  20. /**
  21. * Unspecified represents an unknown state and should not be used.
  22. */
  23. public const STATE_JOB_STATE_UNSPECIFIED = 'JOB_STATE_UNSPECIFIED';
  24. /**
  25. * Job is scheduled and pending for run
  26. */
  27. public const STATE_PENDING = 'PENDING';
  28. /**
  29. * Job in progress
  30. */
  31. public const STATE_RUNNING = 'RUNNING';
  32. /**
  33. * Job has completed with success
  34. */
  35. public const STATE_SUCCEEDED = 'SUCCEEDED';
  36. /**
  37. * Job has completed but with failure
  38. */
  39. public const STATE_FAILED = 'FAILED';
  40. /**
  41. * Optional. If the job did not complete successfully, this field describes
  42. * why.
  43. *
  44. * @var int
  45. */
  46. public $errorCode;
  47. /**
  48. * Optional. Gives the location where the job ran, such as `US` or `europe-
  49. * west1`
  50. *
  51. * @var string
  52. */
  53. public $location;
  54. /**
  55. * The fully-qualified name for a job. e.g. `projects//jobs/`
  56. *
  57. * @var string
  58. */
  59. public $name;
  60. /**
  61. * Output only. State of the job, such as `RUNNING` or `PENDING`.
  62. *
  63. * @var string
  64. */
  65. public $state;
  66. /**
  67. * Optional. If the job did not complete successfully, this field describes
  68. * why.
  69. *
  70. * @param int $errorCode
  71. */
  72. public function setErrorCode($errorCode)
  73. {
  74. $this->errorCode = $errorCode;
  75. }
  76. /**
  77. * @return int
  78. */
  79. public function getErrorCode()
  80. {
  81. return $this->errorCode;
  82. }
  83. /**
  84. * Optional. Gives the location where the job ran, such as `US` or `europe-
  85. * west1`
  86. *
  87. * @param string $location
  88. */
  89. public function setLocation($location)
  90. {
  91. $this->location = $location;
  92. }
  93. /**
  94. * @return string
  95. */
  96. public function getLocation()
  97. {
  98. return $this->location;
  99. }
  100. /**
  101. * The fully-qualified name for a job. e.g. `projects//jobs/`
  102. *
  103. * @param string $name
  104. */
  105. public function setName($name)
  106. {
  107. $this->name = $name;
  108. }
  109. /**
  110. * @return string
  111. */
  112. public function getName()
  113. {
  114. return $this->name;
  115. }
  116. /**
  117. * Output only. State of the job, such as `RUNNING` or `PENDING`.
  118. *
  119. * Accepted values: JOB_STATE_UNSPECIFIED, PENDING, RUNNING, SUCCEEDED, FAILED
  120. *
  121. * @param self::STATE_* $state
  122. */
  123. public function setState($state)
  124. {
  125. $this->state = $state;
  126. }
  127. /**
  128. * @return self::STATE_*
  129. */
  130. public function getState()
  131. {
  132. return $this->state;
  133. }
  134. }
  135. // Adding a class alias for backwards compatibility with the previous class name.
  136. class_alias(GoogleCloudSecuritycenterV2Job::class, 'Google_Service_SecurityCommandCenter_GoogleCloudSecuritycenterV2Job');