/** * Creates a response to a {@link RetrieveFeatureDefinition} command. * * @param thingId the Thing ID of the retrieved Feature Definition. * @param featureId the identifier of the Feature whose Definition was retrieved. * @param definition the retrieved FeatureDefinition. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if {@code thingId} did not comply to * {@link org.eclipse.ditto.model.things.Thing#ID_REGEX}. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveFeatureDefinitionResponse of(final String thingId, final String featureId, final FeatureDefinition definition, final DittoHeaders dittoHeaders) { checkNotNull(definition, "Definition"); return new RetrieveFeatureDefinitionResponse(thingId, featureId, definition.toJson(), dittoHeaders); }
/** * Creates a response to a {@link RetrieveFeatureDefinition} command. * * @param thingId the Thing ID of the retrieved Feature Definition. * @param featureId the identifier of the Feature whose Definition was retrieved. * @param definition the retrieved FeatureDefinition. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if {@code thingId} did not comply to * {@link org.eclipse.ditto.model.things.Thing#ID_REGEX}. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveFeatureDefinitionResponse of(final String thingId, final String featureId, final FeatureDefinition definition, final DittoHeaders dittoHeaders) { checkNotNull(definition, "Definition"); return new RetrieveFeatureDefinitionResponse(thingId, featureId, definition.toJson(), dittoHeaders); }