GroupFindingsRequest.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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 GroupFindingsRequest extends \Google\Model
  19. {
  20. /**
  21. * When compare_duration is set, the GroupResult's "state_change" attribute is
  22. * updated to indicate whether the finding had its state changed, the
  23. * finding's state remained unchanged, or if the finding was added during the
  24. * compare_duration period of time that precedes the read_time. This is the
  25. * time between (read_time - compare_duration) and read_time. The state_change
  26. * value is derived based on the presence and state of the finding at the two
  27. * points in time. Intermediate state changes between the two times don't
  28. * affect the result. For example, the results aren't affected if the finding
  29. * is made inactive and then active again. Possible "state_change" values when
  30. * compare_duration is specified: * "CHANGED": indicates that the finding was
  31. * present and matched the given filter at the start of compare_duration, but
  32. * changed its state at read_time. * "UNCHANGED": indicates that the finding
  33. * was present and matched the given filter at the start of compare_duration
  34. * and did not change state at read_time. * "ADDED": indicates that the
  35. * finding did not match the given filter or was not present at the start of
  36. * compare_duration, but was present at read_time. * "REMOVED": indicates that
  37. * the finding was present and matched the filter at the start of
  38. * compare_duration, but did not match the filter at read_time. If
  39. * compare_duration is not specified, then the only possible state_change is
  40. * "UNUSED", which will be the state_change set for all findings present at
  41. * read_time. If this field is set then `state_change` must be a specified
  42. * field in `group_by`.
  43. *
  44. * @deprecated
  45. * @var string
  46. */
  47. public $compareDuration;
  48. /**
  49. * Expression that defines the filter to apply across findings. The expression
  50. * is a list of one or more restrictions combined via logical operators `AND`
  51. * and `OR`. Parentheses are supported, and `OR` has higher precedence than
  52. * `AND`. Restrictions have the form ` ` and may have a `-` character in front
  53. * of them to indicate negation. Examples include: * name *
  54. * source_properties.a_property * security_marks.marks.marka The supported
  55. * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for
  56. * integer values. * `:`, meaning substring matching, for strings. The
  57. * supported value types are: * string literals in quotes. * integer literals
  58. * without quotes. * boolean literals `true` and `false` without quotes. The
  59. * following field and operator combinations are supported: * name: `=` *
  60. * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
  61. * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=`
  62. * Usage: This should be milliseconds since epoch or an RFC3339 string.
  63. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time =
  64. * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` *
  65. * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`,
  66. * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
  67. * string. Use a partial match on the empty string to filter based on a
  68. * property existing: `source_properties.my_property : ""` Use a negated
  69. * partial match on the empty string to filter based on a property not
  70. * existing: `-source_properties.my_property : ""` * resource: *
  71. * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
  72. * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
  73. * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`
  74. *
  75. * @var string
  76. */
  77. public $filter;
  78. /**
  79. * Required. Expression that defines what assets fields to use for grouping
  80. * (including `state_change`). The string value should follow SQL syntax:
  81. * comma separated list of fields. For example: "parent,resource_name". The
  82. * following fields are supported when compare_duration is set: * state_change
  83. *
  84. * @var string
  85. */
  86. public $groupBy;
  87. /**
  88. * The maximum number of results to return in a single response. Default is
  89. * 10, minimum is 1, maximum is 1000.
  90. *
  91. * @var int
  92. */
  93. public $pageSize;
  94. /**
  95. * The value returned by the last `GroupFindingsResponse`; indicates that this
  96. * is a continuation of a prior `GroupFindings` call, and that the system
  97. * should return the next page of data.
  98. *
  99. * @var string
  100. */
  101. public $pageToken;
  102. /**
  103. * Time used as a reference point when filtering findings. The filter is
  104. * limited to findings existing at the supplied time and their values are
  105. * those at that specific time. Absence of this field will default to the
  106. * API's version of NOW.
  107. *
  108. * @deprecated
  109. * @var string
  110. */
  111. public $readTime;
  112. /**
  113. * When compare_duration is set, the GroupResult's "state_change" attribute is
  114. * updated to indicate whether the finding had its state changed, the
  115. * finding's state remained unchanged, or if the finding was added during the
  116. * compare_duration period of time that precedes the read_time. This is the
  117. * time between (read_time - compare_duration) and read_time. The state_change
  118. * value is derived based on the presence and state of the finding at the two
  119. * points in time. Intermediate state changes between the two times don't
  120. * affect the result. For example, the results aren't affected if the finding
  121. * is made inactive and then active again. Possible "state_change" values when
  122. * compare_duration is specified: * "CHANGED": indicates that the finding was
  123. * present and matched the given filter at the start of compare_duration, but
  124. * changed its state at read_time. * "UNCHANGED": indicates that the finding
  125. * was present and matched the given filter at the start of compare_duration
  126. * and did not change state at read_time. * "ADDED": indicates that the
  127. * finding did not match the given filter or was not present at the start of
  128. * compare_duration, but was present at read_time. * "REMOVED": indicates that
  129. * the finding was present and matched the filter at the start of
  130. * compare_duration, but did not match the filter at read_time. If
  131. * compare_duration is not specified, then the only possible state_change is
  132. * "UNUSED", which will be the state_change set for all findings present at
  133. * read_time. If this field is set then `state_change` must be a specified
  134. * field in `group_by`.
  135. *
  136. * @deprecated
  137. * @param string $compareDuration
  138. */
  139. public function setCompareDuration($compareDuration)
  140. {
  141. $this->compareDuration = $compareDuration;
  142. }
  143. /**
  144. * @deprecated
  145. * @return string
  146. */
  147. public function getCompareDuration()
  148. {
  149. return $this->compareDuration;
  150. }
  151. /**
  152. * Expression that defines the filter to apply across findings. The expression
  153. * is a list of one or more restrictions combined via logical operators `AND`
  154. * and `OR`. Parentheses are supported, and `OR` has higher precedence than
  155. * `AND`. Restrictions have the form ` ` and may have a `-` character in front
  156. * of them to indicate negation. Examples include: * name *
  157. * source_properties.a_property * security_marks.marks.marka The supported
  158. * operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for
  159. * integer values. * `:`, meaning substring matching, for strings. The
  160. * supported value types are: * string literals in quotes. * integer literals
  161. * without quotes. * boolean literals `true` and `false` without quotes. The
  162. * following field and operator combinations are supported: * name: `=` *
  163. * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
  164. * `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=`
  165. * Usage: This should be milliseconds since epoch or an RFC3339 string.
  166. * Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time =
  167. * 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` *
  168. * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`,
  169. * `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
  170. * string. Use a partial match on the empty string to filter based on a
  171. * property existing: `source_properties.my_property : ""` Use a negated
  172. * partial match on the empty string to filter based on a property not
  173. * existing: `-source_properties.my_property : ""` * resource: *
  174. * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
  175. * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
  176. * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`
  177. *
  178. * @param string $filter
  179. */
  180. public function setFilter($filter)
  181. {
  182. $this->filter = $filter;
  183. }
  184. /**
  185. * @return string
  186. */
  187. public function getFilter()
  188. {
  189. return $this->filter;
  190. }
  191. /**
  192. * Required. Expression that defines what assets fields to use for grouping
  193. * (including `state_change`). The string value should follow SQL syntax:
  194. * comma separated list of fields. For example: "parent,resource_name". The
  195. * following fields are supported when compare_duration is set: * state_change
  196. *
  197. * @param string $groupBy
  198. */
  199. public function setGroupBy($groupBy)
  200. {
  201. $this->groupBy = $groupBy;
  202. }
  203. /**
  204. * @return string
  205. */
  206. public function getGroupBy()
  207. {
  208. return $this->groupBy;
  209. }
  210. /**
  211. * The maximum number of results to return in a single response. Default is
  212. * 10, minimum is 1, maximum is 1000.
  213. *
  214. * @param int $pageSize
  215. */
  216. public function setPageSize($pageSize)
  217. {
  218. $this->pageSize = $pageSize;
  219. }
  220. /**
  221. * @return int
  222. */
  223. public function getPageSize()
  224. {
  225. return $this->pageSize;
  226. }
  227. /**
  228. * The value returned by the last `GroupFindingsResponse`; indicates that this
  229. * is a continuation of a prior `GroupFindings` call, and that the system
  230. * should return the next page of data.
  231. *
  232. * @param string $pageToken
  233. */
  234. public function setPageToken($pageToken)
  235. {
  236. $this->pageToken = $pageToken;
  237. }
  238. /**
  239. * @return string
  240. */
  241. public function getPageToken()
  242. {
  243. return $this->pageToken;
  244. }
  245. /**
  246. * Time used as a reference point when filtering findings. The filter is
  247. * limited to findings existing at the supplied time and their values are
  248. * those at that specific time. Absence of this field will default to the
  249. * API's version of NOW.
  250. *
  251. * @deprecated
  252. * @param string $readTime
  253. */
  254. public function setReadTime($readTime)
  255. {
  256. $this->readTime = $readTime;
  257. }
  258. /**
  259. * @deprecated
  260. * @return string
  261. */
  262. public function getReadTime()
  263. {
  264. return $this->readTime;
  265. }
  266. }
  267. // Adding a class alias for backwards compatibility with the previous class name.
  268. class_alias(GroupFindingsRequest::class, 'Google_Service_SecurityCommandCenter_GroupFindingsRequest');