@Immutable public final class AttributeCreated extends AbstractThingEvent<AttributeCreated> implements ThingModifiedEvent<AttributeCreated>
Attribute was created.ThingEvent.JsonFieldsorg.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T>| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Name of the "Thing Attribute Created" event.
|
static String |
TYPE
Type of this event.
|
RESOURCE_TYPE, TYPE_PREFIX| Modifier and Type | Method and Description |
|---|---|
protected void |
appendPayloadAndBuild(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
Appends the event specific custom payload to the passed
jsonObjectBuilder. |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static AttributeCreated |
fromJson(org.eclipse.ditto.json.JsonObject jsonObject,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
AttributeCreated from a JSON object. |
static AttributeCreated |
fromJson(String jsonString,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
AttributeCreated from a JSON string. |
org.eclipse.ditto.json.JsonPointer |
getAttributePointer()
Returns the key of the attribute created.
|
org.eclipse.ditto.json.JsonValue |
getAttributeValue()
Returns the value of the attribute created.
|
Optional<org.eclipse.ditto.json.JsonValue> |
getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion) |
org.eclipse.ditto.json.JsonPointer |
getResourcePath() |
int |
hashCode() |
static AttributeCreated |
of(String thingId,
org.eclipse.ditto.json.JsonPointer attributePointer,
org.eclipse.ditto.json.JsonValue attributeValue,
long revision,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Constructs a new
AttributeCreated object. |
static AttributeCreated |
of(String thingId,
org.eclipse.ditto.json.JsonPointer attributePointer,
org.eclipse.ditto.json.JsonValue attributeValue,
long revision,
Instant timestamp,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Constructs a new
AttributeCreated object. |
AttributeCreated |
setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders) |
AttributeCreated |
setRevision(long revision) |
String |
toString() |
getDittoHeaders, getManifest, getRevision, getThingId, getTimestamp, getType, toJsonclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, getResourceType, getThingIdgetImplementedSchemaVersion, getRevision, getTimestamp, getType, toJsontoJson, toJson, toJsonString, toJsonStringgetLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonStringpublic static final String NAME
public static final String TYPE
public static AttributeCreated of(String thingId, org.eclipse.ditto.json.JsonPointer attributePointer, org.eclipse.ditto.json.JsonValue attributeValue, long revision, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
AttributeCreated object.thingId - the ID of the Thing with which this event is associated.attributePointer - the pointer of the attribute with which this event is associated.attributeValue - the value of the attribute with which this event is associated.revision - the revision of the Thing.dittoHeaders - the headers of the command which was the cause of this event.NullPointerException - if any argument is null.public static AttributeCreated of(String thingId, org.eclipse.ditto.json.JsonPointer attributePointer, org.eclipse.ditto.json.JsonValue attributeValue, long revision, @Nullable Instant timestamp, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
AttributeCreated object.thingId - the ID of the Thing with which this event is associated.attributePointer - the pointer of the attribute with which this event is associated.attributeValue - the value of the attribute with which this event is associated.revision - the revision of the Thing.timestamp - the timestamp of this event.dittoHeaders - the headers of the command which was the cause of this event.NullPointerException - if any argument but timestamp is null.public static AttributeCreated fromJson(String jsonString, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
AttributeCreated from a JSON string.jsonString - the JSON string of which a new AttributeCreated instance is to be deleted.dittoHeaders - the headers of the command which was the cause of this event.AttributeCreated which was deleted from the given JSON string.NullPointerException - if jsonString is null.org.eclipse.ditto.json.JsonParseException - if the passed in jsonString was not in the expected
'AttributeCreated' format.public static AttributeCreated fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
AttributeCreated from a JSON object.jsonObject - the JSON object from which a new AttributeCreated instance is to be created.dittoHeaders - the headers of the command which was the cause of this event.AttributeCreated which was created from the given JSON object.NullPointerException - if jsonObject is null.org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected
'AttributeCreated' format.public org.eclipse.ditto.json.JsonPointer getAttributePointer()
public org.eclipse.ditto.json.JsonValue getAttributeValue()
public Optional<org.eclipse.ditto.json.JsonValue> getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion)
getEntity in interface org.eclipse.ditto.signals.base.WithOptionalEntitypublic org.eclipse.ditto.json.JsonPointer getResourcePath()
getResourcePath in interface org.eclipse.ditto.signals.base.WithResourcepublic AttributeCreated setRevision(long revision)
setRevision in interface org.eclipse.ditto.signals.events.base.Event<AttributeCreated>public AttributeCreated setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
setDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<AttributeCreated>setDittoHeaders in interface ThingEvent<AttributeCreated>setDittoHeaders in interface ThingModifiedEvent<AttributeCreated>protected void appendPayloadAndBuild(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
AbstractThingEventjsonObjectBuilder.appendPayloadAndBuild in class AbstractThingEvent<AttributeCreated>jsonObjectBuilder - the JsonObjectBuilder to add the custom payload to.schemaVersion - the JsonSchemaVersion used in toJson().thePredicate - the predicate to evaluate when adding the payload.public int hashCode()
hashCode in class AbstractThingEvent<AttributeCreated>public boolean equals(@Nullable Object o)
equals in class AbstractThingEvent<AttributeCreated>protected boolean canEqual(@Nullable Object other)
canEqual in class AbstractThingEvent<AttributeCreated>public String toString()
toString in class AbstractThingEvent<AttributeCreated>Copyright © 2017–2019 Eclipse Foundation. All rights reserved.