@Immutable public final class RetrieveThingsResponse extends org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse> implements ThingQueryCommandResponse<RetrieveThingsResponse>, org.eclipse.ditto.signals.commands.base.WithNamespace
RetrieveThings command.ThingCommandResponse.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 |
TYPE
Type of this response.
|
TYPE_PREFIX| Modifier and Type | Method and Description |
|---|---|
protected void |
appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate) |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static RetrieveThingsResponse |
fromJson(org.eclipse.ditto.json.JsonObject jsonObject,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a response to a
RetrieveThings command from a JSON object. |
static RetrieveThingsResponse |
fromJson(String jsonString,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a response to a
RetrieveThings command from a JSON string. |
org.eclipse.ditto.json.JsonValue |
getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion) |
Optional<String> |
getNamespace() |
org.eclipse.ditto.json.JsonPointer |
getResourcePath() |
String |
getThingId() |
List<org.eclipse.ditto.model.things.Thing> |
getThings()
Returns the retrieved Things.
|
int |
hashCode() |
static RetrieveThingsResponse |
of(org.eclipse.ditto.json.JsonArray things,
String namespace,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a response to a
RetrieveThings command. |
static RetrieveThingsResponse |
of(List<org.eclipse.ditto.model.things.Thing> things,
org.eclipse.ditto.json.JsonFieldSelector fieldSelector,
Predicate<org.eclipse.ditto.json.JsonField> predicate,
String namespace,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a response to a
RetrieveThings command. |
static RetrieveThingsResponse |
of(List<org.eclipse.ditto.model.things.Thing> things,
Predicate<org.eclipse.ditto.json.JsonField> predicate,
String namespace,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a response to a
RetrieveThings command. |
RetrieveThingsResponse |
setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders) |
RetrieveThingsResponse |
setEntity(org.eclipse.ditto.json.JsonValue entity) |
String |
toString() |
getDittoHeaders, getManifest, getStatusCode, getType, toJsonclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, getResourceTypegetImplementedSchemaVersion, getStatusCode, getStatusCodeValue, toJson, toJsontoJson, toJsonString, toJsonStringgetLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonStringpublic static final String TYPE
public static RetrieveThingsResponse of(org.eclipse.ditto.json.JsonArray things, @Nullable String namespace, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings command.things - the retrieved Things.namespace - the namespace of this search requestdittoHeaders - the headers of the preceding command.NullPointerException - if any argument is null.public static RetrieveThingsResponse of(List<org.eclipse.ditto.model.things.Thing> things, Predicate<org.eclipse.ditto.json.JsonField> predicate, @Nullable String namespace, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings command.things - the retrieved Things.predicate - the predicate to apply to the things when transforming to JSON.namespace - the namespace of this search requestdittoHeaders - the headers of the preceding command.NullPointerException - if any argument is null.public static RetrieveThingsResponse of(List<org.eclipse.ditto.model.things.Thing> things, org.eclipse.ditto.json.JsonFieldSelector fieldSelector, Predicate<org.eclipse.ditto.json.JsonField> predicate, @Nullable String namespace, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings command.things - the retrieved Things.fieldSelector - the JsonFieldSelector to apply to the passed things when transforming to JSON.predicate - the predicate to apply to the things when transforming to JSON.namespace - the namespace of this retrieve things requestdittoHeaders - the headers of the preceding command.NullPointerException - if any argument is null.public static RetrieveThingsResponse fromJson(String jsonString, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings command from a JSON string.jsonString - the JSON string of which the response is to be created.dittoHeaders - the headers of the preceding command.NullPointerException - if jsonString is null.IllegalArgumentException - if jsonString is empty.org.eclipse.ditto.json.JsonParseException - if the passed in jsonString was not in the expected
format.public static RetrieveThingsResponse fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings command from a JSON object.jsonObject - the JSON object of which the response is to be created.dittoHeaders - the headers of the preceding command.NullPointerException - if jsonObject is null.org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected
format.public String getThingId()
getThingId in interface org.eclipse.ditto.signals.base.WithThingIdpublic Optional<String> getNamespace()
getNamespace in interface org.eclipse.ditto.signals.commands.base.WithNamespacepublic List<org.eclipse.ditto.model.things.Thing> getThings()
public org.eclipse.ditto.json.JsonValue getEntity(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion)
getEntity in interface org.eclipse.ditto.signals.commands.base.WithEntity<RetrieveThingsResponse>public RetrieveThingsResponse setEntity(org.eclipse.ditto.json.JsonValue entity)
setEntity in interface org.eclipse.ditto.signals.commands.base.WithEntity<RetrieveThingsResponse>setEntity in interface ThingQueryCommandResponse<RetrieveThingsResponse>public RetrieveThingsResponse setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
setDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<RetrieveThingsResponse>setDittoHeaders in interface org.eclipse.ditto.signals.commands.base.CommandResponse<RetrieveThingsResponse>setDittoHeaders in interface ThingQueryCommandResponse<RetrieveThingsResponse>setDittoHeaders in interface ThingCommandResponse<RetrieveThingsResponse>public org.eclipse.ditto.json.JsonPointer getResourcePath()
getResourcePath in interface org.eclipse.ditto.signals.base.WithResourceprotected void appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
appendPayload in class org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse>protected boolean canEqual(@Nullable Object other)
canEqual in class org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse>public boolean equals(@Nullable Object o)
equals in class org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse>public int hashCode()
hashCode in class org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse>public String toString()
toString in class org.eclipse.ditto.signals.commands.base.AbstractCommandResponse<RetrieveThingsResponse>Copyright © 2017–2018 Eclipse Foundation. All rights reserved.