Skip to content

Commit 9651a62

Browse files
SDK regeneration
1 parent 02464ec commit 9651a62

74 files changed

Lines changed: 2465 additions & 346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,3 @@ jobs:
3636

3737
- name: Test
3838
run: ./gradlew test
39-
publish:
40-
needs: [ compile, test ]
41-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42-
runs-on: ubuntu-latest
43-
44-
steps:
45-
- name: Checkout repo
46-
uses: actions/checkout@v3
47-
48-
- name: Set up Java
49-
id: setup-jre
50-
uses: actions/setup-java@v1
51-
with:
52-
java-version: "11"
53-
architecture: x64
54-
55-
- name: Publish to maven
56-
run: |
57-
./.publish/prepare.sh
58-
./gradlew publish
59-
env:
60-
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
61-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
62-
MAVEN_PUBLISH_REGISTRY_URL: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
63-
MAVEN_SIGNATURE_KID: ${{ secrets.MAVEN_SIGNATURE_KID }}
64-
MAVEN_SIGNATURE_SECRET_KEY: ${{ secrets.MAVEN_SIGNATURE_SECRET_KEY }}
65-
MAVEN_SIGNATURE_PASSWORD: ${{ secrets.MAVEN_SIGNATURE_PASSWORD }}

.publish/prepare.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

build.gradle

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ plugins {
22
id 'java-library'
33
id 'maven-publish'
44
id 'com.diffplug.spotless' version '6.11.0'
5-
id 'signing'
65
}
76

87
repositories {
98
mavenCentral()
109
maven {
11-
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
10+
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
1211
}
1312
}
1413

@@ -36,53 +35,9 @@ java {
3635
withJavadocJar()
3736
}
3837

39-
signing {
40-
sign(publishing.publications)
41-
}
4238
test {
4339
useJUnitPlatform()
4440
testLogging {
4541
showStandardStreams = true
4642
}
4743
}
48-
publishing {
49-
publications {
50-
maven(MavenPublication) {
51-
groupId = 'com.polytomic'
52-
artifactId = 'polytomic-java'
53-
version = '1.15.8'
54-
from components.java
55-
pom {
56-
name = 'polytomic'
57-
description = 'The official SDK of polytomic'
58-
url = 'https://buildwithfern.com'
59-
licenses {
60-
license {
61-
name = 'MIT'
62-
}
63-
}
64-
developers {
65-
developer {
66-
name = 'polytomic'
67-
email = 'developers@polytomic.com'
68-
}
69-
}
70-
scm {
71-
connection = 'scm:git:git://github.com/polytomic/polytomic-java.git'
72-
developerConnection = 'scm:git:git://github.com/polytomic/polytomic-java.git'
73-
url = 'https://github.com/polytomic/polytomic-java'
74-
}
75-
}
76-
}
77-
}
78-
repositories {
79-
maven {
80-
url "$System.env.MAVEN_PUBLISH_REGISTRY_URL"
81-
credentials {
82-
username "$System.env.MAVEN_USERNAME"
83-
password "$System.env.MAVEN_PASSWORD"
84-
}
85-
}
86-
}
87-
}
88-

gradle.properties

Whitespace-only changes.

src/main/java/com/polytomic/api/PolytomicBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ public Polytomic build() {
4646
throw new RuntimeException("Please provide token");
4747
}
4848
this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + this.token);
49-
if (version != null) {
50-
this.clientOptionsBuilder.addHeader("X-Polytomic-Version", this.version);
49+
if (version == null) {
50+
throw new RuntimeException("Please provide version");
5151
}
52+
this.clientOptionsBuilder.addHeader("X-Polytomic-Version", this.version);
5253
clientOptionsBuilder.environment(this.environment);
5354
return new Polytomic(clientOptionsBuilder.build());
5455
}

src/main/java/com/polytomic/api/core/ClientOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private ClientOptions(
3030
{
3131
put("X-Fern-Language", "JAVA");
3232
put("X-Fern-SDK-Name", "com.polytomic.fern:api-sdk");
33-
put("X-Fern-SDK-Version", "1.15.8");
33+
put("X-Fern-SDK-Version", "0.0.136");
3434
}
3535
});
3636
this.headerSuppliers = headerSuppliers;

src/main/java/com/polytomic/api/resources/bulksync/BulkSyncClient.java

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
import com.polytomic.api.core.RequestOptions;
1111
import com.polytomic.api.core.Suppliers;
1212
import com.polytomic.api.resources.bulksync.executions.ExecutionsClient;
13+
import com.polytomic.api.resources.bulksync.requests.BulkSyncActivateRequest;
14+
import com.polytomic.api.resources.bulksync.requests.BulkSyncGetDestinationRequest;
1315
import com.polytomic.api.resources.bulksync.requests.BulkSyncGetRequest;
1416
import com.polytomic.api.resources.bulksync.requests.BulkSyncGetSourceRequest;
17+
import com.polytomic.api.resources.bulksync.requests.BulkSyncGetStatusRequest;
1518
import com.polytomic.api.resources.bulksync.requests.BulkSyncListRequest;
1619
import com.polytomic.api.resources.bulksync.requests.BulkSyncRemoveRequest;
1720
import com.polytomic.api.resources.bulksync.requests.CreateBulkSyncRequest;
@@ -20,7 +23,6 @@
2023
import com.polytomic.api.resources.bulksync.schedules.SchedulesClient;
2124
import com.polytomic.api.resources.bulksync.schemas.SchemasClient;
2225
import com.polytomic.api.types.ActivateSyncEnvelope;
23-
import com.polytomic.api.types.ActivateSyncInput;
2426
import com.polytomic.api.types.BulkSyncDestEnvelope;
2527
import com.polytomic.api.types.BulkSyncExecutionEnvelope;
2628
import com.polytomic.api.types.BulkSyncListEnvelope;
@@ -315,11 +317,11 @@ public void remove(String id, BulkSyncRemoveRequest request, RequestOptions requ
315317
}
316318
}
317319

318-
public ActivateSyncEnvelope activate(String id, ActivateSyncInput request) {
320+
public ActivateSyncEnvelope activate(String id, BulkSyncActivateRequest request) {
319321
return activate(id, request, null);
320322
}
321323

322-
public ActivateSyncEnvelope activate(String id, ActivateSyncInput request, RequestOptions requestOptions) {
324+
public ActivateSyncEnvelope activate(String id, BulkSyncActivateRequest request, RequestOptions requestOptions) {
323325
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
324326
.newBuilder()
325327
.addPathSegments("api/bulk/syncs")
@@ -406,22 +408,27 @@ public BulkSyncExecutionEnvelope start(String id, StartBulkSyncRequest request,
406408
}
407409

408410
public BulkSyncStatusEnvelope getStatus(String id) {
409-
return getStatus(id, null);
411+
return getStatus(id, BulkSyncGetStatusRequest.builder().build());
410412
}
411413

412-
public BulkSyncStatusEnvelope getStatus(String id, RequestOptions requestOptions) {
414+
public BulkSyncStatusEnvelope getStatus(String id, BulkSyncGetStatusRequest request) {
415+
return getStatus(id, request, null);
416+
}
417+
418+
public BulkSyncStatusEnvelope getStatus(
419+
String id, BulkSyncGetStatusRequest request, RequestOptions requestOptions) {
413420
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
414421
.newBuilder()
415422
.addPathSegments("api/bulk/syncs")
416423
.addPathSegment(id)
417424
.addPathSegments("status")
418425
.build();
419-
Request okhttpRequest = new Request.Builder()
426+
Request.Builder _requestBuilder = new Request.Builder()
420427
.url(httpUrl)
421428
.method("GET", null)
422429
.headers(Headers.of(clientOptions.headers(requestOptions)))
423-
.addHeader("Content-Type", "application/json")
424-
.build();
430+
.addHeader("Content-Type", "application/json");
431+
Request okhttpRequest = _requestBuilder.build();
425432
try {
426433
OkHttpClient client = clientOptions.httpClient();
427434
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -486,22 +493,27 @@ public BulkSyncSourceEnvelope getSource(
486493
}
487494

488495
public BulkSyncDestEnvelope getDestination(String id) {
489-
return getDestination(id, null);
496+
return getDestination(id, BulkSyncGetDestinationRequest.builder().build());
490497
}
491498

492-
public BulkSyncDestEnvelope getDestination(String id, RequestOptions requestOptions) {
499+
public BulkSyncDestEnvelope getDestination(String id, BulkSyncGetDestinationRequest request) {
500+
return getDestination(id, request, null);
501+
}
502+
503+
public BulkSyncDestEnvelope getDestination(
504+
String id, BulkSyncGetDestinationRequest request, RequestOptions requestOptions) {
493505
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
494506
.newBuilder()
495507
.addPathSegments("api/connections")
496508
.addPathSegment(id)
497509
.addPathSegments("bulksync/target")
498510
.build();
499-
Request okhttpRequest = new Request.Builder()
511+
Request.Builder _requestBuilder = new Request.Builder()
500512
.url(httpUrl)
501513
.method("GET", null)
502514
.headers(Headers.of(clientOptions.headers(requestOptions)))
503-
.addHeader("Content-Type", "application/json")
504-
.build();
515+
.addHeader("Content-Type", "application/json");
516+
Request okhttpRequest = _requestBuilder.build();
505517
try {
506518
OkHttpClient client = clientOptions.httpClient();
507519
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {

src/main/java/com/polytomic/api/resources/bulksync/executions/ExecutionsClient.java

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import com.polytomic.api.core.ObjectMappers;
99
import com.polytomic.api.core.RequestOptions;
1010
import com.polytomic.api.resources.bulksync.executions.requests.ExecutionsExportLogsRequest;
11+
import com.polytomic.api.resources.bulksync.executions.requests.ExecutionsGetLogsRequest;
12+
import com.polytomic.api.resources.bulksync.executions.requests.ExecutionsGetRequest;
1113
import com.polytomic.api.resources.bulksync.executions.requests.ExecutionsListRequest;
1214
import com.polytomic.api.resources.bulksync.executions.requests.ExecutionsListStatusRequest;
1315
import com.polytomic.api.types.BulkSyncExecutionEnvelope;
@@ -133,23 +135,28 @@ public ListBulkSyncExecutionsEnvelope list(
133135
}
134136

135137
public BulkSyncExecutionEnvelope get(String id, String execId) {
136-
return get(id, execId, null);
138+
return get(id, execId, ExecutionsGetRequest.builder().build());
137139
}
138140

139-
public BulkSyncExecutionEnvelope get(String id, String execId, RequestOptions requestOptions) {
141+
public BulkSyncExecutionEnvelope get(String id, String execId, ExecutionsGetRequest request) {
142+
return get(id, execId, request, null);
143+
}
144+
145+
public BulkSyncExecutionEnvelope get(
146+
String id, String execId, ExecutionsGetRequest request, RequestOptions requestOptions) {
140147
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
141148
.newBuilder()
142149
.addPathSegments("api/bulk/syncs")
143150
.addPathSegment(id)
144151
.addPathSegments("executions")
145152
.addPathSegment(execId)
146153
.build();
147-
Request okhttpRequest = new Request.Builder()
154+
Request.Builder _requestBuilder = new Request.Builder()
148155
.url(httpUrl)
149156
.method("GET", null)
150157
.headers(Headers.of(clientOptions.headers(requestOptions)))
151-
.addHeader("Content-Type", "application/json")
152-
.build();
158+
.addHeader("Content-Type", "application/json");
159+
Request okhttpRequest = _requestBuilder.build();
153160
try {
154161
OkHttpClient client = clientOptions.httpClient();
155162
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -170,10 +177,16 @@ public BulkSyncExecutionEnvelope get(String id, String execId, RequestOptions re
170177
}
171178

172179
public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId) {
173-
return getLogs(syncId, executionId, null);
180+
return getLogs(syncId, executionId, ExecutionsGetLogsRequest.builder().build());
174181
}
175182

176-
public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId, RequestOptions requestOptions) {
183+
public V4BulkSyncExecutionLogsEnvelope getLogs(
184+
String syncId, String executionId, ExecutionsGetLogsRequest request) {
185+
return getLogs(syncId, executionId, request, null);
186+
}
187+
188+
public V4BulkSyncExecutionLogsEnvelope getLogs(
189+
String syncId, String executionId, ExecutionsGetLogsRequest request, RequestOptions requestOptions) {
177190
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
178191
.newBuilder()
179192
.addPathSegments("api/bulk/syncs")
@@ -182,12 +195,12 @@ public V4BulkSyncExecutionLogsEnvelope getLogs(String syncId, String executionId
182195
.addPathSegment(executionId)
183196
.addPathSegments("logs")
184197
.build();
185-
Request okhttpRequest = new Request.Builder()
198+
Request.Builder _requestBuilder = new Request.Builder()
186199
.url(httpUrl)
187200
.method("GET", null)
188201
.headers(Headers.of(clientOptions.headers(requestOptions)))
189-
.addHeader("Content-Type", "application/json")
190-
.build();
202+
.addHeader("Content-Type", "application/json");
203+
Request okhttpRequest = _requestBuilder.build();
191204
try {
192205
OkHttpClient client = clientOptions.httpClient();
193206
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
package com.polytomic.api.resources.bulksync.executions.requests;
5+
6+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
7+
import com.polytomic.api.core.ObjectMappers;
8+
import java.util.Map;
9+
10+
public final class ExecutionsGetLogsRequest {
11+
private final Map<String, Object> additionalProperties;
12+
13+
private ExecutionsGetLogsRequest(Map<String, Object> additionalProperties) {
14+
this.additionalProperties = additionalProperties;
15+
}
16+
17+
@java.lang.Override
18+
public boolean equals(Object other) {
19+
if (this == other) return true;
20+
return other instanceof ExecutionsGetLogsRequest;
21+
}
22+
23+
@JsonAnyGetter
24+
public Map<String, Object> getAdditionalProperties() {
25+
return this.additionalProperties;
26+
}
27+
28+
@java.lang.Override
29+
public String toString() {
30+
return ObjectMappers.stringify(this);
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
package com.polytomic.api.resources.bulksync.executions.requests;
5+
6+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
7+
import com.polytomic.api.core.ObjectMappers;
8+
import java.util.Map;
9+
10+
public final class ExecutionsGetRequest {
11+
private final Map<String, Object> additionalProperties;
12+
13+
private ExecutionsGetRequest(Map<String, Object> additionalProperties) {
14+
this.additionalProperties = additionalProperties;
15+
}
16+
17+
@java.lang.Override
18+
public boolean equals(Object other) {
19+
if (this == other) return true;
20+
return other instanceof ExecutionsGetRequest;
21+
}
22+
23+
@JsonAnyGetter
24+
public Map<String, Object> getAdditionalProperties() {
25+
return this.additionalProperties;
26+
}
27+
28+
@java.lang.Override
29+
public String toString() {
30+
return ObjectMappers.stringify(this);
31+
}
32+
}

0 commit comments

Comments
 (0)