BuilderMessage (@NotNull String latestDownloadCommit, long decompressionSpeed, long deletionSpeed) { BuilderMessage.CommitAndDownloadStatistics.Builder downloadStatisticsBuilder = BuilderMessage.CommitAndDownloadStatistics.newBuilder(); downloadStatisticsBuilder.setCommit(latestDownloadCommit); downloadStatisticsBuilder.setDecompressionSpeed(decompressionSpeed); downloadStatisticsBuilder.setDeletionSpeed(deletionSpeed); BuilderMessage.Builder newBuilder = BuilderMessage.newBuilder(); newBuilder.setType(BuilderMessage.Type.SAVE_LATEST_DOWNLOAD_STATISTIC_MESSAGE); newBuilder.setCommitAndDownloadStatistics(downloadStatisticsBuilder.build()); return newBuilder.build(); }