GoogleCloudSecuritycenterV2Access.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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 GoogleCloudSecuritycenterV2Access extends \Google\Collection
  19. {
  20. protected $collection_key = 'serviceAccountDelegationInfo';
  21. /**
  22. * Caller's IP address, such as "1.1.1.1".
  23. *
  24. * @var string
  25. */
  26. public $callerIp;
  27. protected $callerIpGeoType = GoogleCloudSecuritycenterV2Geolocation::class;
  28. protected $callerIpGeoDataType = '';
  29. /**
  30. * The method that the service account called, e.g. "SetIamPolicy".
  31. *
  32. * @var string
  33. */
  34. public $methodName;
  35. /**
  36. * Associated email, such as "foo@google.com". The email address of the
  37. * authenticated user or a service account acting on behalf of a third party
  38. * principal making the request. For third party identity callers, the
  39. * `principal_subject` field is populated instead of this field. For privacy
  40. * reasons, the principal email address is sometimes redacted. For more
  41. * information, see [Caller identities in audit
  42. * logs](https://cloud.google.com/logging/docs/audit#user-id).
  43. *
  44. * @var string
  45. */
  46. public $principalEmail;
  47. /**
  48. * A string that represents the principal_subject that is associated with the
  49. * identity. Unlike `principal_email`, `principal_subject` supports principals
  50. * that aren't associated with email addresses, such as third party
  51. * principals. For most identities, the format is
  52. * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
  53. * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
  54. * still use the legacy format `serviceAccount:{identity pool
  55. * name}[{subject}]`.
  56. *
  57. * @var string
  58. */
  59. public $principalSubject;
  60. protected $serviceAccountDelegationInfoType = GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo::class;
  61. protected $serviceAccountDelegationInfoDataType = 'array';
  62. /**
  63. * The name of the service account key that was used to create or exchange
  64. * credentials when authenticating the service account that made the request.
  65. * This is a scheme-less URI full resource name. For example: "//iam.googleapi
  66. * s.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
  67. *
  68. * @var string
  69. */
  70. public $serviceAccountKeyName;
  71. /**
  72. * This is the API service that the service account made a call to, e.g.
  73. * "iam.googleapis.com"
  74. *
  75. * @var string
  76. */
  77. public $serviceName;
  78. /**
  79. * The caller's user agent string associated with the finding.
  80. *
  81. * @var string
  82. */
  83. public $userAgent;
  84. /**
  85. * Type of user agent associated with the finding. For example, an operating
  86. * system shell or an embedded or standalone application.
  87. *
  88. * @var string
  89. */
  90. public $userAgentFamily;
  91. /**
  92. * A string that represents a username. The username provided depends on the
  93. * type of the finding and is likely not an IAM principal. For example, this
  94. * can be a system username if the finding is related to a virtual machine, or
  95. * it can be an application login username.
  96. *
  97. * @var string
  98. */
  99. public $userName;
  100. /**
  101. * Caller's IP address, such as "1.1.1.1".
  102. *
  103. * @param string $callerIp
  104. */
  105. public function setCallerIp($callerIp)
  106. {
  107. $this->callerIp = $callerIp;
  108. }
  109. /**
  110. * @return string
  111. */
  112. public function getCallerIp()
  113. {
  114. return $this->callerIp;
  115. }
  116. /**
  117. * The caller IP's geolocation, which identifies where the call came from.
  118. *
  119. * @param GoogleCloudSecuritycenterV2Geolocation $callerIpGeo
  120. */
  121. public function setCallerIpGeo(GoogleCloudSecuritycenterV2Geolocation $callerIpGeo)
  122. {
  123. $this->callerIpGeo = $callerIpGeo;
  124. }
  125. /**
  126. * @return GoogleCloudSecuritycenterV2Geolocation
  127. */
  128. public function getCallerIpGeo()
  129. {
  130. return $this->callerIpGeo;
  131. }
  132. /**
  133. * The method that the service account called, e.g. "SetIamPolicy".
  134. *
  135. * @param string $methodName
  136. */
  137. public function setMethodName($methodName)
  138. {
  139. $this->methodName = $methodName;
  140. }
  141. /**
  142. * @return string
  143. */
  144. public function getMethodName()
  145. {
  146. return $this->methodName;
  147. }
  148. /**
  149. * Associated email, such as "foo@google.com". The email address of the
  150. * authenticated user or a service account acting on behalf of a third party
  151. * principal making the request. For third party identity callers, the
  152. * `principal_subject` field is populated instead of this field. For privacy
  153. * reasons, the principal email address is sometimes redacted. For more
  154. * information, see [Caller identities in audit
  155. * logs](https://cloud.google.com/logging/docs/audit#user-id).
  156. *
  157. * @param string $principalEmail
  158. */
  159. public function setPrincipalEmail($principalEmail)
  160. {
  161. $this->principalEmail = $principalEmail;
  162. }
  163. /**
  164. * @return string
  165. */
  166. public function getPrincipalEmail()
  167. {
  168. return $this->principalEmail;
  169. }
  170. /**
  171. * A string that represents the principal_subject that is associated with the
  172. * identity. Unlike `principal_email`, `principal_subject` supports principals
  173. * that aren't associated with email addresses, such as third party
  174. * principals. For most identities, the format is
  175. * `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
  176. * Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
  177. * still use the legacy format `serviceAccount:{identity pool
  178. * name}[{subject}]`.
  179. *
  180. * @param string $principalSubject
  181. */
  182. public function setPrincipalSubject($principalSubject)
  183. {
  184. $this->principalSubject = $principalSubject;
  185. }
  186. /**
  187. * @return string
  188. */
  189. public function getPrincipalSubject()
  190. {
  191. return $this->principalSubject;
  192. }
  193. /**
  194. * The identity delegation history of an authenticated service account that
  195. * made the request. The `serviceAccountDelegationInfo[]` object contains
  196. * information about the real authorities that try to access Google Cloud
  197. * resources by delegating on a service account. When multiple authorities are
  198. * present, they are guaranteed to be sorted based on the original ordering of
  199. * the identity delegation events.
  200. *
  201. * @param GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo[] $serviceAccountDelegationInfo
  202. */
  203. public function setServiceAccountDelegationInfo($serviceAccountDelegationInfo)
  204. {
  205. $this->serviceAccountDelegationInfo = $serviceAccountDelegationInfo;
  206. }
  207. /**
  208. * @return GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo[]
  209. */
  210. public function getServiceAccountDelegationInfo()
  211. {
  212. return $this->serviceAccountDelegationInfo;
  213. }
  214. /**
  215. * The name of the service account key that was used to create or exchange
  216. * credentials when authenticating the service account that made the request.
  217. * This is a scheme-less URI full resource name. For example: "//iam.googleapi
  218. * s.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
  219. *
  220. * @param string $serviceAccountKeyName
  221. */
  222. public function setServiceAccountKeyName($serviceAccountKeyName)
  223. {
  224. $this->serviceAccountKeyName = $serviceAccountKeyName;
  225. }
  226. /**
  227. * @return string
  228. */
  229. public function getServiceAccountKeyName()
  230. {
  231. return $this->serviceAccountKeyName;
  232. }
  233. /**
  234. * This is the API service that the service account made a call to, e.g.
  235. * "iam.googleapis.com"
  236. *
  237. * @param string $serviceName
  238. */
  239. public function setServiceName($serviceName)
  240. {
  241. $this->serviceName = $serviceName;
  242. }
  243. /**
  244. * @return string
  245. */
  246. public function getServiceName()
  247. {
  248. return $this->serviceName;
  249. }
  250. /**
  251. * The caller's user agent string associated with the finding.
  252. *
  253. * @param string $userAgent
  254. */
  255. public function setUserAgent($userAgent)
  256. {
  257. $this->userAgent = $userAgent;
  258. }
  259. /**
  260. * @return string
  261. */
  262. public function getUserAgent()
  263. {
  264. return $this->userAgent;
  265. }
  266. /**
  267. * Type of user agent associated with the finding. For example, an operating
  268. * system shell or an embedded or standalone application.
  269. *
  270. * @param string $userAgentFamily
  271. */
  272. public function setUserAgentFamily($userAgentFamily)
  273. {
  274. $this->userAgentFamily = $userAgentFamily;
  275. }
  276. /**
  277. * @return string
  278. */
  279. public function getUserAgentFamily()
  280. {
  281. return $this->userAgentFamily;
  282. }
  283. /**
  284. * A string that represents a username. The username provided depends on the
  285. * type of the finding and is likely not an IAM principal. For example, this
  286. * can be a system username if the finding is related to a virtual machine, or
  287. * it can be an application login username.
  288. *
  289. * @param string $userName
  290. */
  291. public function setUserName($userName)
  292. {
  293. $this->userName = $userName;
  294. }
  295. /**
  296. * @return string
  297. */
  298. public function getUserName()
  299. {
  300. return $this->userName;
  301. }
  302. }
  303. // Adding a class alias for backwards compatibility with the previous class name.
  304. class_alias(GoogleCloudSecuritycenterV2Access::class, 'Google_Service_SecurityCommandCenter_GoogleCloudSecuritycenterV2Access');