1212import java .lang .Override ;
1313import java .lang .String ;
1414import java .lang .SuppressWarnings ;
15+ import java .util .List ;
1516import java .util .Optional ;
1617
1718
1819public class DigestUpdate {
20+ /**
21+ * List of URLs for similar updates that are grouped together and rendered as a single update.
22+ */
23+ @ JsonInclude (Include .NON_ABSENT )
24+ @ JsonProperty ("urls" )
25+ private Optional <? extends List <String >> urls ;
26+
1927 /**
2028 * URL link to the content or document.
2129 */
@@ -53,16 +61,19 @@ public class DigestUpdate {
5361
5462 @ JsonCreator
5563 public DigestUpdate (
64+ @ JsonProperty ("urls" ) Optional <? extends List <String >> urls ,
5665 @ JsonProperty ("url" ) Optional <String > url ,
5766 @ JsonProperty ("title" ) Optional <String > title ,
5867 @ JsonProperty ("datasource" ) Optional <String > datasource ,
5968 @ JsonProperty ("summary" ) Optional <String > summary ,
6069 @ JsonProperty ("type" ) Optional <? extends UpdateType > type ) {
70+ Utils .checkNotNull (urls , "urls" );
6171 Utils .checkNotNull (url , "url" );
6272 Utils .checkNotNull (title , "title" );
6373 Utils .checkNotNull (datasource , "datasource" );
6474 Utils .checkNotNull (summary , "summary" );
6575 Utils .checkNotNull (type , "type" );
76+ this .urls = urls ;
6677 this .url = url ;
6778 this .title = title ;
6879 this .datasource = datasource ;
@@ -72,7 +83,16 @@ public DigestUpdate(
7283
7384 public DigestUpdate () {
7485 this (Optional .empty (), Optional .empty (), Optional .empty (),
75- Optional .empty (), Optional .empty ());
86+ Optional .empty (), Optional .empty (), Optional .empty ());
87+ }
88+
89+ /**
90+ * List of URLs for similar updates that are grouped together and rendered as a single update.
91+ */
92+ @ SuppressWarnings ("unchecked" )
93+ @ JsonIgnore
94+ public Optional <List <String >> urls () {
95+ return (Optional <List <String >>) urls ;
7696 }
7797
7898 /**
@@ -121,6 +141,25 @@ public static Builder builder() {
121141 }
122142
123143
144+ /**
145+ * List of URLs for similar updates that are grouped together and rendered as a single update.
146+ */
147+ public DigestUpdate withUrls (List <String > urls ) {
148+ Utils .checkNotNull (urls , "urls" );
149+ this .urls = Optional .ofNullable (urls );
150+ return this ;
151+ }
152+
153+
154+ /**
155+ * List of URLs for similar updates that are grouped together and rendered as a single update.
156+ */
157+ public DigestUpdate withUrls (Optional <? extends List <String >> urls ) {
158+ Utils .checkNotNull (urls , "urls" );
159+ this .urls = urls ;
160+ return this ;
161+ }
162+
124163 /**
125164 * URL link to the content or document.
126165 */
@@ -226,6 +265,7 @@ public boolean equals(java.lang.Object o) {
226265 }
227266 DigestUpdate other = (DigestUpdate ) o ;
228267 return
268+ Utils .enhancedDeepEquals (this .urls , other .urls ) &&
229269 Utils .enhancedDeepEquals (this .url , other .url ) &&
230270 Utils .enhancedDeepEquals (this .title , other .title ) &&
231271 Utils .enhancedDeepEquals (this .datasource , other .datasource ) &&
@@ -236,13 +276,14 @@ public boolean equals(java.lang.Object o) {
236276 @ Override
237277 public int hashCode () {
238278 return Utils .enhancedHash (
239- url , title , datasource ,
240- summary , type );
279+ urls , url , title ,
280+ datasource , summary , type );
241281 }
242282
243283 @ Override
244284 public String toString () {
245285 return Utils .toString (DigestUpdate .class ,
286+ "urls" , urls ,
246287 "url" , url ,
247288 "title" , title ,
248289 "datasource" , datasource ,
@@ -253,6 +294,8 @@ public String toString() {
253294 @ SuppressWarnings ("UnusedReturnValue" )
254295 public final static class Builder {
255296
297+ private Optional <? extends List <String >> urls = Optional .empty ();
298+
256299 private Optional <String > url = Optional .empty ();
257300
258301 private Optional <String > title = Optional .empty ();
@@ -268,6 +311,25 @@ private Builder() {
268311 }
269312
270313
314+ /**
315+ * List of URLs for similar updates that are grouped together and rendered as a single update.
316+ */
317+ public Builder urls (List <String > urls ) {
318+ Utils .checkNotNull (urls , "urls" );
319+ this .urls = Optional .ofNullable (urls );
320+ return this ;
321+ }
322+
323+ /**
324+ * List of URLs for similar updates that are grouped together and rendered as a single update.
325+ */
326+ public Builder urls (Optional <? extends List <String >> urls ) {
327+ Utils .checkNotNull (urls , "urls" );
328+ this .urls = urls ;
329+ return this ;
330+ }
331+
332+
271333 /**
272334 * URL link to the content or document.
273335 */
@@ -365,8 +427,8 @@ public Builder type(Optional<? extends UpdateType> type) {
365427 public DigestUpdate build () {
366428
367429 return new DigestUpdate (
368- url , title , datasource ,
369- summary , type );
430+ urls , url , title ,
431+ datasource , summary , type );
370432 }
371433
372434 }
0 commit comments