Class Event
- java.lang.Object
-
- com.amazonaws.services.cloudtrail.model.Event
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Event extends Object implements Serializable, Cloneable
Contains information about an event that was returned by a lookup request. The result includes a representation of a CloudTrail event.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Event()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Eventclone()booleanequals(Object obj)StringgetCloudTrailEvent()A JSON string that contains a representation of the event returned.StringgetEventId()The CloudTrail ID of the event returned.StringgetEventName()The name of the event returned.DategetEventTime()The date and time of the event returned.List<Resource>getResources()A list of resources referenced by the event returned.StringgetUsername()A user name or role name of the requester that called the API in the event returned.inthashCode()voidsetCloudTrailEvent(String cloudTrailEvent)A JSON string that contains a representation of the event returned.voidsetEventId(String eventId)The CloudTrail ID of the event returned.voidsetEventName(String eventName)The name of the event returned.voidsetEventTime(Date eventTime)The date and time of the event returned.voidsetResources(Collection<Resource> resources)A list of resources referenced by the event returned.voidsetUsername(String username)A user name or role name of the requester that called the API in the event returned.StringtoString()Returns a string representation of this object; useful for testing and debugging.EventwithCloudTrailEvent(String cloudTrailEvent)A JSON string that contains a representation of the event returned.EventwithEventId(String eventId)The CloudTrail ID of the event returned.EventwithEventName(String eventName)The name of the event returned.EventwithEventTime(Date eventTime)The date and time of the event returned.EventwithResources(Resource... resources)A list of resources referenced by the event returned.EventwithResources(Collection<Resource> resources)A list of resources referenced by the event returned.EventwithUsername(String username)A user name or role name of the requester that called the API in the event returned.
-
-
-
Method Detail
-
setEventId
public void setEventId(String eventId)
The CloudTrail ID of the event returned.
- Parameters:
eventId- The CloudTrail ID of the event returned.
-
getEventId
public String getEventId()
The CloudTrail ID of the event returned.
- Returns:
- The CloudTrail ID of the event returned.
-
withEventId
public Event withEventId(String eventId)
The CloudTrail ID of the event returned.
- Parameters:
eventId- The CloudTrail ID of the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEventName
public void setEventName(String eventName)
The name of the event returned.
- Parameters:
eventName- The name of the event returned.
-
getEventName
public String getEventName()
The name of the event returned.
- Returns:
- The name of the event returned.
-
withEventName
public Event withEventName(String eventName)
The name of the event returned.
- Parameters:
eventName- The name of the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEventTime
public void setEventTime(Date eventTime)
The date and time of the event returned.
- Parameters:
eventTime- The date and time of the event returned.
-
getEventTime
public Date getEventTime()
The date and time of the event returned.
- Returns:
- The date and time of the event returned.
-
withEventTime
public Event withEventTime(Date eventTime)
The date and time of the event returned.
- Parameters:
eventTime- The date and time of the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUsername
public void setUsername(String username)
A user name or role name of the requester that called the API in the event returned.
- Parameters:
username- A user name or role name of the requester that called the API in the event returned.
-
getUsername
public String getUsername()
A user name or role name of the requester that called the API in the event returned.
- Returns:
- A user name or role name of the requester that called the API in the event returned.
-
withUsername
public Event withUsername(String username)
A user name or role name of the requester that called the API in the event returned.
- Parameters:
username- A user name or role name of the requester that called the API in the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getResources
public List<Resource> getResources()
A list of resources referenced by the event returned.
- Returns:
- A list of resources referenced by the event returned.
-
setResources
public void setResources(Collection<Resource> resources)
A list of resources referenced by the event returned.
- Parameters:
resources- A list of resources referenced by the event returned.
-
withResources
public Event withResources(Resource... resources)
A list of resources referenced by the event returned.
NOTE: This method appends the values to the existing list (if any). Use
setResources(java.util.Collection)orwithResources(java.util.Collection)if you want to override the existing values.- Parameters:
resources- A list of resources referenced by the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withResources
public Event withResources(Collection<Resource> resources)
A list of resources referenced by the event returned.
- Parameters:
resources- A list of resources referenced by the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCloudTrailEvent
public void setCloudTrailEvent(String cloudTrailEvent)
A JSON string that contains a representation of the event returned.
- Parameters:
cloudTrailEvent- A JSON string that contains a representation of the event returned.
-
getCloudTrailEvent
public String getCloudTrailEvent()
A JSON string that contains a representation of the event returned.
- Returns:
- A JSON string that contains a representation of the event returned.
-
withCloudTrailEvent
public Event withCloudTrailEvent(String cloudTrailEvent)
A JSON string that contains a representation of the event returned.
- Parameters:
cloudTrailEvent- A JSON string that contains a representation of the event returned.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-