class Result implements ImmutableBean, Serializable {

  public static <R> Result<R> failure(FailureReason reason, String message, Object... messageArgs) {
    String msg = Messages.format(message, messageArgs);
    return new Result<>(Failure.of(FailureItem.of(reason, msg, 1)));
  }

  private  Result(T value);
  private  Result(Failure failure);
  private  Result(
      T value,
      Failure failure);

}