DataAccessEvent.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 DataAccessEvent extends \Google\Model
  19. {
  20. /**
  21. * The operation is unspecified.
  22. */
  23. public const OPERATION_OPERATION_UNSPECIFIED = 'OPERATION_UNSPECIFIED';
  24. /**
  25. * Represents a read operation.
  26. */
  27. public const OPERATION_READ = 'READ';
  28. /**
  29. * Represents a move operation.
  30. */
  31. public const OPERATION_MOVE = 'MOVE';
  32. /**
  33. * Represents a copy operation.
  34. */
  35. public const OPERATION_COPY = 'COPY';
  36. /**
  37. * Unique identifier for data access event.
  38. *
  39. * @var string
  40. */
  41. public $eventId;
  42. /**
  43. * Timestamp of data access event.
  44. *
  45. * @var string
  46. */
  47. public $eventTime;
  48. /**
  49. * The operation performed by the principal to access the data.
  50. *
  51. * @var string
  52. */
  53. public $operation;
  54. /**
  55. * The email address of the principal that accessed the data. The principal
  56. * could be a user account, service account, Google group, or other.
  57. *
  58. * @var string
  59. */
  60. public $principalEmail;
  61. /**
  62. * Unique identifier for data access event.
  63. *
  64. * @param string $eventId
  65. */
  66. public function setEventId($eventId)
  67. {
  68. $this->eventId = $eventId;
  69. }
  70. /**
  71. * @return string
  72. */
  73. public function getEventId()
  74. {
  75. return $this->eventId;
  76. }
  77. /**
  78. * Timestamp of data access event.
  79. *
  80. * @param string $eventTime
  81. */
  82. public function setEventTime($eventTime)
  83. {
  84. $this->eventTime = $eventTime;
  85. }
  86. /**
  87. * @return string
  88. */
  89. public function getEventTime()
  90. {
  91. return $this->eventTime;
  92. }
  93. /**
  94. * The operation performed by the principal to access the data.
  95. *
  96. * Accepted values: OPERATION_UNSPECIFIED, READ, MOVE, COPY
  97. *
  98. * @param self::OPERATION_* $operation
  99. */
  100. public function setOperation($operation)
  101. {
  102. $this->operation = $operation;
  103. }
  104. /**
  105. * @return self::OPERATION_*
  106. */
  107. public function getOperation()
  108. {
  109. return $this->operation;
  110. }
  111. /**
  112. * The email address of the principal that accessed the data. The principal
  113. * could be a user account, service account, Google group, or other.
  114. *
  115. * @param string $principalEmail
  116. */
  117. public function setPrincipalEmail($principalEmail)
  118. {
  119. $this->principalEmail = $principalEmail;
  120. }
  121. /**
  122. * @return string
  123. */
  124. public function getPrincipalEmail()
  125. {
  126. return $this->principalEmail;
  127. }
  128. }
  129. // Adding a class alias for backwards compatibility with the previous class name.
  130. class_alias(DataAccessEvent::class, 'Google_Service_SecurityCommandCenter_DataAccessEvent');