forked from meilisearch/meilisearch-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExportRequest.java
More file actions
33 lines (30 loc) · 908 Bytes
/
ExportRequest.java
File metadata and controls
33 lines (30 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.meilisearch.sdk;
import java.util.Map;
import lombok.*;
import org.json.JSONObject;
@Builder
@AllArgsConstructor(access = AccessLevel.PACKAGE)
@NoArgsConstructor(access = AccessLevel.PACKAGE)
@Getter
@Setter
public class ExportRequest {
private String url;
private String apiKey;
private String payloadSize;
private Map<String, ExportIndexFilter> indexes;
/**
* Method that returns the JSON String of the ExportRequest
*
* @return JSON String of the ExportRequest query
*/
@Override
public String toString() {
JSONObject jsonObject =
new JSONObject()
.put("url", this.url)
.putOpt("apiKey", this.apiKey)
.putOpt("payloadSize", this.payloadSize)
.putOpt("indexes", this.indexes);
return jsonObject.toString();
}
}