-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnnotationsClient.java
More file actions
181 lines (156 loc) · 7.96 KB
/
Copy pathAnnotationsClient.java
File metadata and controls
181 lines (156 loc) · 7.96 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
/**
* 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;
public class AnnotationsClient {
protected final ClientOptions clientOptions;
private final RawAnnotationsClient rawClient;
public AnnotationsClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.rawClient = new RawAnnotationsClient(clientOptions);
}
/**
* Get responses with HTTP metadata like headers
*/
public RawAnnotationsClient 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 DocAnnotationsListAll200Response listAll(String docId, String layerName) {
return this.rawClient.listAll(docId, layerName).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 DocAnnotationsListAll200Response listAll(String docId, String layerName, RequestOptions requestOptions) {
return this.rawClient.listAll(docId, layerName, requestOptions).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 DocAnnotationsListAll200Response listAll(String docId, String layerName, ListAllAnnotationsRequest request) {
return this.rawClient.listAll(docId, layerName, request).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 DocAnnotationsListAll200Response listAll(
String docId, String layerName, ListAllAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient.listAll(docId, layerName, request, requestOptions).body();
}
public DocAnnotationsList200Response list(String docId, String layerName, int pon) {
return this.rawClient.list(docId, layerName, pon).body();
}
public DocAnnotationsList200Response list(String docId, String layerName, int pon, RequestOptions requestOptions) {
return this.rawClient.list(docId, layerName, pon, requestOptions).body();
}
public DocAnnotationsList200Response list(String docId, String layerName, int pon, ListAnnotationsRequest request) {
return this.rawClient.list(docId, layerName, pon, request).body();
}
public DocAnnotationsList200Response list(
String docId, String layerName, int pon, ListAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient
.list(docId, layerName, pon, request, requestOptions)
.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 DocAnnotationsCreate200Response create(String docId, String layerName, int pon, Map<String, Object> body) {
return this.rawClient.create(docId, layerName, pon, body).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 DocAnnotationsCreate200Response create(
String docId, String layerName, int pon, Map<String, Object> body, RequestOptions requestOptions) {
return this.rawClient
.create(docId, layerName, pon, body, requestOptions)
.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 DocAnnotationsCreate200Response create(
String docId, String layerName, int pon, CreateAnnotationsRequest request) {
return this.rawClient.create(docId, layerName, pon, request).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 DocAnnotationsCreate200Response create(
String docId, String layerName, int pon, CreateAnnotationsRequest request, RequestOptions requestOptions) {
return this.rawClient
.create(docId, layerName, pon, request, requestOptions)
.body();
}
public DocAnnotationsDelete200Response delete(String docId, String layerName, int pon, String annotKey) {
return this.rawClient.delete(docId, layerName, pon, annotKey).body();
}
public DocAnnotationsDelete200Response delete(
String docId, String layerName, int pon, String annotKey, RequestOptions requestOptions) {
return this.rawClient
.delete(docId, layerName, pon, annotKey, requestOptions)
.body();
}
public DocAnnotationsDelete200Response delete(
String docId, String layerName, int pon, String annotKey, DeleteAnnotationsRequest request) {
return this.rawClient.delete(docId, layerName, pon, annotKey, request).body();
}
public DocAnnotationsDelete200Response delete(
String docId,
String layerName,
int pon,
String annotKey,
DeleteAnnotationsRequest request,
RequestOptions requestOptions) {
return this.rawClient
.delete(docId, layerName, pon, annotKey, request, requestOptions)
.body();
}
public DocAnnotationsUpdate200Response update(
String docId, String layerName, int pon, String annotKey, Map<String, Object> body) {
return this.rawClient.update(docId, layerName, pon, annotKey, body).body();
}
public 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)
.body();
}
public DocAnnotationsUpdate200Response update(
String docId, String layerName, int pon, String annotKey, UpdateAnnotationsRequest request) {
return this.rawClient.update(docId, layerName, pon, annotKey, request).body();
}
public DocAnnotationsUpdate200Response update(
String docId,
String layerName,
int pon,
String annotKey,
UpdateAnnotationsRequest request,
RequestOptions requestOptions) {
return this.rawClient
.update(docId, layerName, pon, annotKey, request, requestOptions)
.body();
}
}