-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsyncAnnotationsClient.java
More file actions
188 lines (163 loc) · 9.1 KB
/
Copy pathAsyncAnnotationsClient.java
File metadata and controls
188 lines (163 loc) · 9.1 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.cloudpdf.api.resources.doc.annotations;
import com.cloudpdf.api.core.ClientOptions;
import com.cloudpdf.api.core.RequestOptions;
import com.cloudpdf.api.resources.doc.annotations.requests.CreateAnnotationsRequest;
import com.cloudpdf.api.resources.doc.annotations.requests.DeleteAnnotationsRequest;
import com.cloudpdf.api.resources.doc.annotations.requests.ListAllAnnotationsRequest;
import com.cloudpdf.api.resources.doc.annotations.requests.ListAnnotationsRequest;
import com.cloudpdf.api.resources.doc.annotations.requests.UpdateAnnotationsRequest;
import com.cloudpdf.api.types.DocAnnotationsCreate200Response;
import com.cloudpdf.api.types.DocAnnotationsDelete200Response;
import com.cloudpdf.api.types.DocAnnotationsList200Response;
import com.cloudpdf.api.types.DocAnnotationsListAll200Response;
import com.cloudpdf.api.types.DocAnnotationsUpdate200Response;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
public class AsyncAnnotationsClient {
protected final ClientOptions clientOptions;
private final AsyncRawAnnotationsClient rawClient;
public AsyncAnnotationsClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.rawClient = new AsyncRawAnnotationsClient(clientOptions);
}
/**
* Get responses with HTTP metadata like headers
*/
public AsyncRawAnnotationsClient withRawResponse() {
return this.rawClient;
}
/**
* Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by <code>pageState.pageObjectNumber</code> when display order matters.
*/
public CompletableFuture<DocAnnotationsListAll200Response> listAll(String docId, String layerName) {
return this.rawClient.listAll(docId, layerName).thenApply(response -> response.body());
}
/**
* Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by <code>pageState.pageObjectNumber</code> when display order matters.
*/
public CompletableFuture<DocAnnotationsListAll200Response> listAll(
String docId, String layerName, RequestOptions requestOptions) {
return this.rawClient.listAll(docId, layerName, requestOptions).thenApply(response -> response.body());
}
/**
* Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by <code>pageState.pageObjectNumber</code> when display order matters.
*/
public CompletableFuture<DocAnnotationsListAll200Response> listAll(
String docId, String layerName, ListAllAnnotationsRequest request) {
return this.rawClient.listAll(docId, layerName, request).thenApply(response -> response.body());
}
/**
* Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by <code>pageState.pageObjectNumber</code> when display order matters.
*/
public CompletableFuture<DocAnnotationsListAll200Response> listAll(
String docId, String layerName, ListAllAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient.listAll(docId, layerName, request, requestOptions).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsList200Response> list(String docId, String layerName, int pon) {
return this.rawClient.list(docId, layerName, pon).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsList200Response> list(
String docId, String layerName, int pon, RequestOptions requestOptions) {
return this.rawClient.list(docId, layerName, pon, requestOptions).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsList200Response> list(
String docId, String layerName, int pon, ListAnnotationsRequest request) {
return this.rawClient.list(docId, layerName, pon, request).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsList200Response> list(
String docId, String layerName, int pon, ListAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient
.list(docId, layerName, pon, request, requestOptions)
.thenApply(response -> response.body());
}
/**
* Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.
*/
public CompletableFuture<DocAnnotationsCreate200Response> create(
String docId, String layerName, int pon, Map<String, Object> body) {
return this.rawClient.create(docId, layerName, pon, body).thenApply(response -> response.body());
}
/**
* Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.
*/
public CompletableFuture<DocAnnotationsCreate200Response> create(
String docId, String layerName, int pon, Map<String, Object> body, RequestOptions requestOptions) {
return this.rawClient
.create(docId, layerName, pon, body, requestOptions)
.thenApply(response -> response.body());
}
/**
* Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.
*/
public CompletableFuture<DocAnnotationsCreate200Response> create(
String docId, String layerName, int pon, CreateAnnotationsRequest request) {
return this.rawClient.create(docId, layerName, pon, request).thenApply(response -> response.body());
}
/**
* Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.
*/
public CompletableFuture<DocAnnotationsCreate200Response> create(
String docId, String layerName, int pon, CreateAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient
.create(docId, layerName, pon, request, requestOptions)
.thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsDelete200Response> delete(
String docId, String layerName, int pon, String annotKey) {
return this.rawClient.delete(docId, layerName, pon, annotKey).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsDelete200Response> delete(
String docId, String layerName, int pon, String annotKey, RequestOptions requestOptions) {
return this.rawClient
.delete(docId, layerName, pon, annotKey, requestOptions)
.thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsDelete200Response> delete(
String docId, String layerName, int pon, String annotKey, DeleteAnnotationsRequest request) {
return this.rawClient.delete(docId, layerName, pon, annotKey, request).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsDelete200Response> delete(
String docId,
String layerName,
int pon,
String annotKey,
DeleteAnnotationsRequest request,
RequestOptions requestOptions) {
return this.rawClient
.delete(docId, layerName, pon, annotKey, request, requestOptions)
.thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsUpdate200Response> update(
String docId, String layerName, int pon, String annotKey, Map<String, Object> body) {
return this.rawClient.update(docId, layerName, pon, annotKey, body).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsUpdate200Response> update(
String docId,
String layerName,
int pon,
String annotKey,
Map<String, Object> body,
RequestOptions requestOptions) {
return this.rawClient
.update(docId, layerName, pon, annotKey, body, requestOptions)
.thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsUpdate200Response> update(
String docId, String layerName, int pon, String annotKey, UpdateAnnotationsRequest request) {
return this.rawClient.update(docId, layerName, pon, annotKey, request).thenApply(response -> response.body());
}
public CompletableFuture<DocAnnotationsUpdate200Response> update(
String docId,
String layerName,
int pon,
String annotKey,
UpdateAnnotationsRequest request,
RequestOptions requestOptions) {
return this.rawClient
.update(docId, layerName, pon, annotKey, request, requestOptions)
.thenApply(response -> response.body());
}
}