@@ -48,7 +48,9 @@ class CompareData implements ModelBase {
4848 /// Gets or sets the path to document to compare at the server.
4949 String ? _comparingWithDocument;
5050
51+ @Deprecated ('This field is deprecated and used only for backward compatibility. Please use FileReference instead.' )
5152 String ? get comparingWithDocument => _comparingWithDocument;
53+ @Deprecated ('This field is deprecated and used only for backward compatibility. Please use FileReference instead.' )
5254 set comparingWithDocument (String ? val) => _comparingWithDocument = val;
5355
5456
@@ -59,6 +61,13 @@ class CompareData implements ModelBase {
5961 set dateTime (DateTime ? val) => _dateTime = val;
6062
6163
64+ /// Gets or sets the file reference.
65+ FileReference ? _fileReference;
66+
67+ FileReference ? get fileReference => _fileReference;
68+ set fileReference (FileReference ? val) => _fileReference = val;
69+
70+
6271 /// Gets or sets the result document format.
6372 String ? _resultDocumentFormat;
6473
@@ -96,6 +105,12 @@ class CompareData implements ModelBase {
96105 dateTime = null ;
97106 }
98107
108+ if (json.containsKey ('FileReference' )) {
109+ throw ApiException (400 , 'File content is not supported for deserialization.' );
110+ } else {
111+ fileReference = null ;
112+ }
113+
99114 if (json.containsKey ('ResultDocumentFormat' )) {
100115 resultDocumentFormat = json['ResultDocumentFormat' ] as String ;
101116 } else {
@@ -122,6 +137,10 @@ class CompareData implements ModelBase {
122137 _result['DateTime' ] = dateTime! .toIso8601String ();
123138 }
124139
140+ if (fileReference != null ) {
141+ _result['FileReference' ] = fileReference! .serialize ();
142+ }
143+
125144 if (resultDocumentFormat != null ) {
126145 _result['ResultDocumentFormat' ] = resultDocumentFormat! ;
127146 }
@@ -130,6 +149,12 @@ class CompareData implements ModelBase {
130149
131150 @override
132151 void getFilesContent (List <FileReference > resultFilesContent) {
152+ if (fileReference != null )
153+ {
154+ fileReference! .getFilesContent (resultFilesContent);
155+ }
156+
157+
133158 }
134159
135160 @override
@@ -138,16 +163,20 @@ class CompareData implements ModelBase {
138163 {
139164 throw new ApiException (400 , 'Property Author in CompareData is required.' );
140165 }
141- if (comparingWithDocument == null )
166+ if (fileReference == null )
142167 {
143- throw new ApiException (400 , 'Property ComparingWithDocument in CompareData is required.' );
168+ throw new ApiException (400 , 'Property FileReference in CompareData is required.' );
144169 }
145170
146171 compareOptions? .validate ();
147172
148173
149174
150175
176+
177+ fileReference? .validate ();
178+
179+
151180 }
152181}
153182
0 commit comments