Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"base-exception-class-name": "CloudPDFException",
"base-api-exception-class-name": "CloudPDFApiException"
},
"originGitCommit": "9af4d9ee755d6e5c20a8055654e895a81b95fb83",
"originGitCommit": "7b7201308398662b3f0b9fdb47aca99f653b01b5",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.4.0",
"requestedVersion": "3.5.0",
"ciProvider": "github"
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ java {

group = 'com.cloudpdf'

version = '3.4.0'
version = '3.5.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand All @@ -73,7 +73,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cloudpdf'
artifactId = 'sdk'
version = '3.4.0'
version = '3.5.0'
from components.java
pom {
name = 'CloudPDF'
Expand Down
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "java",
"canonicalVersion": "3.4.0",
"sdkVersion": "3.4.0",
"canonicalVersion": "3.5.0",
"sdkVersion": "3.5.0",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "1416853fd5400e76cd33ffd218e90673faf6c8c8c50f86af1937ba6576efb27d",
"gitCommit": "9af4d9ee755d6e5c20a8055654e895a81b95fb83",
"openapiSha256": "6d3ad28f2a9e47e0e98945a6f8111bbc271a12e95ce8ac5f5eadbda260ad0d0e",
"gitCommit": "7b7201308398662b3f0b9fdb47aca99f653b01b5",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/api/AsyncCloudPDFClientBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AsyncCloudPDFClientBuilder {

private String token = null;

private String embedPdfVersion = "3.4";
private String embedPdfVersion = "3.5";

private Environment environment = Environment.SAAS;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/api/CloudPDFClientBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CloudPDFClientBuilder {

private String token = null;

private String embedPdfVersion = "3.4";
private String embedPdfVersion = "3.5";

private Environment environment = Environment.SAAS;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private ClientOptions(
{
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.cloudpdf:sdk");
put("X-Fern-SDK-Version", "3.4.0");
put("X-Fern-SDK-Version", "3.5.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/api/types/AnnotationDraftWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public final class AnnotationDraftWidget {

private final Optional<AnnotationDraftWidgetCheckStyle> checkStyle;

private final Optional<AnnotationDraftWidgetLayout> layout;

private final Optional<Object> field;

private final Optional<Object> fieldKind;
Expand Down Expand Up @@ -165,6 +167,7 @@ private AnnotationDraftWidget(
Optional<AnnotationDraftWidgetTextAlign> textAlign,
Optional<String> caption,
Optional<AnnotationDraftWidgetCheckStyle> checkStyle,
Optional<AnnotationDraftWidgetLayout> layout,
Optional<Object> field,
Optional<Object> fieldKind,
Optional<Object> hasMark,
Expand Down Expand Up @@ -213,6 +216,7 @@ private AnnotationDraftWidget(
this.textAlign = textAlign;
this.caption = caption;
this.checkStyle = checkStyle;
this.layout = layout;
this.field = field;
this.fieldKind = fieldKind;
this.hasMark = hasMark;
Expand Down Expand Up @@ -484,6 +488,14 @@ public Optional<AnnotationDraftWidgetCheckStyle> getCheckStyle() {
return checkStyle;
}

@JsonIgnore
public Optional<AnnotationDraftWidgetLayout> getLayout() {
if (layout == null) {
return Optional.empty();
}
return layout;
}

@JsonProperty("field")
public Optional<Object> getField() {
return field;
Expand Down Expand Up @@ -589,6 +601,12 @@ private Optional<AnnotationDraftWidgetCheckStyle> _getCheckStyle() {
return checkStyle;
}

@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
@JsonProperty("layout")
private Optional<AnnotationDraftWidgetLayout> _getLayout() {
return layout;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand Down Expand Up @@ -645,6 +663,7 @@ private boolean equalTo(AnnotationDraftWidget other) {
&& textAlign.equals(other.textAlign)
&& caption.equals(other.caption)
&& checkStyle.equals(other.checkStyle)
&& layout.equals(other.layout)
&& field.equals(other.field)
&& fieldKind.equals(other.fieldKind)
&& hasMark.equals(other.hasMark);
Expand Down Expand Up @@ -697,6 +716,7 @@ public int hashCode() {
this.textAlign,
this.caption,
this.checkStyle,
this.layout,
this.field,
this.fieldKind,
this.hasMark);
Expand Down Expand Up @@ -801,6 +821,8 @@ public static final class Builder {

private Optional<AnnotationDraftWidgetCheckStyle> checkStyle = Optional.empty();

private Optional<AnnotationDraftWidgetLayout> layout = Optional.empty();

private Optional<Object> field = Optional.empty();

private Optional<Object> fieldKind = Optional.empty();
Expand Down Expand Up @@ -857,6 +879,7 @@ public Builder from(AnnotationDraftWidget other) {
textAlign(other.getTextAlign());
caption(other.getCaption());
checkStyle(other.getCheckStyle());
layout(other.getLayout());
field(other.getField());
fieldKind(other.getFieldKind());
hasMark(other.getHasMark());
Expand Down Expand Up @@ -1512,6 +1535,28 @@ public Builder checkStyle(Nullable<AnnotationDraftWidgetCheckStyle> checkStyle)
return this;
}

@JsonSetter(value = "layout", nulls = Nulls.SKIP)
public Builder layout(Optional<AnnotationDraftWidgetLayout> layout) {
this.layout = layout;
return this;
}

public Builder layout(AnnotationDraftWidgetLayout layout) {
this.layout = Optional.ofNullable(layout);
return this;
}

public Builder layout(Nullable<AnnotationDraftWidgetLayout> layout) {
if (layout.isNull()) {
this.layout = null;
} else if (layout.isEmpty()) {
this.layout = Optional.empty();
} else {
this.layout = Optional.of(layout.get());
}
return this;
}

@JsonSetter(value = "field", nulls = Nulls.SKIP)
public Builder field(Optional<Object> field) {
this.field = field;
Expand Down Expand Up @@ -1591,6 +1636,7 @@ public AnnotationDraftWidget build() {
textAlign,
caption,
checkStyle,
layout,
field,
fieldKind,
hasMark,
Expand Down
139 changes: 139 additions & 0 deletions src/main/java/api/types/AnnotationDraftWidgetLayout.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
* 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 AnnotationDraftWidgetLayout {
public static final AnnotationDraftWidgetLayout CAPTION_OVER =
new AnnotationDraftWidgetLayout(Value.CAPTION_OVER, "caption-over");

public static final AnnotationDraftWidgetLayout CAPTION = new AnnotationDraftWidgetLayout(Value.CAPTION, "caption");

public static final AnnotationDraftWidgetLayout CAPTION_BELOW =
new AnnotationDraftWidgetLayout(Value.CAPTION_BELOW, "caption-below");

public static final AnnotationDraftWidgetLayout CAPTION_ABOVE =
new AnnotationDraftWidgetLayout(Value.CAPTION_ABOVE, "caption-above");

public static final AnnotationDraftWidgetLayout IMAGE = new AnnotationDraftWidgetLayout(Value.IMAGE, "image");

public static final AnnotationDraftWidgetLayout CAPTION_RIGHT =
new AnnotationDraftWidgetLayout(Value.CAPTION_RIGHT, "caption-right");

public static final AnnotationDraftWidgetLayout CAPTION_LEFT =
new AnnotationDraftWidgetLayout(Value.CAPTION_LEFT, "caption-left");

private final Value value;

private final String string;

AnnotationDraftWidgetLayout(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 AnnotationDraftWidgetLayout
&& this.string.equals(((AnnotationDraftWidgetLayout) other).string));
}

@java.lang.Override
public int hashCode() {
return this.string.hashCode();
}

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case CAPTION_OVER:
return visitor.visitCaptionOver();
case CAPTION:
return visitor.visitCaption();
case CAPTION_BELOW:
return visitor.visitCaptionBelow();
case CAPTION_ABOVE:
return visitor.visitCaptionAbove();
case IMAGE:
return visitor.visitImage();
case CAPTION_RIGHT:
return visitor.visitCaptionRight();
case CAPTION_LEFT:
return visitor.visitCaptionLeft();
case UNKNOWN:
default:
return visitor.visitUnknown(string);
}
}

@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static AnnotationDraftWidgetLayout valueOf(String value) {
switch (value) {
case "caption-over":
return CAPTION_OVER;
case "caption":
return CAPTION;
case "caption-below":
return CAPTION_BELOW;
case "caption-above":
return CAPTION_ABOVE;
case "image":
return IMAGE;
case "caption-right":
return CAPTION_RIGHT;
case "caption-left":
return CAPTION_LEFT;
default:
return new AnnotationDraftWidgetLayout(Value.UNKNOWN, value);
}
}

public enum Value {
CAPTION,

IMAGE,

CAPTION_BELOW,

CAPTION_ABOVE,

CAPTION_RIGHT,

CAPTION_LEFT,

CAPTION_OVER,

UNKNOWN
}

public interface Visitor<T> {
T visitCaption();

T visitImage();

T visitCaptionBelow();

T visitCaptionAbove();

T visitCaptionRight();

T visitCaptionLeft();

T visitCaptionOver();

T visitUnknown(String unknownType);
}
}
Loading
Loading