diff --git a/src/ServiceControl/AuditLog.php b/src/ServiceControl/AuditLog.php index 57b448f9b53..15d2cd41f27 100644 --- a/src/ServiceControl/AuditLog.php +++ b/src/ServiceControl/AuditLog.php @@ -33,6 +33,8 @@ class AuditLog extends \Google\Collection protected $authenticationInfoDataType = ''; protected $authorizationInfoType = AuthorizationInfo::class; protected $authorizationInfoDataType = 'array'; + protected $callerAgentType = CallerAgent::class; + protected $callerAgentDataType = ''; /** * Other service-specific data about the request, response, and other * information associated with the current audited event. @@ -173,6 +175,22 @@ public function getAuthorizationInfo() { return $this->authorizationInfo; } + /** + * Information set when the caller is an agent. + * + * @param CallerAgent $callerAgent + */ + public function setCallerAgent(CallerAgent $callerAgent) + { + $this->callerAgent = $callerAgent; + } + /** + * @return CallerAgent + */ + public function getCallerAgent() + { + return $this->callerAgent; + } /** * Other service-specific data about the request, response, and other * information associated with the current audited event. diff --git a/src/ServiceControl/CallerAgent.php b/src/ServiceControl/CallerAgent.php new file mode 100644 index 00000000000..caf67cf6f5f --- /dev/null +++ b/src/ServiceControl/CallerAgent.php @@ -0,0 +1,62 @@ +authority = $authority; + } + /** + * @return self::AUTHORITY_* + */ + public function getAuthority() + { + return $this->authority; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CallerAgent::class, 'Google_Service_ServiceControl_CallerAgent');