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": "32635f40577b214f6a6b3189a2271425c3a574fd",
"originGitCommit": "1345fb7a45ee660a352774d29decce25cb54b8ea",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-alpha.6",
"requestedVersion": "3.0.0-alpha.7",
"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.0.0-alpha.6'
version = '3.0.0-alpha.7'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand All @@ -73,7 +73,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cloudpdf'
artifactId = 'sdk'
version = '3.0.0-alpha.6'
version = '3.0.0-alpha.7'
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.0.0-next.6",
"sdkVersion": "3.0.0-alpha.6",
"canonicalVersion": "3.0.0-next.7",
"sdkVersion": "3.0.0-alpha.7",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "b3e236a932673e27e05825352e1bc3675369d7505040bf7d7760e542aae8d38d",
"gitCommit": "32635f40577b214f6a6b3189a2271425c3a574fd",
"openapiSha256": "f6fc610bfd193f278a7e8ec063d9e96b8fef86bdec7ade5e7bc4b19879673147",
"gitCommit": "1345fb7a45ee660a352774d29decce25cb54b8ea",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
12 changes: 6 additions & 6 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1695,15 +1695,15 @@ client.documents().importFrom(
<dl>
<dd>

**source:** `DocumentsImportFromRequestSource`
**source:** `DocumentsImportFromRequestSource` — Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file.

</dd>
</dl>

<dl>
<dd>

**expected:** `Optional<DocumentsImportFromRequestExpected>`
**expected:** `Optional<DocumentsImportFromRequestExpected>` — Integrity pins, enforced when present. When absent, the server-observed values become authoritative.

</dd>
</dl>
Expand All @@ -1719,15 +1719,15 @@ client.documents().importFrom(
<dl>
<dd>

**idempotencyKey:** `Optional<String>`
**idempotencyKey:** `Optional<String>` — Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.

</dd>
</dl>

<dl>
<dd>

**dedupMode:** `Optional<DocumentsImportFromRequestDedupMode>`
**dedupMode:** `Optional<DocumentsImportFromRequestDedupMode>` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.

</dd>
</dl>
Expand All @@ -1743,7 +1743,7 @@ client.documents().importFrom(
<dl>
<dd>

**mode:** `Optional<DocumentsImportFromRequestMode>`
**mode:** `Optional<DocumentsImportFromRequestMode>` — sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.

</dd>
</dl>
Expand Down Expand Up @@ -1830,7 +1830,7 @@ client.documents().init(
<dl>
<dd>

**dedupMode:** `Optional<DocumentsInitRequestDedupMode>`
**dedupMode:** `Optional<DocumentsInitRequestDedupMode>` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.

</dd>
</dl>
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.0.0-alpha.6");
put("X-Fern-SDK-Version", "3.0.0-alpha.7");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ private DocumentsImportFromRequest(
this.additionalProperties = additionalProperties;
}

/**
* @return Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file.
*/
@JsonProperty("source")
public DocumentsImportFromRequestSource getSource() {
return source;
}

/**
* @return Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
*/
@JsonProperty("expected")
public Optional<DocumentsImportFromRequestExpected> getExpected() {
return expected;
Expand All @@ -75,11 +81,17 @@ public Optional<Map<String, Object>> getMetadata() {
return metadata;
}

/**
* @return Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.
*/
@JsonProperty("idempotencyKey")
public Optional<String> getIdempotencyKey() {
return idempotencyKey;
}

/**
* @return always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
*/
@JsonProperty("dedupMode")
public Optional<DocumentsImportFromRequestDedupMode> getDedupMode() {
return dedupMode;
Expand All @@ -90,6 +102,9 @@ public Optional<String> getDocId() {
return docId;
}

/**
* @return sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.
*/
@JsonProperty("mode")
public Optional<DocumentsImportFromRequestMode> getMode() {
return mode;
Expand Down Expand Up @@ -132,6 +147,9 @@ public static SourceStage builder() {
}

public interface SourceStage {
/**
* <p>Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file.</p>
*/
_FinalStage source(@NotNull DocumentsImportFromRequestSource source);

Builder from(DocumentsImportFromRequest other);
Expand All @@ -144,6 +162,9 @@ public interface _FinalStage {

_FinalStage additionalProperties(Map<String, Object> additionalProperties);

/**
* <p>Integrity pins, enforced when present. When absent, the server-observed values become authoritative.</p>
*/
_FinalStage expected(Optional<DocumentsImportFromRequestExpected> expected);

_FinalStage expected(DocumentsImportFromRequestExpected expected);
Expand All @@ -152,10 +173,16 @@ public interface _FinalStage {

_FinalStage metadata(Map<String, Object> metadata);

/**
* <p>Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.</p>
*/
_FinalStage idempotencyKey(Optional<String> idempotencyKey);

_FinalStage idempotencyKey(String idempotencyKey);

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
*/
_FinalStage dedupMode(Optional<DocumentsImportFromRequestDedupMode> dedupMode);

_FinalStage dedupMode(DocumentsImportFromRequestDedupMode dedupMode);
Expand All @@ -164,6 +191,9 @@ public interface _FinalStage {

_FinalStage docId(String docId);

/**
* <p>sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.</p>
*/
_FinalStage mode(Optional<DocumentsImportFromRequestMode> mode);

_FinalStage mode(DocumentsImportFromRequestMode mode);
Expand Down Expand Up @@ -202,19 +232,30 @@ public Builder from(DocumentsImportFromRequest other) {
return this;
}

/**
* <p>Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("source")
public _FinalStage source(@NotNull DocumentsImportFromRequestSource source) {
this.source = Objects.requireNonNull(source, "source must not be null");
return this;
}

/**
* <p>sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage mode(DocumentsImportFromRequestMode mode) {
this.mode = Optional.ofNullable(mode);
return this;
}

/**
* <p>sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.</p>
*/
@java.lang.Override
@JsonSetter(value = "mode", nulls = Nulls.SKIP)
public _FinalStage mode(Optional<DocumentsImportFromRequestMode> mode) {
Expand All @@ -235,25 +276,39 @@ public _FinalStage docId(Optional<String> docId) {
return this;
}

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage dedupMode(DocumentsImportFromRequestDedupMode dedupMode) {
this.dedupMode = Optional.ofNullable(dedupMode);
return this;
}

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
*/
@java.lang.Override
@JsonSetter(value = "dedupMode", nulls = Nulls.SKIP)
public _FinalStage dedupMode(Optional<DocumentsImportFromRequestDedupMode> dedupMode) {
this.dedupMode = dedupMode;
return this;
}

/**
* <p>Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage idempotencyKey(String idempotencyKey) {
this.idempotencyKey = Optional.ofNullable(idempotencyKey);
return this;
}

/**
* <p>Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.</p>
*/
@java.lang.Override
@JsonSetter(value = "idempotencyKey", nulls = Nulls.SKIP)
public _FinalStage idempotencyKey(Optional<String> idempotencyKey) {
Expand All @@ -274,12 +329,19 @@ public _FinalStage metadata(Optional<Map<String, Object>> metadata) {
return this;
}

/**
* <p>Integrity pins, enforced when present. When absent, the server-observed values become authoritative.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage expected(DocumentsImportFromRequestExpected expected) {
this.expected = Optional.ofNullable(expected);
return this;
}

/**
* <p>Integrity pins, enforced when present. When absent, the server-observed values become authoritative.</p>
*/
@java.lang.Override
@JsonSetter(value = "expected", nulls = Nulls.SKIP)
public _FinalStage expected(Optional<DocumentsImportFromRequestExpected> expected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public Optional<String> getIdempotencyKey() {
return idempotencyKey;
}

/**
* @return always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
*/
@JsonProperty("dedupMode")
public Optional<DocumentsInitRequestDedupMode> getDedupMode() {
return dedupMode;
Expand Down Expand Up @@ -171,6 +174,9 @@ public interface _FinalStage {

_FinalStage idempotencyKey(String idempotencyKey);

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
*/
_FinalStage dedupMode(Optional<DocumentsInitRequestDedupMode> dedupMode);

_FinalStage dedupMode(DocumentsInitRequestDedupMode dedupMode);
Expand Down Expand Up @@ -277,12 +283,19 @@ public _FinalStage docId(Optional<String> docId) {
return this;
}

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage dedupMode(DocumentsInitRequestDedupMode dedupMode) {
this.dedupMode = Optional.ofNullable(dedupMode);
return this;
}

/**
* <p>always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.</p>
*/
@java.lang.Override
@JsonSetter(value = "dedupMode", nulls = Nulls.SKIP)
public _FinalStage dedupMode(Optional<DocumentsInitRequestDedupMode> dedupMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ private DocumentsImportFromRequestExpected(
this.additionalProperties = additionalProperties;
}

/**
* @return Checked against the source's declared Content-Length before the transfer.
*/
@JsonProperty("sizeBytes")
public Optional<Integer> getSizeBytes() {
return sizeBytes;
}

/**
* @return Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing.
*/
@JsonProperty("sha256")
public Optional<String> getSha256() {
return sha256;
Expand Down Expand Up @@ -90,6 +96,9 @@ public Builder from(DocumentsImportFromRequestExpected other) {
return this;
}

/**
* <p>Checked against the source's declared Content-Length before the transfer.</p>
*/
@JsonSetter(value = "sizeBytes", nulls = Nulls.SKIP)
public Builder sizeBytes(Optional<Integer> sizeBytes) {
this.sizeBytes = sizeBytes;
Expand All @@ -101,6 +110,9 @@ public Builder sizeBytes(Integer sizeBytes) {
return this;
}

/**
* <p>Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing.</p>
*/
@JsonSetter(value = "sha256", nulls = Nulls.SKIP)
public Builder sha256(Optional<String> sha256) {
this.sha256 = sha256;
Expand Down
Loading
Loading