Class EventContent
java.lang.Object
com.azure.resourcemanager.containerregistry.models.EventContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EventContent>
public final class EventContent
extends Object
implements com.azure.json.JsonSerializable<EventContent>
The content of the event request message.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()Get the action property: The action that encompasses the provided event.actor()Get the actor property: The agent that initiated the event.static EventContentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of EventContent from the JsonReader.id()Get the id property: The event ID.request()Get the request property: The request that generated the event.source()Get the source property: The registry node that generated the event.target()Get the target property: The target of the event.Get the timestamp property: The time at which the event occurred.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAction(String action) Set the action property: The action that encompasses the provided event.Set the actor property: The agent that initiated the event.Set the id property: The event ID.withRequest(Request request) Set the request property: The request that generated the event.withSource(Source source) Set the source property: The registry node that generated the event.withTarget(Target target) Set the target property: The target of the event.withTimestamp(OffsetDateTime timestamp) Set the timestamp property: The time at which the event occurred.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
EventContent
public EventContent()Creates an instance of EventContent class.
-
-
Method Details
-
id
Get the id property: The event ID.- Returns:
- the id value.
-
withId
Set the id property: The event ID.- Parameters:
id- the id value to set.- Returns:
- the EventContent object itself.
-
timestamp
Get the timestamp property: The time at which the event occurred.- Returns:
- the timestamp value.
-
withTimestamp
Set the timestamp property: The time at which the event occurred.- Parameters:
timestamp- the timestamp value to set.- Returns:
- the EventContent object itself.
-
action
Get the action property: The action that encompasses the provided event.- Returns:
- the action value.
-
withAction
Set the action property: The action that encompasses the provided event.- Parameters:
action- the action value to set.- Returns:
- the EventContent object itself.
-
target
Get the target property: The target of the event.- Returns:
- the target value.
-
withTarget
Set the target property: The target of the event.- Parameters:
target- the target value to set.- Returns:
- the EventContent object itself.
-
request
Get the request property: The request that generated the event.- Returns:
- the request value.
-
withRequest
Set the request property: The request that generated the event.- Parameters:
request- the request value to set.- Returns:
- the EventContent object itself.
-
actor
Get the actor property: The agent that initiated the event. For most situations, this could be from the authorization context of the request.- Returns:
- the actor value.
-
withActor
Set the actor property: The agent that initiated the event. For most situations, this could be from the authorization context of the request.- Parameters:
actor- the actor value to set.- Returns:
- the EventContent object itself.
-
source
Get the source property: The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.- Returns:
- the source value.
-
withSource
Set the source property: The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.- Parameters:
source- the source value to set.- Returns:
- the EventContent object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<EventContent>- Throws:
IOException
-
fromJson
Reads an instance of EventContent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of EventContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the EventContent.
-