Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/ServiceControl/AuditLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
62 changes: 62 additions & 0 deletions src/ServiceControl/CallerAgent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

namespace Google\Service\ServiceControl;

class CallerAgent extends \Google\Model
{
/**
* Default value. Should not be used.
*/
public const AUTHORITY_AUTHORITY_TYPE_UNSPECIFIED = 'AUTHORITY_TYPE_UNSPECIFIED';
/**
* Acts under its own authority.
*/
public const AUTHORITY_SELF = 'SELF';
/**
* Acts on behalf of another authority.
*/
public const AUTHORITY_ON_BEHALF_OF = 'ON_BEHALF_OF';
/**
* The type of authority for the caller agent.
*
* @var string
*/
public $authority;

/**
* The type of authority for the caller agent.
*
* Accepted values: AUTHORITY_TYPE_UNSPECIFIED, SELF, ON_BEHALF_OF
*
* @param self::AUTHORITY_* $authority
*/
public function setAuthority($authority)
{
$this->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');
Loading