99import com .fasterxml .jackson .annotation .JsonInclude ;
1010import com .fasterxml .jackson .annotation .JsonProperty ;
1111import com .glean .api_client .glean_api_client .utils .Utils ;
12+ import java .lang .Long ;
1213import java .lang .Override ;
1314import java .lang .String ;
1415import java .lang .SuppressWarnings ;
@@ -63,6 +64,13 @@ public class ExportInfo {
6364 @ JsonProperty ("status" )
6465 private Optional <? extends ExportInfoStatus > status ;
6566
67+ /**
68+ * The size of the exported file in bytes
69+ */
70+ @ JsonInclude (Include .NON_ABSENT )
71+ @ JsonProperty ("exportSize" )
72+ private Optional <Long > exportSize ;
73+
6674 @ JsonCreator
6775 public ExportInfo (
6876 @ JsonProperty ("createdBy" ) Optional <? extends DlpPerson > createdBy ,
@@ -71,27 +79,30 @@ public ExportInfo(
7179 @ JsonProperty ("exportId" ) Optional <String > exportId ,
7280 @ JsonProperty ("fileName" ) Optional <String > fileName ,
7381 @ JsonProperty ("filter" ) Optional <? extends DlpFindingFilter > filter ,
74- @ JsonProperty ("status" ) Optional <? extends ExportInfoStatus > status ) {
82+ @ JsonProperty ("status" ) Optional <? extends ExportInfoStatus > status ,
83+ @ JsonProperty ("exportSize" ) Optional <Long > exportSize ) {
7584 Utils .checkNotNull (createdBy , "createdBy" );
7685 Utils .checkNotNull (startTime , "startTime" );
7786 Utils .checkNotNull (endTime , "endTime" );
7887 Utils .checkNotNull (exportId , "exportId" );
7988 Utils .checkNotNull (fileName , "fileName" );
8089 Utils .checkNotNull (filter , "filter" );
8190 Utils .checkNotNull (status , "status" );
91+ Utils .checkNotNull (exportSize , "exportSize" );
8292 this .createdBy = createdBy ;
8393 this .startTime = startTime ;
8494 this .endTime = endTime ;
8595 this .exportId = exportId ;
8696 this .fileName = fileName ;
8797 this .filter = filter ;
8898 this .status = status ;
99+ this .exportSize = exportSize ;
89100 }
90101
91102 public ExportInfo () {
92103 this (Optional .empty (), Optional .empty (), Optional .empty (),
93104 Optional .empty (), Optional .empty (), Optional .empty (),
94- Optional .empty ());
105+ Optional .empty (), Optional . empty () );
95106 }
96107
97108 /**
@@ -150,6 +161,14 @@ public Optional<ExportInfoStatus> status() {
150161 return (Optional <ExportInfoStatus >) status ;
151162 }
152163
164+ /**
165+ * The size of the exported file in bytes
166+ */
167+ @ JsonIgnore
168+ public Optional <Long > exportSize () {
169+ return exportSize ;
170+ }
171+
153172 public static Builder builder () {
154173 return new Builder ();
155174 }
@@ -282,6 +301,25 @@ public ExportInfo withStatus(Optional<? extends ExportInfoStatus> status) {
282301 return this ;
283302 }
284303
304+ /**
305+ * The size of the exported file in bytes
306+ */
307+ public ExportInfo withExportSize (long exportSize ) {
308+ Utils .checkNotNull (exportSize , "exportSize" );
309+ this .exportSize = Optional .ofNullable (exportSize );
310+ return this ;
311+ }
312+
313+
314+ /**
315+ * The size of the exported file in bytes
316+ */
317+ public ExportInfo withExportSize (Optional <Long > exportSize ) {
318+ Utils .checkNotNull (exportSize , "exportSize" );
319+ this .exportSize = exportSize ;
320+ return this ;
321+ }
322+
285323 @ Override
286324 public boolean equals (java .lang .Object o ) {
287325 if (this == o ) {
@@ -298,15 +336,16 @@ public boolean equals(java.lang.Object o) {
298336 Utils .enhancedDeepEquals (this .exportId , other .exportId ) &&
299337 Utils .enhancedDeepEquals (this .fileName , other .fileName ) &&
300338 Utils .enhancedDeepEquals (this .filter , other .filter ) &&
301- Utils .enhancedDeepEquals (this .status , other .status );
339+ Utils .enhancedDeepEquals (this .status , other .status ) &&
340+ Utils .enhancedDeepEquals (this .exportSize , other .exportSize );
302341 }
303342
304343 @ Override
305344 public int hashCode () {
306345 return Utils .enhancedHash (
307346 createdBy , startTime , endTime ,
308347 exportId , fileName , filter ,
309- status );
348+ status , exportSize );
310349 }
311350
312351 @ Override
@@ -318,7 +357,8 @@ public String toString() {
318357 "exportId" , exportId ,
319358 "fileName" , fileName ,
320359 "filter" , filter ,
321- "status" , status );
360+ "status" , status ,
361+ "exportSize" , exportSize );
322362 }
323363
324364 @ SuppressWarnings ("UnusedReturnValue" )
@@ -338,6 +378,8 @@ public final static class Builder {
338378
339379 private Optional <? extends ExportInfoStatus > status = Optional .empty ();
340380
381+ private Optional <Long > exportSize = Optional .empty ();
382+
341383 private Builder () {
342384 // force use of static builder() method
343385 }
@@ -469,12 +511,31 @@ public Builder status(Optional<? extends ExportInfoStatus> status) {
469511 return this ;
470512 }
471513
514+
515+ /**
516+ * The size of the exported file in bytes
517+ */
518+ public Builder exportSize (long exportSize ) {
519+ Utils .checkNotNull (exportSize , "exportSize" );
520+ this .exportSize = Optional .ofNullable (exportSize );
521+ return this ;
522+ }
523+
524+ /**
525+ * The size of the exported file in bytes
526+ */
527+ public Builder exportSize (Optional <Long > exportSize ) {
528+ Utils .checkNotNull (exportSize , "exportSize" );
529+ this .exportSize = exportSize ;
530+ return this ;
531+ }
532+
472533 public ExportInfo build () {
473534
474535 return new ExportInfo (
475536 createdBy , startTime , endTime ,
476537 exportId , fileName , filter ,
477- status );
538+ status , exportSize );
478539 }
479540
480541 }
0 commit comments