EventContent Class
- java.
lang. Object - com.
azure. resourcemanager. containerregistry. models. EventContent
- com.
Implements
public final class EventContent
implements JsonSerializable<EventContent>
The content of the event request message.
Constructor Summary
Constructor | Description |
---|---|
EventContent() |
Creates an instance of Event |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
action()
Get the action property: The action that encompasses the provided event. |
Actor |
actor()
Get the actor property: The agent that initiated the event. |
static
Event |
fromJson(JsonReader jsonReader)
Reads an instance of Event |
String |
id()
Get the id property: The event ID. |
Request |
request()
Get the request property: The request that generated the event. |
Source |
source()
Get the source property: The registry node that generated the event. |
Target |
target()
Get the target property: The target of the event. |
Offset |
timestamp()
Get the timestamp property: The time at which the event occurred. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Event |
withAction(String action)
Set the action property: The action that encompasses the provided event. |
Event |
withActor(Actor actor)
Set the actor property: The agent that initiated the event. |
Event |
withId(String id)
Set the id property: The event ID. |
Event |
withRequest(Request request)
Set the request property: The request that generated the event. |
Event |
withSource(Source source)
Set the source property: The registry node that generated the event. |
Event |
withTarget(Target target)
Set the target property: The target of the event. |
Event |
withTimestamp(OffsetDateTime timestamp)
Set the timestamp property: The time at which the event occurred. |
Methods inherited from java.lang.Object
Constructor Details
EventContent
public EventContent()
Creates an instance of EventContent class.
Method Details
action
public String action()
Get the action property: The action that encompasses the provided event.
Returns:
actor
public Actor 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:
fromJson
public static EventContent fromJson(JsonReader jsonReader)
Reads an instance of EventContent from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: The event ID.
Returns:
request
public Request request()
Get the request property: The request that generated the event.
Returns:
source
public Source 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:
target
public Target target()
Get the target property: The target of the event.
Returns:
timestamp
public OffsetDateTime timestamp()
Get the timestamp property: The time at which the event occurred.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAction
public EventContent withAction(String action)
Set the action property: The action that encompasses the provided event.
Parameters:
Returns:
withActor
public EventContent withActor(Actor actor)
Set the actor property: The agent that initiated the event. For most situations, this could be from the authorization context of the request.
Parameters:
Returns:
withId
public EventContent withId(String id)
Set the id property: The event ID.
Parameters:
Returns:
withRequest
public EventContent withRequest(Request request)
Set the request property: The request that generated the event.
Parameters:
Returns:
withSource
public EventContent withSource(Source source)
Set the source property: The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
Parameters:
Returns:
withTarget
public EventContent withTarget(Target target)
Set the target property: The target of the event.
Parameters:
Returns:
withTimestamp
public EventContent withTimestamp(OffsetDateTime timestamp)
Set the timestamp property: The time at which the event occurred.
Parameters:
Returns:
Applies to
Azure SDK for Java