class ClientDetailResponseV2 {

  public static ClientDetailResponseV2 fromClient(Client client) {
    Optional<ApiDate> lastSeen = Optional.ofNullable(client.getLastSeen());

    return new AutoValue_ClientDetailResponseV2(
        client.getName(),
        client.getDescription(),
        nullToEmpty(client.getSpiffeId()),
        client.getCreatedAt().toEpochSecond(),
        client.getUpdatedAt().toEpochSecond(),
        client.getCreatedBy(),
        client.getUpdatedBy(),
        lastSeen.map(ApiDate::toEpochSecond)
    );
  }

    ClientDetailResponseV2();

}