Class SudoRetrieveThingsResponse

java.lang.Object
org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>
org.eclipse.ditto.things.api.commands.sudo.SudoRetrieveThingsResponse
All Implemented Interfaces:
org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThingsResponse>, org.eclipse.ditto.base.model.headers.WithDittoHeaders, org.eclipse.ditto.base.model.headers.WithManifest, org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.base.model.signals.commands.CommandResponse<SudoRetrieveThingsResponse>, org.eclipse.ditto.base.model.signals.commands.WithEntity<SudoRetrieveThingsResponse>, org.eclipse.ditto.base.model.signals.commands.WithHttpStatus, org.eclipse.ditto.base.model.signals.Signal<SudoRetrieveThingsResponse>, org.eclipse.ditto.base.model.signals.WithName, org.eclipse.ditto.base.model.signals.WithResource, org.eclipse.ditto.base.model.signals.WithType, SudoCommandResponse<SudoRetrieveThingsResponse>

@Immutable @AllValuesAreNonnullByDefault public final class SudoRetrieveThingsResponse extends org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse> implements SudoCommandResponse<SudoRetrieveThingsResponse>
Response to a SudoRetrieveThings command.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.signals.commands.CommandResponse

    org.eclipse.ditto.base.model.signals.commands.CommandResponse.JsonFields

    Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

    org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T extends Object>

    Nested classes/interfaces inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommandResponse

    SudoCommandResponse.JsonFields
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the response.
    static final String
    Type of this command.

    Fields inherited from interface org.eclipse.ditto.base.model.signals.commands.CommandResponse

    TYPE_QUALIFIER

    Fields inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommandResponse

    TYPE_PREFIX
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
     
    protected boolean
     
    boolean
     
    fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThingsResponse from a JSON string.
    fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThingsResponse from a JSON object.
    org.eclipse.ditto.json.JsonValue
    getEntity(org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion)
     
    List<org.eclipse.ditto.things.model.Thing>
    Returns the Things.
    int
     
    of(String thingsPlainJson, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new instance of SudoRetrieveThingsResponse.
    of(List<String> thingsPlainJson, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a response to a SudoRetrieveThingsResponse command.
    of(List<org.eclipse.ditto.things.model.Thing> things, Predicate<org.eclipse.ditto.json.JsonField> predicate, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new instance of SudoRetrieveThingsResponse.
    of(List<org.eclipse.ditto.things.model.Thing> things, org.eclipse.ditto.json.JsonFieldSelector fieldSelector, Predicate<org.eclipse.ditto.json.JsonField> predicate, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new instance of SudoRetrieveThingsResponse.
    of(org.eclipse.ditto.json.JsonArray things, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new instance of SudoRetrieveThingsResponse.
    setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
     
    setEntity(org.eclipse.ditto.json.JsonValue entity)
     
     

    Methods inherited from class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse

    getDittoHeaders, getHttpStatus, getManifest, getType, toJson

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.CommandResponse

    getImplementedSchemaVersion, getResponseType, isOfExpectedResponseType, toJson, toJson

    Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

    getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString

    Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate

    toJson, toJsonString, toJsonString

    Methods inherited from interface org.eclipse.ditto.base.model.signals.Signal

    getName

    Methods inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommandResponse

    getResourcePath, getResourceType

    Methods inherited from interface org.eclipse.ditto.base.model.headers.WithDittoHeaders

    getDittoHeaders

    Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.WithEntity

    getEntity, getEntityPlainString

    Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.WithHttpStatus

    getHttpStatus

    Methods inherited from interface org.eclipse.ditto.base.model.headers.WithManifest

    getManifest

    Methods inherited from interface org.eclipse.ditto.base.model.signals.WithType

    getType
  • Field Details

  • Method Details

    • of

      public static SudoRetrieveThingsResponse of(String thingsPlainJson, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new instance of SudoRetrieveThingsResponse.
      Parameters:
      thingsPlainJson - the retrieved Things.
      dittoHeaders - the headers of the preceding command.
      Returns:
      the response.
      Throws:
      NullPointerException - if any argument is null.
    • of

      public static SudoRetrieveThingsResponse of(List<String> thingsPlainJson, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a response to a SudoRetrieveThingsResponse command.
      Parameters:
      thingsPlainJson - the retrieved Things.
      dittoHeaders - the headers of the preceding command.
      Returns:
      the response.
      Throws:
      NullPointerException - if any argument is null.
    • of

      public static SudoRetrieveThingsResponse of(org.eclipse.ditto.json.JsonArray things, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new instance of SudoRetrieveThingsResponse.
      Parameters:
      things - the retrieved Things.
      dittoHeaders - the headers of the preceding command.
      Returns:
      the response.
      Throws:
      NullPointerException - if any argument is null.
    • of

      public static SudoRetrieveThingsResponse of(List<org.eclipse.ditto.things.model.Thing> things, Predicate<org.eclipse.ditto.json.JsonField> predicate, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new instance of SudoRetrieveThingsResponse.
      Parameters:
      things - the Things.
      predicate - the predicate to apply to the things when transforming to JSON.
      dittoHeaders - the command headers of the request.
      Returns:
      a new SudoRetrieveThingsResponse object.
      Throws:
      NullPointerException - if any argument is null.
    • of

      public static SudoRetrieveThingsResponse of(List<org.eclipse.ditto.things.model.Thing> things, org.eclipse.ditto.json.JsonFieldSelector fieldSelector, Predicate<org.eclipse.ditto.json.JsonField> predicate, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new instance of SudoRetrieveThingsResponse.
      Parameters:
      things - the 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.
      dittoHeaders - the command headers of the request.
      Returns:
      a new SudoRetrieveThingsResponse object.
      Throws:
      NullPointerException - if any argument is null.
    • fromJson

      public static SudoRetrieveThingsResponse fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThingsResponse from a JSON string.
      Parameters:
      jsonString - the JSON string of which a new SudoRetrieveThingsResponse instance is to be created.
      dittoHeaders - the optional command headers of the request.
      Returns:
      the SudoRetrieveThingsResponse which was created from the given JSON string.
      Throws:
      NullPointerException - if dittoHeaders is null.
      org.eclipse.ditto.base.model.exceptions.DittoJsonException - if the passed in jsonString was null, empty or not in the expected 'SudoRetrieveThingsResponse' format.
    • fromJson

      public static SudoRetrieveThingsResponse fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThingsResponse from a JSON object.
      Parameters:
      jsonObject - the JSON object of which a new SudoRetrieveThingsResponse instance is to be created.
      dittoHeaders - the optional command headers of the request.
      Returns:
      the SudoRetrieveThingsResponse which was created from the given JSON object.
      Throws:
      NullPointerException - if any argument is null.
      org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected 'SudoRetrieveThingsResponse' format.
    • getThings

      public List<org.eclipse.ditto.things.model.Thing> getThings()
      Returns the Things.
      Returns:
      the Things.
    • getEntity

      public org.eclipse.ditto.json.JsonValue getEntity(org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion)
      Specified by:
      getEntity in interface org.eclipse.ditto.base.model.signals.commands.WithEntity<SudoRetrieveThingsResponse>
    • setEntity

      public SudoRetrieveThingsResponse setEntity(org.eclipse.ditto.json.JsonValue entity)
      Specified by:
      setEntity in interface SudoCommandResponse<SudoRetrieveThingsResponse>
      Specified by:
      setEntity in interface org.eclipse.ditto.base.model.signals.commands.WithEntity<SudoRetrieveThingsResponse>
    • setDittoHeaders

      public SudoRetrieveThingsResponse setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Specified by:
      setDittoHeaders in interface org.eclipse.ditto.base.model.signals.commands.CommandResponse<SudoRetrieveThingsResponse>
      Specified by:
      setDittoHeaders in interface org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThingsResponse>
      Specified by:
      setDittoHeaders in interface SudoCommandResponse<SudoRetrieveThingsResponse>
    • appendPayload

      protected void appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
      Specified by:
      appendPayload in class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.ditto.base.model.signals.commands.AbstractCommandResponse<SudoRetrieveThingsResponse>