-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: deprecate old schema (#305)
- Loading branch information
1 parent
5723cb9
commit af71abc
Showing
5 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...main/java/com/crowdin/client/reports/model/PreTranslateAccuracyGenerateReportRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class PreTranslateAccuracyGenerateReportRequest extends GenerateReportRequest { | ||
private String name = "pre-translate-accuracy"; | ||
private Schema schema; | ||
|
||
@Data | ||
public static class Schema { | ||
private Unit unit = Unit.WORDS; | ||
private ReportsFormat format = ReportsFormat.XLSX; | ||
private List<String> postEditingCategories; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class GeneralSchema extends Schema { | ||
private String languageId; | ||
private Date dateFrom; | ||
private Date dateTo; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class ByTaskSchema extends Schema { | ||
private Long taskId; | ||
} | ||
|
||
} |
42 changes: 9 additions & 33 deletions
42
...in/java/com/crowdin/client/reports/model/PreTranslateEfficiencyGenerateReportRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,12 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class PreTranslateEfficiencyGenerateReportRequest extends GenerateReportRequest { | ||
private String name = "pre-translate-efficiency"; | ||
private Schema schema; | ||
|
||
@Data | ||
public static class Schema { | ||
private Unit unit = Unit.WORDS; | ||
private ReportsFormat format = ReportsFormat.XLSX; | ||
private List<String> postEditingCategories; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class GeneralSchema extends Schema { | ||
private String languageId; | ||
private Date dateFrom; | ||
private Date dateTo; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class ByTaskSchema extends Schema { | ||
private Long taskId; | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link PreTranslateAccuracyGenerateReportRequest} instead | ||
*/ | ||
@Deprecated | ||
public class PreTranslateEfficiencyGenerateReportRequest extends PreTranslateAccuracyGenerateReportRequest { | ||
public PreTranslateEfficiencyGenerateReportRequest() { | ||
super(); | ||
this.setName("pre-translate-efficiency"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...generatePreTranslateEfficiencyReport.json → ...s/generatePreTranslateAccuracyReport.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters