Skip to content

Commit 648c932

Browse files
SDK regenerated by CI server [ci skip]
1 parent da71121 commit 648c932

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This repository contains Aspose.Words Cloud SDK for Java source code. This SDK a
1717

1818
- Added 'AttachmentsEmbeddingMode' property for PdfSaveOptionsData class.
1919
- Added 'UpdateAmbiguousTextFont' property for SaveOptionsData class.
20+
- Added 'Granularity' property for CompareOptions class.
2021

2122

2223
## Enhancements in Version 25.2

src/main/java/com/aspose/words/cloud/model/CompareOptions.java

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,52 @@
4848
*/
4949
@ApiModel(description = "DTO container with compare documents options.")
5050
public class CompareOptions implements ModelIfc {
51+
/**
52+
* Gets or sets the option indicating whether changes are tracked by character or by word.
53+
*/
54+
@JsonAdapter(GranularityEnum.Adapter.class)
55+
public enum GranularityEnum {
56+
CHARLEVEL("CharLevel"),
57+
WORDLEVEL("WordLevel");
58+
59+
private String value;
60+
61+
GranularityEnum(String value) {
62+
this.value = value;
63+
}
64+
65+
public String getValue() {
66+
return value;
67+
}
68+
69+
@Override
70+
public String toString() {
71+
return String.valueOf(value);
72+
}
73+
74+
public static GranularityEnum fromValue(String text) {
75+
for (GranularityEnum b : GranularityEnum.values()) {
76+
if (String.valueOf(b.value).equals(text)) {
77+
return b;
78+
}
79+
}
80+
return null;
81+
}
82+
83+
public static class Adapter extends TypeAdapter< GranularityEnum > {
84+
@Override
85+
public void write(final JsonWriter jsonWriter, final GranularityEnum enumeration) throws IOException {
86+
jsonWriter.value(enumeration.getValue());
87+
}
88+
89+
@Override
90+
public GranularityEnum read(final JsonReader jsonReader) throws IOException {
91+
String value = jsonReader.nextString();
92+
return GranularityEnum.fromValue(String.valueOf(value));
93+
}
94+
}
95+
}
96+
5197
/**
5298
* Gets or sets the option that controls which document shall be used as a target during comparison.
5399
*/
@@ -97,6 +143,9 @@ public TargetEnum read(final JsonReader jsonReader) throws IOException {
97143
@SerializedName("AcceptAllRevisionsBeforeComparison")
98144
protected Boolean acceptAllRevisionsBeforeComparison;
99145

146+
@SerializedName("Granularity")
147+
protected GranularityEnum granularity;
148+
100149
@SerializedName("IgnoreCaseChanges")
101150
protected Boolean ignoreCaseChanges;
102151

@@ -142,6 +191,25 @@ public void setAcceptAllRevisionsBeforeComparison(Boolean acceptAllRevisionsBefo
142191
}
143192

144193

194+
/**
195+
* Gets or sets the option indicating whether changes are tracked by character or by word.
196+
* @return granularity
197+
**/
198+
@ApiModelProperty(value = "Gets or sets the option indicating whether changes are tracked by character or by word.")
199+
public GranularityEnum getGranularity() {
200+
return granularity;
201+
}
202+
203+
public CompareOptions granularity(GranularityEnum granularity) {
204+
this.granularity = granularity;
205+
return this;
206+
}
207+
208+
public void setGranularity(GranularityEnum granularity) {
209+
this.granularity = granularity;
210+
}
211+
212+
145213
/**
146214
* Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
147215
* @return ignoreCaseChanges
@@ -315,6 +383,7 @@ public void setTarget(TargetEnum target) {
315383

316384
public CompareOptions() {
317385
this.acceptAllRevisionsBeforeComparison = null;
386+
this.granularity = null;
318387
this.ignoreCaseChanges = null;
319388
this.ignoreComments = null;
320389
this.ignoreFields = null;
@@ -356,6 +425,7 @@ public boolean equals(java.lang.Object o) {
356425
CompareOptions compareOptions = (CompareOptions) o;
357426
return
358427
Objects.equals(this.acceptAllRevisionsBeforeComparison, compareOptions.acceptAllRevisionsBeforeComparison) &&
428+
Objects.equals(this.granularity, compareOptions.granularity) &&
359429
Objects.equals(this.ignoreCaseChanges, compareOptions.ignoreCaseChanges) &&
360430
Objects.equals(this.ignoreComments, compareOptions.ignoreComments) &&
361431
Objects.equals(this.ignoreFields, compareOptions.ignoreFields) &&
@@ -369,14 +439,15 @@ public boolean equals(java.lang.Object o) {
369439

370440
@Override
371441
public int hashCode() {
372-
return Objects.hash(acceptAllRevisionsBeforeComparison, ignoreCaseChanges, ignoreComments, ignoreFields, ignoreFootnotes, ignoreFormatting, ignoreHeadersAndFooters, ignoreTables, ignoreTextboxes, target);
442+
return Objects.hash(acceptAllRevisionsBeforeComparison, granularity, ignoreCaseChanges, ignoreComments, ignoreFields, ignoreFootnotes, ignoreFormatting, ignoreHeadersAndFooters, ignoreTables, ignoreTextboxes, target);
373443
}
374444

375445
@Override
376446
public String toString() {
377447
StringBuilder sb = new StringBuilder();
378448
sb.append("class CompareOptions {\n");
379449
sb.append(" acceptAllRevisionsBeforeComparison: ").append(toIndentedString(getAcceptAllRevisionsBeforeComparison())).append("\n");
450+
sb.append(" granularity: ").append(toIndentedString(getGranularity())).append("\n");
380451
sb.append(" ignoreCaseChanges: ").append(toIndentedString(getIgnoreCaseChanges())).append("\n");
381452
sb.append(" ignoreComments: ").append(toIndentedString(getIgnoreComments())).append("\n");
382453
sb.append(" ignoreFields: ").append(toIndentedString(getIgnoreFields())).append("\n");

0 commit comments

Comments
 (0)