/** * Creates a new {@code SudoRetrieveThing}. * * @param thingId the ID of the Thing to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving a Thing without authorization. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThing of(final String thingId, final DittoHeaders dittoHeaders) { return of(thingId, null, dittoHeaders); }
/** * Creates a new {@code SudoRetrieveThings}. * * @param thingIds one or more Thing IDs to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving Things without authorization. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThings of(final List<String> thingIds, final DittoHeaders dittoHeaders) { return of(thingIds, null, dittoHeaders); }
/** * Creates a new instance of {@code SudoRetrieveThingResponse}. * * @param thing the retrieved Thing. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThingResponse of(final JsonObject thing, final DittoHeaders dittoHeaders) { return new SudoRetrieveThingResponse(HttpStatusCode.OK, thing, dittoHeaders); }
@Override public SudoRetrieveThingsResponse setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thingsPlainJson, dittoHeaders); }
@Override public SudoRetrieveThingResponse setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thing, dittoHeaders); }
/** * Creates a new {@code SudoRetrieveThing}. The returned thing is serialized using its original schema version. * * @param thingId the ID of the Thing to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving a Thing without authorization. * @throws NullPointerException if any argument is {@code null} except the {@code selectedFields}. */ public static SudoRetrieveThing withOriginalSchemaVersion(final String thingId, final DittoHeaders dittoHeaders) { return new SudoRetrieveThing(thingId, null, dittoHeaders, true); }
/** * Creates a new instance of {@code SudoRetrieveThingsResponse}. * * @param thingsPlainJson the retrieved Things. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThingsResponse of(final String thingsPlainJson, final DittoHeaders dittoHeaders) { return new SudoRetrieveThingsResponse(HttpStatusCode.OK, null, thingsPlainJson, dittoHeaders); }
@Override public JsonValue getEntity(final JsonSchemaVersion schemaVersion) { return lazyLoadThingsJsonArray(); }
/** * Creates a new {@code SudoRetrieveThing}. * * @param thingId the ID of the Thing to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving a Thing without authorization. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThing of(final String thingId, final DittoHeaders dittoHeaders) { return of(thingId, null, dittoHeaders); }
@Override public SudoRetrieveThingsResponse setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thingsPlainJson, dittoHeaders); }
@Override public SudoRetrieveThingResponse setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thing, dittoHeaders); }
@Override public SudoRetrieveThings setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thingIds, selectedFields, dittoHeaders); }
/** * Creates a new {@code SudoRetrieveThing}. The returned thing is serialized using its original schema version. * * @param thingId the ID of the Thing to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving a Thing without authorization. * @throws NullPointerException if any argument is {@code null} except the {@code selectedFields}. */ public static SudoRetrieveThing withOriginalSchemaVersion(final String thingId, final DittoHeaders dittoHeaders) { return new SudoRetrieveThing(thingId, null, dittoHeaders, true); }
/** * Creates a new instance of {@code SudoRetrieveThingResponse}. * * @param thing the retrieved Thing. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThingResponse of(final JsonObject thing, final DittoHeaders dittoHeaders) { return new SudoRetrieveThingResponse(HttpStatusCode.OK, thing, dittoHeaders); }
/** * Creates a new instance of {@code SudoRetrieveThingsResponse}. * * @param thingsPlainJson the retrieved Things. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThingsResponse of(final String thingsPlainJson, final DittoHeaders dittoHeaders) { return new SudoRetrieveThingsResponse(HttpStatusCode.OK, null, thingsPlainJson, dittoHeaders); }
@Override public JsonValue getEntity(final JsonSchemaVersion schemaVersion) { return lazyLoadThingsJsonArray(); }
/** * Creates a new {@code SudoRetrieveThings}. * * @param thingIds one or more Thing IDs to be retrieved. * @param dittoHeaders the command headers of the request. * @return a command for retrieving Things without authorization. * @throws NullPointerException if any argument is {@code null}. */ public static SudoRetrieveThings of(final List<String> thingIds, final DittoHeaders dittoHeaders) { return of(thingIds, null, dittoHeaders); }
@Override public SudoRetrieveThing setDittoHeaders(final DittoHeaders dittoHeaders) { return new SudoRetrieveThing(thingId, selectedFields, dittoHeaders, useOriginalSchemaVersion); }
@Override public SudoRetrieveThings setDittoHeaders(final DittoHeaders dittoHeaders) { return of(thingIds, selectedFields, dittoHeaders); }
@Override public SudoRetrieveThing setDittoHeaders(final DittoHeaders dittoHeaders) { return new SudoRetrieveThing(thingId, selectedFields, dittoHeaders, useOriginalSchemaVersion); }