55
66import com .fasterxml .jackson .annotation .JsonCreator ;
77import com .fasterxml .jackson .annotation .JsonIgnore ;
8- import com .fasterxml .jackson .annotation .JsonInclude .Include ;
9- import com .fasterxml .jackson .annotation .JsonInclude ;
108import com .fasterxml .jackson .annotation .JsonProperty ;
119import com .glean .api_client .glean_api_client .utils .Utils ;
1210import java .lang .Override ;
1311import java .lang .String ;
1412import java .util .List ;
15- import java .util .Optional ;
1613
1714
1815public class GetChatFilesRequest {
@@ -22,26 +19,11 @@ public class GetChatFilesRequest {
2219 @ JsonProperty ("fileIds" )
2320 private List <String > fileIds ;
2421
25- /**
26- * The ID of the chat that contains the chat file.
27- */
28- @ JsonInclude (Include .NON_ABSENT )
29- @ JsonProperty ("chatId" )
30- private Optional <String > chatId ;
31-
3222 @ JsonCreator
3323 public GetChatFilesRequest (
34- @ JsonProperty ("fileIds" ) List <String > fileIds ,
35- @ JsonProperty ("chatId" ) Optional <String > chatId ) {
24+ @ JsonProperty ("fileIds" ) List <String > fileIds ) {
3625 Utils .checkNotNull (fileIds , "fileIds" );
37- Utils .checkNotNull (chatId , "chatId" );
3826 this .fileIds = fileIds ;
39- this .chatId = chatId ;
40- }
41-
42- public GetChatFilesRequest (
43- List <String > fileIds ) {
44- this (fileIds , Optional .empty ());
4527 }
4628
4729 /**
@@ -52,14 +34,6 @@ public List<String> fileIds() {
5234 return fileIds ;
5335 }
5436
55- /**
56- * The ID of the chat that contains the chat file.
57- */
58- @ JsonIgnore
59- public Optional <String > chatId () {
60- return chatId ;
61- }
62-
6337 public static Builder builder () {
6438 return new Builder ();
6539 }
@@ -74,25 +48,6 @@ public GetChatFilesRequest withFileIds(List<String> fileIds) {
7448 return this ;
7549 }
7650
77- /**
78- * The ID of the chat that contains the chat file.
79- */
80- public GetChatFilesRequest withChatId (String chatId ) {
81- Utils .checkNotNull (chatId , "chatId" );
82- this .chatId = Optional .ofNullable (chatId );
83- return this ;
84- }
85-
86-
87- /**
88- * The ID of the chat that contains the chat file.
89- */
90- public GetChatFilesRequest withChatId (Optional <String > chatId ) {
91- Utils .checkNotNull (chatId , "chatId" );
92- this .chatId = chatId ;
93- return this ;
94- }
95-
9651 @ Override
9752 public boolean equals (java .lang .Object o ) {
9853 if (this == o ) {
@@ -103,30 +58,26 @@ public boolean equals(java.lang.Object o) {
10358 }
10459 GetChatFilesRequest other = (GetChatFilesRequest ) o ;
10560 return
106- Utils .enhancedDeepEquals (this .fileIds , other .fileIds ) &&
107- Utils .enhancedDeepEquals (this .chatId , other .chatId );
61+ Utils .enhancedDeepEquals (this .fileIds , other .fileIds );
10862 }
10963
11064 @ Override
11165 public int hashCode () {
11266 return Utils .enhancedHash (
113- fileIds , chatId );
67+ fileIds );
11468 }
11569
11670 @ Override
11771 public String toString () {
11872 return Utils .toString (GetChatFilesRequest .class ,
119- "fileIds" , fileIds ,
120- "chatId" , chatId );
73+ "fileIds" , fileIds );
12174 }
12275
12376 @ SuppressWarnings ("UnusedReturnValue" )
12477 public final static class Builder {
12578
12679 private List <String > fileIds ;
12780
128- private Optional <String > chatId = Optional .empty ();
129-
13081 private Builder () {
13182 // force use of static builder() method
13283 }
@@ -141,29 +92,10 @@ public Builder fileIds(List<String> fileIds) {
14192 return this ;
14293 }
14394
144-
145- /**
146- * The ID of the chat that contains the chat file.
147- */
148- public Builder chatId (String chatId ) {
149- Utils .checkNotNull (chatId , "chatId" );
150- this .chatId = Optional .ofNullable (chatId );
151- return this ;
152- }
153-
154- /**
155- * The ID of the chat that contains the chat file.
156- */
157- public Builder chatId (Optional <String > chatId ) {
158- Utils .checkNotNull (chatId , "chatId" );
159- this .chatId = chatId ;
160- return this ;
161- }
162-
16395 public GetChatFilesRequest build () {
16496
16597 return new GetChatFilesRequest (
166- fileIds , chatId );
98+ fileIds );
16799 }
168100
169101 }
0 commit comments