additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ExportAppearanceAnnotationsRequest other) {
+ documentPassword(other.getDocumentPassword());
+ body(other.getBody());
+ return this;
+ }
+
+ /**
+ * Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ public Builder documentPassword(Optional documentPassword) {
+ this.documentPassword = documentPassword;
+ return this;
+ }
+
+ public Builder documentPassword(String documentPassword) {
+ this.documentPassword = Optional.ofNullable(documentPassword);
+ return this;
+ }
+
+ @JsonSetter(value = "body", nulls = Nulls.SKIP)
+ public Builder body(Map body) {
+ this.body.clear();
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder putAllBody(Map body) {
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder body(String key, Object value) {
+ this.body.put(key, value);
+ return this;
+ }
+
+ public ExportAppearanceAnnotationsRequest build() {
+ return new ExportAppearanceAnnotationsRequest(documentPassword, body, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/resources/doc/annotations/requests/FlattenAnnotationsRequest.java b/src/main/java/api/resources/doc/annotations/requests/FlattenAnnotationsRequest.java
new file mode 100644
index 0000000..ca127a2
--- /dev/null
+++ b/src/main/java/api/resources/doc/annotations/requests/FlattenAnnotationsRequest.java
@@ -0,0 +1,145 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.resources.doc.annotations.requests;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = FlattenAnnotationsRequest.Builder.class)
+public final class FlattenAnnotationsRequest {
+ private final Optional documentPassword;
+
+ private final Map body;
+
+ private final Map additionalProperties;
+
+ private FlattenAnnotationsRequest(
+ Optional documentPassword, Map body, Map additionalProperties) {
+ this.documentPassword = documentPassword;
+ this.body = body;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ @JsonIgnore
+ public Optional getDocumentPassword() {
+ return documentPassword;
+ }
+
+ @JsonProperty("body")
+ public Map getBody() {
+ return body;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof FlattenAnnotationsRequest && equalTo((FlattenAnnotationsRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(FlattenAnnotationsRequest other) {
+ return documentPassword.equals(other.documentPassword) && body.equals(other.body);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.documentPassword, this.body);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional documentPassword = Optional.empty();
+
+ private Map body = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(FlattenAnnotationsRequest other) {
+ documentPassword(other.getDocumentPassword());
+ body(other.getBody());
+ return this;
+ }
+
+ /**
+ * Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ public Builder documentPassword(Optional documentPassword) {
+ this.documentPassword = documentPassword;
+ return this;
+ }
+
+ public Builder documentPassword(String documentPassword) {
+ this.documentPassword = Optional.ofNullable(documentPassword);
+ return this;
+ }
+
+ @JsonSetter(value = "body", nulls = Nulls.SKIP)
+ public Builder body(Map body) {
+ this.body.clear();
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder putAllBody(Map body) {
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder body(String key, Object value) {
+ this.body.put(key, value);
+ return this;
+ }
+
+ public FlattenAnnotationsRequest build() {
+ return new FlattenAnnotationsRequest(documentPassword, body, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/resources/doc/pages/AsyncPagesClient.java b/src/main/java/api/resources/doc/pages/AsyncPagesClient.java
index 4a48e5e..375961a 100644
--- a/src/main/java/api/resources/doc/pages/AsyncPagesClient.java
+++ b/src/main/java/api/resources/doc/pages/AsyncPagesClient.java
@@ -11,13 +11,17 @@
import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.MovePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest;
import com.cloudpdf.api.types.DocPagesDelete200Response;
import com.cloudpdf.api.types.DocPagesFlatten200Response;
import com.cloudpdf.api.types.DocPagesInsert200Response;
import com.cloudpdf.api.types.DocPagesInsertBlank200Response;
import com.cloudpdf.api.types.DocPagesMove200Response;
+import com.cloudpdf.api.types.DocPagesRemoveName200Response;
import com.cloudpdf.api.types.DocPagesRotate200Response;
+import com.cloudpdf.api.types.DocPagesSetName200Response;
import java.io.File;
import java.io.InputStream;
import java.util.Map;
@@ -214,6 +218,48 @@ public CompletableFuture move(
return this.rawClient.move(docId, layerName, request, requestOptions).thenApply(response -> response.body());
}
+ public CompletableFuture setName(
+ String docId, String layerName, Map body) {
+ return this.rawClient.setName(docId, layerName, body).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture setName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return this.rawClient.setName(docId, layerName, body, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture setName(
+ String docId, String layerName, SetNamePagesRequest request) {
+ return this.rawClient.setName(docId, layerName, request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture setName(
+ String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.setName(docId, layerName, request, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture removeName(
+ String docId, String layerName, Map body) {
+ return this.rawClient.removeName(docId, layerName, body).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture removeName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return this.rawClient.removeName(docId, layerName, body, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture removeName(
+ String docId, String layerName, RemoveNamePagesRequest request) {
+ return this.rawClient.removeName(docId, layerName, request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture removeName(
+ String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .removeName(docId, layerName, request, requestOptions)
+ .thenApply(response -> response.body());
+ }
+
public CompletableFuture rotate(
String docId, String layerName, Map body) {
return this.rawClient.rotate(docId, layerName, body).thenApply(response -> response.body());
diff --git a/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java b/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java
index a314d05..d24fc65 100644
--- a/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java
+++ b/src/main/java/api/resources/doc/pages/AsyncRawPagesClient.java
@@ -21,13 +21,17 @@
import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.MovePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest;
import com.cloudpdf.api.types.DocPagesDelete200Response;
import com.cloudpdf.api.types.DocPagesFlatten200Response;
import com.cloudpdf.api.types.DocPagesInsert200Response;
import com.cloudpdf.api.types.DocPagesInsertBlank200Response;
import com.cloudpdf.api.types.DocPagesMove200Response;
+import com.cloudpdf.api.types.DocPagesRemoveName200Response;
import com.cloudpdf.api.types.DocPagesRotate200Response;
+import com.cloudpdf.api.types.DocPagesSetName200Response;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.io.File;
import java.io.IOException;
@@ -1056,6 +1060,230 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ public CompletableFuture> setName(
+ String docId, String layerName, Map body) {
+ return setName(
+ docId, layerName, SetNamePagesRequest.builder().body(body).build());
+ }
+
+ public CompletableFuture> setName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return setName(
+ docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions);
+ }
+
+ public CompletableFuture> setName(
+ String docId, String layerName, SetNamePagesRequest request) {
+ return setName(docId, layerName, request, null);
+ }
+
+ public CompletableFuture> setName(
+ String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/docs")
+ .addPathSegment(docId)
+ .addPathSegments("layers")
+ .addPathSegment(layerName)
+ .addPathSegments("pages")
+ .addPathSegments("names");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json");
+ if (request.getDocumentPassword().isPresent()) {
+ _requestBuilder.addHeader(
+ "X-Document-Password", request.getDocumentPassword().get());
+ }
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new CloudPDFClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, DocPagesSetName200Response.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new CloudPDFApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ public CompletableFuture> removeName(
+ String docId, String layerName, Map body) {
+ return removeName(
+ docId, layerName, RemoveNamePagesRequest.builder().body(body).build());
+ }
+
+ public CompletableFuture> removeName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return removeName(
+ docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions);
+ }
+
+ public CompletableFuture> removeName(
+ String docId, String layerName, RemoveNamePagesRequest request) {
+ return removeName(docId, layerName, request, null);
+ }
+
+ public CompletableFuture> removeName(
+ String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/docs")
+ .addPathSegment(docId)
+ .addPathSegments("layers")
+ .addPathSegment(layerName)
+ .addPathSegments("pages/names")
+ .addPathSegments("delete");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json");
+ if (request.getDocumentPassword().isPresent()) {
+ _requestBuilder.addHeader(
+ "X-Document-Password", request.getDocumentPassword().get());
+ }
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new CloudPDFClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, DocPagesRemoveName200Response.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new CloudPDFApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new CloudPDFException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
public CompletableFuture> rotate(
String docId, String layerName, Map body) {
return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build());
diff --git a/src/main/java/api/resources/doc/pages/PagesClient.java b/src/main/java/api/resources/doc/pages/PagesClient.java
index bfa2e68..ccd19d8 100644
--- a/src/main/java/api/resources/doc/pages/PagesClient.java
+++ b/src/main/java/api/resources/doc/pages/PagesClient.java
@@ -11,13 +11,17 @@
import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.MovePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest;
import com.cloudpdf.api.types.DocPagesDelete200Response;
import com.cloudpdf.api.types.DocPagesFlatten200Response;
import com.cloudpdf.api.types.DocPagesInsert200Response;
import com.cloudpdf.api.types.DocPagesInsertBlank200Response;
import com.cloudpdf.api.types.DocPagesMove200Response;
+import com.cloudpdf.api.types.DocPagesRemoveName200Response;
import com.cloudpdf.api.types.DocPagesRotate200Response;
+import com.cloudpdf.api.types.DocPagesSetName200Response;
import java.io.File;
import java.io.InputStream;
import java.util.Map;
@@ -205,6 +209,44 @@ public DocPagesMove200Response move(
return this.rawClient.move(docId, layerName, request, requestOptions).body();
}
+ public DocPagesSetName200Response setName(String docId, String layerName, Map body) {
+ return this.rawClient.setName(docId, layerName, body).body();
+ }
+
+ public DocPagesSetName200Response setName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return this.rawClient.setName(docId, layerName, body, requestOptions).body();
+ }
+
+ public DocPagesSetName200Response setName(String docId, String layerName, SetNamePagesRequest request) {
+ return this.rawClient.setName(docId, layerName, request).body();
+ }
+
+ public DocPagesSetName200Response setName(
+ String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.setName(docId, layerName, request, requestOptions).body();
+ }
+
+ public DocPagesRemoveName200Response removeName(String docId, String layerName, Map body) {
+ return this.rawClient.removeName(docId, layerName, body).body();
+ }
+
+ public DocPagesRemoveName200Response removeName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return this.rawClient.removeName(docId, layerName, body, requestOptions).body();
+ }
+
+ public DocPagesRemoveName200Response removeName(String docId, String layerName, RemoveNamePagesRequest request) {
+ return this.rawClient.removeName(docId, layerName, request).body();
+ }
+
+ public DocPagesRemoveName200Response removeName(
+ String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .removeName(docId, layerName, request, requestOptions)
+ .body();
+ }
+
public DocPagesRotate200Response rotate(String docId, String layerName, Map body) {
return this.rawClient.rotate(docId, layerName, body).body();
}
diff --git a/src/main/java/api/resources/doc/pages/RawPagesClient.java b/src/main/java/api/resources/doc/pages/RawPagesClient.java
index 2a46ae6..b6b05d6 100644
--- a/src/main/java/api/resources/doc/pages/RawPagesClient.java
+++ b/src/main/java/api/resources/doc/pages/RawPagesClient.java
@@ -21,13 +21,17 @@
import com.cloudpdf.api.resources.doc.pages.requests.InsertBlankPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.InsertPagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.MovePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.RemoveNamePagesRequest;
import com.cloudpdf.api.resources.doc.pages.requests.RotatePagesRequest;
+import com.cloudpdf.api.resources.doc.pages.requests.SetNamePagesRequest;
import com.cloudpdf.api.types.DocPagesDelete200Response;
import com.cloudpdf.api.types.DocPagesFlatten200Response;
import com.cloudpdf.api.types.DocPagesInsert200Response;
import com.cloudpdf.api.types.DocPagesInsertBlank200Response;
import com.cloudpdf.api.types.DocPagesMove200Response;
+import com.cloudpdf.api.types.DocPagesRemoveName200Response;
import com.cloudpdf.api.types.DocPagesRotate200Response;
+import com.cloudpdf.api.types.DocPagesSetName200Response;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.io.File;
import java.io.IOException;
@@ -861,6 +865,192 @@ public CloudPDFClientHttpResponse move(
}
}
+ public CloudPDFClientHttpResponse setName(
+ String docId, String layerName, Map body) {
+ return setName(
+ docId, layerName, SetNamePagesRequest.builder().body(body).build());
+ }
+
+ public CloudPDFClientHttpResponse setName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return setName(
+ docId, layerName, SetNamePagesRequest.builder().body(body).build(), requestOptions);
+ }
+
+ public CloudPDFClientHttpResponse setName(
+ String docId, String layerName, SetNamePagesRequest request) {
+ return setName(docId, layerName, request, null);
+ }
+
+ public CloudPDFClientHttpResponse setName(
+ String docId, String layerName, SetNamePagesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/docs")
+ .addPathSegment(docId)
+ .addPathSegments("layers")
+ .addPathSegment(layerName)
+ .addPathSegments("pages")
+ .addPathSegments("names");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json");
+ if (request.getDocumentPassword().isPresent()) {
+ _requestBuilder.addHeader(
+ "X-Document-Password", request.getDocumentPassword().get());
+ }
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new CloudPDFClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesSetName200Response.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new CloudPDFApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new CloudPDFException("Network error executing HTTP request", e);
+ }
+ }
+
+ public CloudPDFClientHttpResponse removeName(
+ String docId, String layerName, Map body) {
+ return removeName(
+ docId, layerName, RemoveNamePagesRequest.builder().body(body).build());
+ }
+
+ public CloudPDFClientHttpResponse removeName(
+ String docId, String layerName, Map body, RequestOptions requestOptions) {
+ return removeName(
+ docId, layerName, RemoveNamePagesRequest.builder().body(body).build(), requestOptions);
+ }
+
+ public CloudPDFClientHttpResponse removeName(
+ String docId, String layerName, RemoveNamePagesRequest request) {
+ return removeName(docId, layerName, request, null);
+ }
+
+ public CloudPDFClientHttpResponse removeName(
+ String docId, String layerName, RemoveNamePagesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/docs")
+ .addPathSegment(docId)
+ .addPathSegments("layers")
+ .addPathSegment(layerName)
+ .addPathSegments("pages/names")
+ .addPathSegments("delete");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json");
+ if (request.getDocumentPassword().isPresent()) {
+ _requestBuilder.addHeader(
+ "X-Document-Password", request.getDocumentPassword().get());
+ }
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new CloudPDFClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, DocPagesRemoveName200Response.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new CloudPDFApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new CloudPDFException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new CloudPDFException("Network error executing HTTP request", e);
+ }
+ }
+
public CloudPDFClientHttpResponse rotate(
String docId, String layerName, Map body) {
return rotate(docId, layerName, RotatePagesRequest.builder().body(body).build());
diff --git a/src/main/java/api/resources/doc/pages/requests/RemoveNamePagesRequest.java b/src/main/java/api/resources/doc/pages/requests/RemoveNamePagesRequest.java
new file mode 100644
index 0000000..e45f1e8
--- /dev/null
+++ b/src/main/java/api/resources/doc/pages/requests/RemoveNamePagesRequest.java
@@ -0,0 +1,145 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.resources.doc.pages.requests;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = RemoveNamePagesRequest.Builder.class)
+public final class RemoveNamePagesRequest {
+ private final Optional documentPassword;
+
+ private final Map body;
+
+ private final Map additionalProperties;
+
+ private RemoveNamePagesRequest(
+ Optional documentPassword, Map body, Map additionalProperties) {
+ this.documentPassword = documentPassword;
+ this.body = body;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ @JsonIgnore
+ public Optional getDocumentPassword() {
+ return documentPassword;
+ }
+
+ @JsonProperty("body")
+ public Map getBody() {
+ return body;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof RemoveNamePagesRequest && equalTo((RemoveNamePagesRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(RemoveNamePagesRequest other) {
+ return documentPassword.equals(other.documentPassword) && body.equals(other.body);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.documentPassword, this.body);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional documentPassword = Optional.empty();
+
+ private Map body = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(RemoveNamePagesRequest other) {
+ documentPassword(other.getDocumentPassword());
+ body(other.getBody());
+ return this;
+ }
+
+ /**
+ * Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ public Builder documentPassword(Optional documentPassword) {
+ this.documentPassword = documentPassword;
+ return this;
+ }
+
+ public Builder documentPassword(String documentPassword) {
+ this.documentPassword = Optional.ofNullable(documentPassword);
+ return this;
+ }
+
+ @JsonSetter(value = "body", nulls = Nulls.SKIP)
+ public Builder body(Map body) {
+ this.body.clear();
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder putAllBody(Map body) {
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder body(String key, Object value) {
+ this.body.put(key, value);
+ return this;
+ }
+
+ public RemoveNamePagesRequest build() {
+ return new RemoveNamePagesRequest(documentPassword, body, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/resources/doc/pages/requests/SetNamePagesRequest.java b/src/main/java/api/resources/doc/pages/requests/SetNamePagesRequest.java
new file mode 100644
index 0000000..161a162
--- /dev/null
+++ b/src/main/java/api/resources/doc/pages/requests/SetNamePagesRequest.java
@@ -0,0 +1,145 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.resources.doc.pages.requests;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = SetNamePagesRequest.Builder.class)
+public final class SetNamePagesRequest {
+ private final Optional documentPassword;
+
+ private final Map body;
+
+ private final Map additionalProperties;
+
+ private SetNamePagesRequest(
+ Optional documentPassword, Map body, Map additionalProperties) {
+ this.documentPassword = documentPassword;
+ this.body = body;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ @JsonIgnore
+ public Optional getDocumentPassword() {
+ return documentPassword;
+ }
+
+ @JsonProperty("body")
+ public Map getBody() {
+ return body;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof SetNamePagesRequest && equalTo((SetNamePagesRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(SetNamePagesRequest other) {
+ return documentPassword.equals(other.documentPassword) && body.equals(other.body);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.documentPassword, this.body);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional documentPassword = Optional.empty();
+
+ private Map body = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(SetNamePagesRequest other) {
+ documentPassword(other.getDocumentPassword());
+ body(other.getBody());
+ return this;
+ }
+
+ /**
+ * Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
+ */
+ public Builder documentPassword(Optional documentPassword) {
+ this.documentPassword = documentPassword;
+ return this;
+ }
+
+ public Builder documentPassword(String documentPassword) {
+ this.documentPassword = Optional.ofNullable(documentPassword);
+ return this;
+ }
+
+ @JsonSetter(value = "body", nulls = Nulls.SKIP)
+ public Builder body(Map body) {
+ this.body.clear();
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder putAllBody(Map body) {
+ if (body != null) {
+ this.body.putAll(body);
+ }
+ return this;
+ }
+
+ public Builder body(String key, Object value) {
+ this.body.put(key, value);
+ return this;
+ }
+
+ public SetNamePagesRequest build() {
+ return new SetNamePagesRequest(documentPassword, body, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance400Response.java b/src/main/java/api/types/DocAnnotationsExportAppearance400Response.java
new file mode 100644
index 0000000..4a3ae0d
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance400Response.java
@@ -0,0 +1,201 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsExportAppearance400Response.Builder.class)
+public final class DocAnnotationsExportAppearance400Response {
+ private final DocAnnotationsExportAppearance400ResponseName name;
+
+ private final DocAnnotationsExportAppearance400ResponseCode code;
+
+ private final String message;
+
+ private final Optional> details;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsExportAppearance400Response(
+ DocAnnotationsExportAppearance400ResponseName name,
+ DocAnnotationsExportAppearance400ResponseCode code,
+ String message,
+ Optional> details,
+ Map additionalProperties) {
+ this.name = name;
+ this.code = code;
+ this.message = message;
+ this.details = details;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("name")
+ public DocAnnotationsExportAppearance400ResponseName getName() {
+ return name;
+ }
+
+ @JsonProperty("code")
+ public DocAnnotationsExportAppearance400ResponseCode getCode() {
+ return code;
+ }
+
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ @JsonProperty("details")
+ public Optional> getDetails() {
+ return details;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsExportAppearance400Response
+ && equalTo((DocAnnotationsExportAppearance400Response) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsExportAppearance400Response other) {
+ return name.equals(other.name)
+ && code.equals(other.code)
+ && message.equals(other.message)
+ && details.equals(other.details);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.name, this.code, this.message, this.details);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static NameStage builder() {
+ return new Builder();
+ }
+
+ public interface NameStage {
+ CodeStage name(@NotNull DocAnnotationsExportAppearance400ResponseName name);
+
+ Builder from(DocAnnotationsExportAppearance400Response other);
+ }
+
+ public interface CodeStage {
+ MessageStage code(@NotNull DocAnnotationsExportAppearance400ResponseCode code);
+ }
+
+ public interface MessageStage {
+ _FinalStage message(@NotNull String message);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsExportAppearance400Response build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ _FinalStage details(Optional> details);
+
+ _FinalStage details(Map details);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements NameStage, CodeStage, MessageStage, _FinalStage {
+ private DocAnnotationsExportAppearance400ResponseName name;
+
+ private DocAnnotationsExportAppearance400ResponseCode code;
+
+ private String message;
+
+ private Optional> details = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsExportAppearance400Response other) {
+ name(other.getName());
+ code(other.getCode());
+ message(other.getMessage());
+ details(other.getDetails());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("name")
+ public CodeStage name(@NotNull DocAnnotationsExportAppearance400ResponseName name) {
+ this.name = Objects.requireNonNull(name, "name must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("code")
+ public MessageStage code(@NotNull DocAnnotationsExportAppearance400ResponseCode code) {
+ this.code = Objects.requireNonNull(code, "code must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("message")
+ public _FinalStage message(@NotNull String message) {
+ this.message = Objects.requireNonNull(message, "message must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage details(Map details) {
+ this.details = Optional.ofNullable(details);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "details", nulls = Nulls.SKIP)
+ public _FinalStage details(Optional> details) {
+ this.details = details;
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsExportAppearance400Response build() {
+ return new DocAnnotationsExportAppearance400Response(name, code, message, details, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseCode.java b/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseCode.java
new file mode 100644
index 0000000..d6eab01
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseCode.java
@@ -0,0 +1,274 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class DocAnnotationsExportAppearance400ResponseCode {
+ public static final DocAnnotationsExportAppearance400ResponseCode MALFORMED_PDF =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.MALFORMED_PDF, "MalformedPdf");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode UNKNOWN =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.UNKNOWN, "Unknown");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode WEAK_ANNOTATION_SESSION_CONFLICT =
+ new DocAnnotationsExportAppearance400ResponseCode(
+ Value.WEAK_ANNOTATION_SESSION_CONFLICT, "WeakAnnotationSessionConflict");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode WIRE_FORMAT =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.WIRE_FORMAT, "WireFormat");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode RUNTIME_UNAVAILABLE =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.RUNTIME_UNAVAILABLE, "RuntimeUnavailable");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode UNAUTHENTICATED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.UNAUTHENTICATED, "Unauthenticated");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode FORBIDDEN =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.FORBIDDEN, "Forbidden");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode DOC_OPEN_FAILED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.DOC_OPEN_FAILED, "DocOpenFailed");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode NOT_FOUND =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.NOT_FOUND, "NotFound");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode ABORTED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.ABORTED, "Aborted");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode DOC_PASSWORD_REQUIRED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.DOC_PASSWORD_REQUIRED, "DocPasswordRequired");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode INVALID_ARG =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.INVALID_ARG, "InvalidArg");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode SHARE_PASSWORD_REQUIRED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.SHARE_PASSWORD_REQUIRED, "SharePasswordRequired");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode NETWORK =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.NETWORK, "Network");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode INVALID_REFERENCE =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.INVALID_REFERENCE, "InvalidReference");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode DOC_PASSWORD_INCORRECT =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.DOC_PASSWORD_INCORRECT, "DocPasswordIncorrect");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode DOC_NOT_OPEN =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.DOC_NOT_OPEN, "DocNotOpen");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode LAYER_VERSION_CONFLICT =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.LAYER_VERSION_CONFLICT, "LayerVersionConflict");
+
+ public static final DocAnnotationsExportAppearance400ResponseCode NOT_IMPLEMENTED =
+ new DocAnnotationsExportAppearance400ResponseCode(Value.NOT_IMPLEMENTED, "NotImplemented");
+
+ private final Value value;
+
+ private final String string;
+
+ DocAnnotationsExportAppearance400ResponseCode(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof DocAnnotationsExportAppearance400ResponseCode
+ && this.string.equals(((DocAnnotationsExportAppearance400ResponseCode) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case MALFORMED_PDF:
+ return visitor.visitMalformedPdf();
+ case UNKNOWN:
+ return visitor.visitUnknown();
+ case WEAK_ANNOTATION_SESSION_CONFLICT:
+ return visitor.visitWeakAnnotationSessionConflict();
+ case WIRE_FORMAT:
+ return visitor.visitWireFormat();
+ case RUNTIME_UNAVAILABLE:
+ return visitor.visitRuntimeUnavailable();
+ case UNAUTHENTICATED:
+ return visitor.visitUnauthenticated();
+ case FORBIDDEN:
+ return visitor.visitForbidden();
+ case DOC_OPEN_FAILED:
+ return visitor.visitDocOpenFailed();
+ case NOT_FOUND:
+ return visitor.visitNotFound();
+ case ABORTED:
+ return visitor.visitAborted();
+ case DOC_PASSWORD_REQUIRED:
+ return visitor.visitDocPasswordRequired();
+ case INVALID_ARG:
+ return visitor.visitInvalidArg();
+ case SHARE_PASSWORD_REQUIRED:
+ return visitor.visitSharePasswordRequired();
+ case NETWORK:
+ return visitor.visitNetwork();
+ case INVALID_REFERENCE:
+ return visitor.visitInvalidReference();
+ case DOC_PASSWORD_INCORRECT:
+ return visitor.visitDocPasswordIncorrect();
+ case DOC_NOT_OPEN:
+ return visitor.visitDocNotOpen();
+ case LAYER_VERSION_CONFLICT:
+ return visitor.visitLayerVersionConflict();
+ case NOT_IMPLEMENTED:
+ return visitor.visitNotImplemented();
+ case _UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static DocAnnotationsExportAppearance400ResponseCode valueOf(String value) {
+ switch (value) {
+ case "MalformedPdf":
+ return MALFORMED_PDF;
+ case "Unknown":
+ return UNKNOWN;
+ case "WeakAnnotationSessionConflict":
+ return WEAK_ANNOTATION_SESSION_CONFLICT;
+ case "WireFormat":
+ return WIRE_FORMAT;
+ case "RuntimeUnavailable":
+ return RUNTIME_UNAVAILABLE;
+ case "Unauthenticated":
+ return UNAUTHENTICATED;
+ case "Forbidden":
+ return FORBIDDEN;
+ case "DocOpenFailed":
+ return DOC_OPEN_FAILED;
+ case "NotFound":
+ return NOT_FOUND;
+ case "Aborted":
+ return ABORTED;
+ case "DocPasswordRequired":
+ return DOC_PASSWORD_REQUIRED;
+ case "InvalidArg":
+ return INVALID_ARG;
+ case "SharePasswordRequired":
+ return SHARE_PASSWORD_REQUIRED;
+ case "Network":
+ return NETWORK;
+ case "InvalidReference":
+ return INVALID_REFERENCE;
+ case "DocPasswordIncorrect":
+ return DOC_PASSWORD_INCORRECT;
+ case "DocNotOpen":
+ return DOC_NOT_OPEN;
+ case "LayerVersionConflict":
+ return LAYER_VERSION_CONFLICT;
+ case "NotImplemented":
+ return NOT_IMPLEMENTED;
+ default:
+ return new DocAnnotationsExportAppearance400ResponseCode(Value._UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ UNKNOWN,
+
+ INVALID_ARG,
+
+ DOC_NOT_OPEN,
+
+ DOC_OPEN_FAILED,
+
+ DOC_PASSWORD_REQUIRED,
+
+ DOC_PASSWORD_INCORRECT,
+
+ SHARE_PASSWORD_REQUIRED,
+
+ ABORTED,
+
+ NETWORK,
+
+ UNAUTHENTICATED,
+
+ FORBIDDEN,
+
+ NOT_FOUND,
+
+ WIRE_FORMAT,
+
+ RUNTIME_UNAVAILABLE,
+
+ INVALID_REFERENCE,
+
+ WEAK_ANNOTATION_SESSION_CONFLICT,
+
+ LAYER_VERSION_CONFLICT,
+
+ NOT_IMPLEMENTED,
+
+ MALFORMED_PDF,
+
+ _UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitUnknown();
+
+ T visitInvalidArg();
+
+ T visitDocNotOpen();
+
+ T visitDocOpenFailed();
+
+ T visitDocPasswordRequired();
+
+ T visitDocPasswordIncorrect();
+
+ T visitSharePasswordRequired();
+
+ T visitAborted();
+
+ T visitNetwork();
+
+ T visitUnauthenticated();
+
+ T visitForbidden();
+
+ T visitNotFound();
+
+ T visitWireFormat();
+
+ T visitRuntimeUnavailable();
+
+ T visitInvalidReference();
+
+ T visitWeakAnnotationSessionConflict();
+
+ T visitLayerVersionConflict();
+
+ T visitNotImplemented();
+
+ T visitMalformedPdf();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseName.java b/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseName.java
new file mode 100644
index 0000000..7415cec
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance400ResponseName.java
@@ -0,0 +1,75 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class DocAnnotationsExportAppearance400ResponseName {
+ public static final DocAnnotationsExportAppearance400ResponseName ENGINE_ERROR =
+ new DocAnnotationsExportAppearance400ResponseName(Value.ENGINE_ERROR, "EngineError");
+
+ private final Value value;
+
+ private final String string;
+
+ DocAnnotationsExportAppearance400ResponseName(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof DocAnnotationsExportAppearance400ResponseName
+ && this.string.equals(((DocAnnotationsExportAppearance400ResponseName) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case ENGINE_ERROR:
+ return visitor.visitEngineError();
+ case UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static DocAnnotationsExportAppearance400ResponseName valueOf(String value) {
+ switch (value) {
+ case "EngineError":
+ return ENGINE_ERROR;
+ default:
+ return new DocAnnotationsExportAppearance400ResponseName(Value.UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ ENGINE_ERROR,
+
+ UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitEngineError();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance404Response.java b/src/main/java/api/types/DocAnnotationsExportAppearance404Response.java
new file mode 100644
index 0000000..eb343ce
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance404Response.java
@@ -0,0 +1,201 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsExportAppearance404Response.Builder.class)
+public final class DocAnnotationsExportAppearance404Response {
+ private final DocAnnotationsExportAppearance404ResponseName name;
+
+ private final DocAnnotationsExportAppearance404ResponseCode code;
+
+ private final String message;
+
+ private final Optional> details;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsExportAppearance404Response(
+ DocAnnotationsExportAppearance404ResponseName name,
+ DocAnnotationsExportAppearance404ResponseCode code,
+ String message,
+ Optional> details,
+ Map additionalProperties) {
+ this.name = name;
+ this.code = code;
+ this.message = message;
+ this.details = details;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("name")
+ public DocAnnotationsExportAppearance404ResponseName getName() {
+ return name;
+ }
+
+ @JsonProperty("code")
+ public DocAnnotationsExportAppearance404ResponseCode getCode() {
+ return code;
+ }
+
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ @JsonProperty("details")
+ public Optional> getDetails() {
+ return details;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsExportAppearance404Response
+ && equalTo((DocAnnotationsExportAppearance404Response) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsExportAppearance404Response other) {
+ return name.equals(other.name)
+ && code.equals(other.code)
+ && message.equals(other.message)
+ && details.equals(other.details);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.name, this.code, this.message, this.details);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static NameStage builder() {
+ return new Builder();
+ }
+
+ public interface NameStage {
+ CodeStage name(@NotNull DocAnnotationsExportAppearance404ResponseName name);
+
+ Builder from(DocAnnotationsExportAppearance404Response other);
+ }
+
+ public interface CodeStage {
+ MessageStage code(@NotNull DocAnnotationsExportAppearance404ResponseCode code);
+ }
+
+ public interface MessageStage {
+ _FinalStage message(@NotNull String message);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsExportAppearance404Response build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ _FinalStage details(Optional> details);
+
+ _FinalStage details(Map details);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements NameStage, CodeStage, MessageStage, _FinalStage {
+ private DocAnnotationsExportAppearance404ResponseName name;
+
+ private DocAnnotationsExportAppearance404ResponseCode code;
+
+ private String message;
+
+ private Optional> details = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsExportAppearance404Response other) {
+ name(other.getName());
+ code(other.getCode());
+ message(other.getMessage());
+ details(other.getDetails());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("name")
+ public CodeStage name(@NotNull DocAnnotationsExportAppearance404ResponseName name) {
+ this.name = Objects.requireNonNull(name, "name must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("code")
+ public MessageStage code(@NotNull DocAnnotationsExportAppearance404ResponseCode code) {
+ this.code = Objects.requireNonNull(code, "code must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("message")
+ public _FinalStage message(@NotNull String message) {
+ this.message = Objects.requireNonNull(message, "message must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage details(Map details) {
+ this.details = Optional.ofNullable(details);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "details", nulls = Nulls.SKIP)
+ public _FinalStage details(Optional> details) {
+ this.details = details;
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsExportAppearance404Response build() {
+ return new DocAnnotationsExportAppearance404Response(name, code, message, details, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseCode.java b/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseCode.java
new file mode 100644
index 0000000..59e5753
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseCode.java
@@ -0,0 +1,274 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class DocAnnotationsExportAppearance404ResponseCode {
+ public static final DocAnnotationsExportAppearance404ResponseCode MALFORMED_PDF =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.MALFORMED_PDF, "MalformedPdf");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode UNKNOWN =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.UNKNOWN, "Unknown");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode WEAK_ANNOTATION_SESSION_CONFLICT =
+ new DocAnnotationsExportAppearance404ResponseCode(
+ Value.WEAK_ANNOTATION_SESSION_CONFLICT, "WeakAnnotationSessionConflict");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode WIRE_FORMAT =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.WIRE_FORMAT, "WireFormat");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode RUNTIME_UNAVAILABLE =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.RUNTIME_UNAVAILABLE, "RuntimeUnavailable");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode UNAUTHENTICATED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.UNAUTHENTICATED, "Unauthenticated");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode FORBIDDEN =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.FORBIDDEN, "Forbidden");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode DOC_OPEN_FAILED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.DOC_OPEN_FAILED, "DocOpenFailed");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode NOT_FOUND =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.NOT_FOUND, "NotFound");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode ABORTED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.ABORTED, "Aborted");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode DOC_PASSWORD_REQUIRED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.DOC_PASSWORD_REQUIRED, "DocPasswordRequired");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode INVALID_ARG =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.INVALID_ARG, "InvalidArg");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode SHARE_PASSWORD_REQUIRED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.SHARE_PASSWORD_REQUIRED, "SharePasswordRequired");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode NETWORK =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.NETWORK, "Network");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode INVALID_REFERENCE =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.INVALID_REFERENCE, "InvalidReference");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode DOC_PASSWORD_INCORRECT =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.DOC_PASSWORD_INCORRECT, "DocPasswordIncorrect");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode DOC_NOT_OPEN =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.DOC_NOT_OPEN, "DocNotOpen");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode LAYER_VERSION_CONFLICT =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.LAYER_VERSION_CONFLICT, "LayerVersionConflict");
+
+ public static final DocAnnotationsExportAppearance404ResponseCode NOT_IMPLEMENTED =
+ new DocAnnotationsExportAppearance404ResponseCode(Value.NOT_IMPLEMENTED, "NotImplemented");
+
+ private final Value value;
+
+ private final String string;
+
+ DocAnnotationsExportAppearance404ResponseCode(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof DocAnnotationsExportAppearance404ResponseCode
+ && this.string.equals(((DocAnnotationsExportAppearance404ResponseCode) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case MALFORMED_PDF:
+ return visitor.visitMalformedPdf();
+ case UNKNOWN:
+ return visitor.visitUnknown();
+ case WEAK_ANNOTATION_SESSION_CONFLICT:
+ return visitor.visitWeakAnnotationSessionConflict();
+ case WIRE_FORMAT:
+ return visitor.visitWireFormat();
+ case RUNTIME_UNAVAILABLE:
+ return visitor.visitRuntimeUnavailable();
+ case UNAUTHENTICATED:
+ return visitor.visitUnauthenticated();
+ case FORBIDDEN:
+ return visitor.visitForbidden();
+ case DOC_OPEN_FAILED:
+ return visitor.visitDocOpenFailed();
+ case NOT_FOUND:
+ return visitor.visitNotFound();
+ case ABORTED:
+ return visitor.visitAborted();
+ case DOC_PASSWORD_REQUIRED:
+ return visitor.visitDocPasswordRequired();
+ case INVALID_ARG:
+ return visitor.visitInvalidArg();
+ case SHARE_PASSWORD_REQUIRED:
+ return visitor.visitSharePasswordRequired();
+ case NETWORK:
+ return visitor.visitNetwork();
+ case INVALID_REFERENCE:
+ return visitor.visitInvalidReference();
+ case DOC_PASSWORD_INCORRECT:
+ return visitor.visitDocPasswordIncorrect();
+ case DOC_NOT_OPEN:
+ return visitor.visitDocNotOpen();
+ case LAYER_VERSION_CONFLICT:
+ return visitor.visitLayerVersionConflict();
+ case NOT_IMPLEMENTED:
+ return visitor.visitNotImplemented();
+ case _UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static DocAnnotationsExportAppearance404ResponseCode valueOf(String value) {
+ switch (value) {
+ case "MalformedPdf":
+ return MALFORMED_PDF;
+ case "Unknown":
+ return UNKNOWN;
+ case "WeakAnnotationSessionConflict":
+ return WEAK_ANNOTATION_SESSION_CONFLICT;
+ case "WireFormat":
+ return WIRE_FORMAT;
+ case "RuntimeUnavailable":
+ return RUNTIME_UNAVAILABLE;
+ case "Unauthenticated":
+ return UNAUTHENTICATED;
+ case "Forbidden":
+ return FORBIDDEN;
+ case "DocOpenFailed":
+ return DOC_OPEN_FAILED;
+ case "NotFound":
+ return NOT_FOUND;
+ case "Aborted":
+ return ABORTED;
+ case "DocPasswordRequired":
+ return DOC_PASSWORD_REQUIRED;
+ case "InvalidArg":
+ return INVALID_ARG;
+ case "SharePasswordRequired":
+ return SHARE_PASSWORD_REQUIRED;
+ case "Network":
+ return NETWORK;
+ case "InvalidReference":
+ return INVALID_REFERENCE;
+ case "DocPasswordIncorrect":
+ return DOC_PASSWORD_INCORRECT;
+ case "DocNotOpen":
+ return DOC_NOT_OPEN;
+ case "LayerVersionConflict":
+ return LAYER_VERSION_CONFLICT;
+ case "NotImplemented":
+ return NOT_IMPLEMENTED;
+ default:
+ return new DocAnnotationsExportAppearance404ResponseCode(Value._UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ UNKNOWN,
+
+ INVALID_ARG,
+
+ DOC_NOT_OPEN,
+
+ DOC_OPEN_FAILED,
+
+ DOC_PASSWORD_REQUIRED,
+
+ DOC_PASSWORD_INCORRECT,
+
+ SHARE_PASSWORD_REQUIRED,
+
+ ABORTED,
+
+ NETWORK,
+
+ UNAUTHENTICATED,
+
+ FORBIDDEN,
+
+ NOT_FOUND,
+
+ WIRE_FORMAT,
+
+ RUNTIME_UNAVAILABLE,
+
+ INVALID_REFERENCE,
+
+ WEAK_ANNOTATION_SESSION_CONFLICT,
+
+ LAYER_VERSION_CONFLICT,
+
+ NOT_IMPLEMENTED,
+
+ MALFORMED_PDF,
+
+ _UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitUnknown();
+
+ T visitInvalidArg();
+
+ T visitDocNotOpen();
+
+ T visitDocOpenFailed();
+
+ T visitDocPasswordRequired();
+
+ T visitDocPasswordIncorrect();
+
+ T visitSharePasswordRequired();
+
+ T visitAborted();
+
+ T visitNetwork();
+
+ T visitUnauthenticated();
+
+ T visitForbidden();
+
+ T visitNotFound();
+
+ T visitWireFormat();
+
+ T visitRuntimeUnavailable();
+
+ T visitInvalidReference();
+
+ T visitWeakAnnotationSessionConflict();
+
+ T visitLayerVersionConflict();
+
+ T visitNotImplemented();
+
+ T visitMalformedPdf();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseName.java b/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseName.java
new file mode 100644
index 0000000..04dd640
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsExportAppearance404ResponseName.java
@@ -0,0 +1,75 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public final class DocAnnotationsExportAppearance404ResponseName {
+ public static final DocAnnotationsExportAppearance404ResponseName ENGINE_ERROR =
+ new DocAnnotationsExportAppearance404ResponseName(Value.ENGINE_ERROR, "EngineError");
+
+ private final Value value;
+
+ private final String string;
+
+ DocAnnotationsExportAppearance404ResponseName(Value value, String string) {
+ this.value = value;
+ this.string = string;
+ }
+
+ public Value getEnumValue() {
+ return value;
+ }
+
+ @java.lang.Override
+ @JsonValue
+ public String toString() {
+ return this.string;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ return (this == other)
+ || (other instanceof DocAnnotationsExportAppearance404ResponseName
+ && this.string.equals(((DocAnnotationsExportAppearance404ResponseName) other).string));
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return this.string.hashCode();
+ }
+
+ public T visit(Visitor visitor) {
+ switch (value) {
+ case ENGINE_ERROR:
+ return visitor.visitEngineError();
+ case UNKNOWN:
+ default:
+ return visitor.visitUnknown(string);
+ }
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public static DocAnnotationsExportAppearance404ResponseName valueOf(String value) {
+ switch (value) {
+ case "EngineError":
+ return ENGINE_ERROR;
+ default:
+ return new DocAnnotationsExportAppearance404ResponseName(Value.UNKNOWN, value);
+ }
+ }
+
+ public enum Value {
+ ENGINE_ERROR,
+
+ UNKNOWN
+ }
+
+ public interface Visitor {
+ T visitEngineError();
+
+ T visitUnknown(String unknownType);
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200Response.java b/src/main/java/api/types/DocAnnotationsFlatten200Response.java
new file mode 100644
index 0000000..5b9c02c
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200Response.java
@@ -0,0 +1,119 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsFlatten200Response.Builder.class)
+public final class DocAnnotationsFlatten200Response {
+ private final DocAnnotationsFlatten200ResponseMeta meta;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsFlatten200Response(
+ DocAnnotationsFlatten200ResponseMeta meta, Map additionalProperties) {
+ this.meta = meta;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("meta")
+ public DocAnnotationsFlatten200ResponseMeta getMeta() {
+ return meta;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200Response && equalTo((DocAnnotationsFlatten200Response) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsFlatten200Response other) {
+ return meta.equals(other.meta);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.meta);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static MetaStage builder() {
+ return new Builder();
+ }
+
+ public interface MetaStage {
+ _FinalStage meta(@NotNull DocAnnotationsFlatten200ResponseMeta meta);
+
+ Builder from(DocAnnotationsFlatten200Response other);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsFlatten200Response build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements MetaStage, _FinalStage {
+ private DocAnnotationsFlatten200ResponseMeta meta;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsFlatten200Response other) {
+ meta(other.getMeta());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("meta")
+ public _FinalStage meta(@NotNull DocAnnotationsFlatten200ResponseMeta meta) {
+ this.meta = Objects.requireNonNull(meta, "meta must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsFlatten200Response build() {
+ return new DocAnnotationsFlatten200Response(meta, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200ResponseMeta.java b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMeta.java
new file mode 100644
index 0000000..6e4c536
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMeta.java
@@ -0,0 +1,166 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.Nullable;
+import com.cloudpdf.api.core.NullableNonemptyFilter;
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsFlatten200ResponseMeta.Builder.class)
+public final class DocAnnotationsFlatten200ResponseMeta {
+ private final List affectedPages;
+
+ private final Optional cacheDelta;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsFlatten200ResponseMeta(
+ List affectedPages,
+ Optional cacheDelta,
+ Map additionalProperties) {
+ this.affectedPages = affectedPages;
+ this.cacheDelta = cacheDelta;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("affectedPages")
+ public List getAffectedPages() {
+ return affectedPages;
+ }
+
+ @JsonIgnore
+ public Optional getCacheDelta() {
+ if (cacheDelta == null) {
+ return Optional.empty();
+ }
+ return cacheDelta;
+ }
+
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("cacheDelta")
+ private Optional _getCacheDelta() {
+ return cacheDelta;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200ResponseMeta
+ && equalTo((DocAnnotationsFlatten200ResponseMeta) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsFlatten200ResponseMeta other) {
+ return affectedPages.equals(other.affectedPages) && cacheDelta.equals(other.cacheDelta);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.affectedPages, this.cacheDelta);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private List affectedPages = new ArrayList<>();
+
+ private Optional cacheDelta = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(DocAnnotationsFlatten200ResponseMeta other) {
+ affectedPages(other.getAffectedPages());
+ cacheDelta(other.getCacheDelta());
+ return this;
+ }
+
+ @JsonSetter(value = "affectedPages", nulls = Nulls.SKIP)
+ public Builder affectedPages(List affectedPages) {
+ this.affectedPages.clear();
+ if (affectedPages != null) {
+ this.affectedPages.addAll(affectedPages);
+ }
+ return this;
+ }
+
+ public Builder addAffectedPages(DocAnnotationsFlatten200ResponseMetaAffectedPagesItem affectedPages) {
+ this.affectedPages.add(affectedPages);
+ return this;
+ }
+
+ public Builder addAllAffectedPages(List affectedPages) {
+ if (affectedPages != null) {
+ this.affectedPages.addAll(affectedPages);
+ }
+ return this;
+ }
+
+ @JsonSetter(value = "cacheDelta", nulls = Nulls.SKIP)
+ public Builder cacheDelta(Optional cacheDelta) {
+ this.cacheDelta = cacheDelta;
+ return this;
+ }
+
+ public Builder cacheDelta(DocAnnotationsFlatten200ResponseMetaCacheDelta cacheDelta) {
+ this.cacheDelta = Optional.ofNullable(cacheDelta);
+ return this;
+ }
+
+ public Builder cacheDelta(Nullable cacheDelta) {
+ if (cacheDelta.isNull()) {
+ this.cacheDelta = null;
+ } else if (cacheDelta.isEmpty()) {
+ this.cacheDelta = Optional.empty();
+ } else {
+ this.cacheDelta = Optional.of(cacheDelta.get());
+ }
+ return this;
+ }
+
+ public DocAnnotationsFlatten200ResponseMeta build() {
+ return new DocAnnotationsFlatten200ResponseMeta(affectedPages, cacheDelta, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItem.java b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItem.java
new file mode 100644
index 0000000..65b53c2
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItem.java
@@ -0,0 +1,176 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsFlatten200ResponseMetaAffectedPagesItem.Builder.class)
+public final class DocAnnotationsFlatten200ResponseMetaAffectedPagesItem {
+ private final int pageObjectNumber;
+
+ private final DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision revision;
+
+ private final DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState weakAnnotationState;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItem(
+ int pageObjectNumber,
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision revision,
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState weakAnnotationState,
+ Map additionalProperties) {
+ this.pageObjectNumber = pageObjectNumber;
+ this.revision = revision;
+ this.weakAnnotationState = weakAnnotationState;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("pageObjectNumber")
+ public int getPageObjectNumber() {
+ return pageObjectNumber;
+ }
+
+ @JsonProperty("revision")
+ public DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision getRevision() {
+ return revision;
+ }
+
+ @JsonProperty("weakAnnotationState")
+ public DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState getWeakAnnotationState() {
+ return weakAnnotationState;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200ResponseMetaAffectedPagesItem
+ && equalTo((DocAnnotationsFlatten200ResponseMetaAffectedPagesItem) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsFlatten200ResponseMetaAffectedPagesItem other) {
+ return pageObjectNumber == other.pageObjectNumber
+ && revision.equals(other.revision)
+ && weakAnnotationState.equals(other.weakAnnotationState);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.pageObjectNumber, this.revision, this.weakAnnotationState);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static PageObjectNumberStage builder() {
+ return new Builder();
+ }
+
+ public interface PageObjectNumberStage {
+ RevisionStage pageObjectNumber(int pageObjectNumber);
+
+ Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItem other);
+ }
+
+ public interface RevisionStage {
+ WeakAnnotationStateStage revision(
+ @NotNull DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision revision);
+ }
+
+ public interface WeakAnnotationStateStage {
+ _FinalStage weakAnnotationState(
+ @NotNull DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState weakAnnotationState);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItem build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder
+ implements PageObjectNumberStage, RevisionStage, WeakAnnotationStateStage, _FinalStage {
+ private int pageObjectNumber;
+
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision revision;
+
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState weakAnnotationState;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItem other) {
+ pageObjectNumber(other.getPageObjectNumber());
+ revision(other.getRevision());
+ weakAnnotationState(other.getWeakAnnotationState());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("pageObjectNumber")
+ public RevisionStage pageObjectNumber(int pageObjectNumber) {
+ this.pageObjectNumber = pageObjectNumber;
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("revision")
+ public WeakAnnotationStateStage revision(
+ @NotNull DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision revision) {
+ this.revision = Objects.requireNonNull(revision, "revision must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("weakAnnotationState")
+ public _FinalStage weakAnnotationState(
+ @NotNull DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState weakAnnotationState) {
+ this.weakAnnotationState =
+ Objects.requireNonNull(weakAnnotationState, "weakAnnotationState must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsFlatten200ResponseMetaAffectedPagesItem build() {
+ return new DocAnnotationsFlatten200ResponseMetaAffectedPagesItem(
+ pageObjectNumber, revision, weakAnnotationState, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision.java b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision.java
new file mode 100644
index 0000000..e9a07fd
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision.java
@@ -0,0 +1,168 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision.Builder.class)
+public final class DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision {
+ private final String docSessionId;
+
+ private final int pageObjectNumber;
+
+ private final int generation;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision(
+ String docSessionId, int pageObjectNumber, int generation, Map additionalProperties) {
+ this.docSessionId = docSessionId;
+ this.pageObjectNumber = pageObjectNumber;
+ this.generation = generation;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("docSessionId")
+ public String getDocSessionId() {
+ return docSessionId;
+ }
+
+ @JsonProperty("pageObjectNumber")
+ public int getPageObjectNumber() {
+ return pageObjectNumber;
+ }
+
+ @JsonProperty("generation")
+ public int getGeneration() {
+ return generation;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision
+ && equalTo((DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision other) {
+ return docSessionId.equals(other.docSessionId)
+ && pageObjectNumber == other.pageObjectNumber
+ && generation == other.generation;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.docSessionId, this.pageObjectNumber, this.generation);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DocSessionIdStage builder() {
+ return new Builder();
+ }
+
+ public interface DocSessionIdStage {
+ PageObjectNumberStage docSessionId(@NotNull String docSessionId);
+
+ Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision other);
+ }
+
+ public interface PageObjectNumberStage {
+ GenerationStage pageObjectNumber(int pageObjectNumber);
+ }
+
+ public interface GenerationStage {
+ _FinalStage generation(int generation);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder
+ implements DocSessionIdStage, PageObjectNumberStage, GenerationStage, _FinalStage {
+ private String docSessionId;
+
+ private int pageObjectNumber;
+
+ private int generation;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision other) {
+ docSessionId(other.getDocSessionId());
+ pageObjectNumber(other.getPageObjectNumber());
+ generation(other.getGeneration());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("docSessionId")
+ public PageObjectNumberStage docSessionId(@NotNull String docSessionId) {
+ this.docSessionId = Objects.requireNonNull(docSessionId, "docSessionId must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("pageObjectNumber")
+ public GenerationStage pageObjectNumber(int pageObjectNumber) {
+ this.pageObjectNumber = pageObjectNumber;
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("generation")
+ public _FinalStage generation(int generation) {
+ this.generation = generation;
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision build() {
+ return new DocAnnotationsFlatten200ResponseMetaAffectedPagesItemRevision(
+ docSessionId, pageObjectNumber, generation, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState.java b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState.java
new file mode 100644
index 0000000..ade92d2
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState.java
@@ -0,0 +1,228 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonUnwrapped;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.Objects;
+import java.util.Optional;
+
+public final class DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState {
+ private final Value value;
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState(Value value) {
+ this.value = value;
+ }
+
+ public T visit(Visitor visitor) {
+ return value.visit(visitor);
+ }
+
+ public static DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState unknown(
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown value) {
+ return new DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState(new UnknownValue(value));
+ }
+
+ public static DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState known(
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown value) {
+ return new DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState(new KnownValue(value));
+ }
+
+ public boolean isUnknown() {
+ return value instanceof UnknownValue;
+ }
+
+ public boolean isKnown() {
+ return value instanceof KnownValue;
+ }
+
+ public boolean _isUnknown() {
+ return value instanceof _UnknownValue;
+ }
+
+ public Optional getUnknown() {
+ if (isUnknown()) {
+ return Optional.of(((UnknownValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ public Optional getKnown() {
+ if (isKnown()) {
+ return Optional.of(((KnownValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ public Optional _getUnknown() {
+ if (_isUnknown()) {
+ return Optional.of(((_UnknownValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState
+ && value.equals(
+ ((DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState) other).value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(value);
+ }
+
+ @Override
+ public String toString() {
+ return value.toString();
+ }
+
+ @JsonValue
+ private Value getValue() {
+ return this.value;
+ }
+
+ public interface Visitor {
+ T visitUnknown(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown unknown);
+
+ T visitKnown(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown known);
+
+ T _visitUnknown(Object unknownType);
+ }
+
+ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true, defaultImpl = _UnknownValue.class)
+ @JsonSubTypes({@JsonSubTypes.Type(UnknownValue.class), @JsonSubTypes.Type(KnownValue.class)})
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ private interface Value {
+ T visit(Visitor visitor);
+ }
+
+ @JsonTypeName("unknown")
+ @JsonIgnoreProperties("kind")
+ private static final class UnknownValue implements Value {
+ @JsonUnwrapped
+ @JsonIgnoreProperties(value = "kind", allowSetters = true)
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private UnknownValue() {}
+
+ private UnknownValue(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown value) {
+ this.value = value;
+ }
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor.visitUnknown(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof UnknownValue && equalTo((UnknownValue) other);
+ }
+
+ private boolean equalTo(UnknownValue other) {
+ return value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState{" + "value: " + value
+ + "}";
+ }
+ }
+
+ @JsonTypeName("known")
+ @JsonIgnoreProperties("kind")
+ private static final class KnownValue implements Value {
+ @JsonUnwrapped
+ @JsonIgnoreProperties(value = "kind", allowSetters = true)
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private KnownValue() {}
+
+ private KnownValue(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown value) {
+ this.value = value;
+ }
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor.visitKnown(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof KnownValue && equalTo((KnownValue) other);
+ }
+
+ private boolean equalTo(KnownValue other) {
+ return value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState{" + "value: " + value
+ + "}";
+ }
+ }
+
+ @JsonIgnoreProperties("kind")
+ private static final class _UnknownValue implements Value {
+ private String type;
+
+ @JsonValue
+ private Object value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private _UnknownValue(@JsonProperty("value") Object value) {}
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor._visitUnknown(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof _UnknownValue && equalTo((_UnknownValue) other);
+ }
+
+ private boolean equalTo(_UnknownValue other) {
+ return type.equals(other.type) && value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.type, this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState{" + "type: " + type
+ + ", value: " + value + "}";
+ }
+ }
+}
diff --git a/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.java b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.java
new file mode 100644
index 0000000..d6eb275
--- /dev/null
+++ b/src/main/java/api/types/DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.java
@@ -0,0 +1,120 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.cloudpdf.api.types;
+
+import com.cloudpdf.api.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.Builder.class)
+public final class DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown {
+ private final boolean hasAnyWeakAnnotations;
+
+ private final Map additionalProperties;
+
+ private DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown(
+ boolean hasAnyWeakAnnotations, Map additionalProperties) {
+ this.hasAnyWeakAnnotations = hasAnyWeakAnnotations;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("hasAnyWeakAnnotations")
+ public boolean getHasAnyWeakAnnotations() {
+ return hasAnyWeakAnnotations;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown
+ && equalTo((DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown other) {
+ return hasAnyWeakAnnotations == other.hasAnyWeakAnnotations;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.hasAnyWeakAnnotations);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static HasAnyWeakAnnotationsStage builder() {
+ return new Builder();
+ }
+
+ public interface HasAnyWeakAnnotationsStage {
+ _FinalStage hasAnyWeakAnnotations(boolean hasAnyWeakAnnotations);
+
+ Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown other);
+ }
+
+ public interface _FinalStage {
+ DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements HasAnyWeakAnnotationsStage, _FinalStage {
+ private boolean hasAnyWeakAnnotations;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown other) {
+ hasAnyWeakAnnotations(other.getHasAnyWeakAnnotations());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("hasAnyWeakAnnotations")
+ public _FinalStage hasAnyWeakAnnotations(boolean hasAnyWeakAnnotations) {
+ this.hasAnyWeakAnnotations = hasAnyWeakAnnotations;
+ return this;
+ }
+
+ @java.lang.Override
+ public DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown build() {
+ return new DocAnnotationsFlatten200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown(
+ hasAnyWeakAnnotations, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map