/** * Returns a builder with a fluent API for an immutable {@code RetrieveThing} instance. * * @param thingId the ID of a single Thing to be retrieved by this command. * @param dittoHeaders the headers of the command. * @return the builder. * @throws NullPointerException if {@code dittoHeaders} is {@code null}. * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if the parsed thing ID did not comply to {@link * org.eclipse.ditto.model.things.Thing#ID_REGEX}. */ public static Builder getBuilder(final CharSequence thingId, final DittoHeaders dittoHeaders) { ThingIdValidator.getInstance().accept(thingId, dittoHeaders); return new Builder(thingId.toString(), checkNotNull(dittoHeaders, "command headers")); }
/** * Returns a builder with a fluent API for an immutable {@code RetrieveThing} instance. * * @param thingId the ID of a single Thing to be retrieved by this command. * @param dittoHeaders the headers of the command. * @return the builder. * @throws NullPointerException if {@code dittoHeaders} is {@code null}. * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if the parsed thing ID did not comply to {@link * org.eclipse.ditto.model.things.Thing#ID_REGEX}. */ public static Builder getBuilder(final CharSequence thingId, final DittoHeaders dittoHeaders) { ThingIdValidator.getInstance().accept(thingId, dittoHeaders); return new Builder(thingId.toString(), checkNotNull(dittoHeaders, "command headers")); }