EventContent Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.EventContent

Implements

public final class EventContent
implements JsonSerializable<EventContent>

The content of the event request message.

Constructor Summary

Constructor Description
EventContent()

Creates an instance of EventContent class.

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 EventContent fromJson(JsonReader jsonReader)

Reads an instance of EventContent from the JsonReader.

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.

OffsetDateTime timestamp()

Get the timestamp property: The time at which the event occurred.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

EventContent withAction(String action)

Set the action property: The action that encompasses the provided event.

EventContent withActor(Actor actor)

Set the actor property: The agent that initiated the event.

EventContent withId(String id)

Set the id property: The event ID.

EventContent withRequest(Request request)

Set the request property: The request that generated the event.

EventContent withSource(Source source)

Set the source property: The registry node that generated the event.

EventContent withTarget(Target target)

Set the target property: The target of the event.

EventContent 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:

the action value.

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:

the actor value.

fromJson

public static EventContent fromJson(JsonReader jsonReader)

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.

id

public String id()

Get the id property: The event ID.

Returns:

the id value.

request

public Request request()

Get the request property: The request that generated the event.

Returns:

the request value.

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:

the source value.

target

public Target target()

Get the target property: The target of the event.

Returns:

the target value.

timestamp

public OffsetDateTime timestamp()

Get the timestamp property: The time at which the event occurred.

Returns:

the timestamp value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

action - the action value to set.

Returns:

the EventContent object itself.

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:

actor - the actor value to set.

Returns:

the EventContent object itself.

withId

public EventContent withId(String id)

Set the id property: The event ID.

Parameters:

id - the id value to set.

Returns:

the EventContent object itself.

withRequest

public EventContent withRequest(Request request)

Set the request property: The request that generated the event.

Parameters:

request - the request value to set.

Returns:

the EventContent object itself.

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:

source - the source value to set.

Returns:

the EventContent object itself.

withTarget

public EventContent withTarget(Target target)

Set the target property: The target of the event.

Parameters:

target - the target value to set.

Returns:

the EventContent object itself.

withTimestamp

public EventContent withTimestamp(OffsetDateTime timestamp)

Set the timestamp property: The time at which the event occurred.

Parameters:

timestamp - the timestamp value to set.

Returns:

the EventContent object itself.

Applies to