@@ -38,6 +38,13 @@ class CompareOptions implements ModelBase {
3838 set acceptAllRevisionsBeforeComparison (bool ? val) => _acceptAllRevisionsBeforeComparison = val;
3939
4040
41+ /// Gets or sets the option indicating whether changes are tracked by character or by word.
42+ CompareOptions_GranularityEnum ? _granularity;
43+
44+ CompareOptions_GranularityEnum ? get granularity => _granularity;
45+ set granularity (CompareOptions_GranularityEnum ? val) => _granularity = val;
46+
47+
4148 /// Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
4249 bool ? _ignoreCaseChanges;
4350
@@ -113,6 +120,16 @@ class CompareOptions implements ModelBase {
113120 acceptAllRevisionsBeforeComparison = null ;
114121 }
115122
123+ if (json.containsKey ('Granularity' )) {
124+ switch (json['Granularity' ] as String ) {
125+ case 'CharLevel' : granularity = CompareOptions_GranularityEnum .charLevel; break ;
126+ case 'WordLevel' : granularity = CompareOptions_GranularityEnum .wordLevel; break ;
127+ default : granularity = null ; break ;
128+ }
129+ } else {
130+ granularity = null ;
131+ }
132+
116133 if (json.containsKey ('IgnoreCaseChanges' )) {
117134 ignoreCaseChanges = json['IgnoreCaseChanges' ] as bool ;
118135 } else {
@@ -179,6 +196,14 @@ class CompareOptions implements ModelBase {
179196 _result['AcceptAllRevisionsBeforeComparison' ] = acceptAllRevisionsBeforeComparison! ;
180197 }
181198
199+ if (granularity != null ) {
200+ switch (granularity! ) {
201+ case CompareOptions_GranularityEnum .charLevel: _result['Granularity' ] = 'CharLevel' ; break ;
202+ case CompareOptions_GranularityEnum .wordLevel: _result['Granularity' ] = 'WordLevel' ; break ;
203+ default : break ;
204+ }
205+ }
206+
182207 if (ignoreCaseChanges != null ) {
183208 _result['IgnoreCaseChanges' ] = ignoreCaseChanges! ;
184209 }
@@ -230,6 +255,13 @@ class CompareOptions implements ModelBase {
230255 }
231256}
232257
258+ /// Gets or sets the option indicating whether changes are tracked by character or by word.
259+ enum CompareOptions_GranularityEnum
260+ {
261+ charLevel,
262+ wordLevel
263+ }
264+
233265/// Gets or sets the option that controls which document shall be used as a target during comparison.
234266enum CompareOptions_TargetEnum
235267{
0 commit comments