Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
polytomic-sdk-bot committed Mar 13, 2024
1 parent 59c0aca commit e8e9b82
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 1,241 deletions.
8 changes: 0 additions & 8 deletions src/main/java/com/polytomic/api/Polytomic.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.polytomic.api.resources.bulksync.BulkSyncClient;
import com.polytomic.api.resources.connections.ConnectionsClient;
import com.polytomic.api.resources.events.EventsClient;
import com.polytomic.api.resources.jobs.JobsClient;
import com.polytomic.api.resources.models.ModelsClient;
import com.polytomic.api.resources.modelsync.ModelSyncClient;
import com.polytomic.api.resources.organization.OrganizationClient;
Expand All @@ -29,8 +28,6 @@ public class Polytomic {

protected final Supplier<EventsClient> eventsClient;

protected final Supplier<JobsClient> jobsClient;

protected final Supplier<ModelsClient> modelsClient;

protected final Supplier<OrganizationClient> organizationClient;
Expand All @@ -49,7 +46,6 @@ public Polytomic(ClientOptions clientOptions) {
this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions));
this.schemasClient = Suppliers.memoize(() -> new SchemasClient(clientOptions));
this.eventsClient = Suppliers.memoize(() -> new EventsClient(clientOptions));
this.jobsClient = Suppliers.memoize(() -> new JobsClient(clientOptions));
this.modelsClient = Suppliers.memoize(() -> new ModelsClient(clientOptions));
this.organizationClient = Suppliers.memoize(() -> new OrganizationClient(clientOptions));
this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions));
Expand All @@ -74,10 +70,6 @@ public EventsClient events() {
return this.eventsClient.get();
}

public JobsClient jobs() {
return this.jobsClient.get();
}

public ModelsClient models() {
return this.modelsClient.get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/polytomic/api/core/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.polytomic.api.core;

public final class Environment {
public static final Environment DEFAULT = new Environment("https://app.polytomic.com");
public static final Environment DEFAULT = new Environment("https://app.polytomic.com/");

private final String url;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.polytomic.api.core.ObjectMappers;
import com.polytomic.api.types.BulkDiscover;
import com.polytomic.api.types.BulkSchedule;
import java.util.HashMap;
import java.util.List;
Expand All @@ -25,9 +24,9 @@
public final class V2CreateBulkSyncRequest {
private final Optional<Boolean> active;

private final Optional<BulkDiscover> automaticallyAddNewFields;
private final Optional<Boolean> automaticallyAddNewFields;

private final Optional<BulkDiscover> automaticallyAddNewObjects;
private final Optional<Boolean> automaticallyAddNewObjects;

private final Optional<Map<String, Object>> destinationConfiguration;

Expand All @@ -37,7 +36,7 @@ public final class V2CreateBulkSyncRequest {

private final Optional<Boolean> discover;

private final Optional<String> mode;
private final String mode;

private final String name;

Expand All @@ -57,13 +56,13 @@ public final class V2CreateBulkSyncRequest {

private V2CreateBulkSyncRequest(
Optional<Boolean> active,
Optional<BulkDiscover> automaticallyAddNewFields,
Optional<BulkDiscover> automaticallyAddNewObjects,
Optional<Boolean> automaticallyAddNewFields,
Optional<Boolean> automaticallyAddNewObjects,
Optional<Map<String, Object>> destinationConfiguration,
String destinationConnectionId,
Optional<Boolean> disableRecordTimestamps,
Optional<Boolean> discover,
Optional<String> mode,
String mode,
String name,
Optional<String> organizationId,
Optional<List<String>> policies,
Expand Down Expand Up @@ -96,12 +95,12 @@ public Optional<Boolean> getActive() {
}

@JsonProperty("automatically_add_new_fields")
public Optional<BulkDiscover> getAutomaticallyAddNewFields() {
public Optional<Boolean> getAutomaticallyAddNewFields() {
return automaticallyAddNewFields;
}

@JsonProperty("automatically_add_new_objects")
public Optional<BulkDiscover> getAutomaticallyAddNewObjects() {
public Optional<Boolean> getAutomaticallyAddNewObjects() {
return automaticallyAddNewObjects;
}

Expand All @@ -128,11 +127,8 @@ public Optional<Boolean> getDiscover() {
return discover;
}

/**
* @return
*/
@JsonProperty("mode")
public Optional<String> getMode() {
public String getMode() {
return mode;
}

Expand Down Expand Up @@ -230,11 +226,15 @@ public static DestinationConnectionIdStage builder() {
}

public interface DestinationConnectionIdStage {
NameStage destinationConnectionId(String destinationConnectionId);
ModeStage destinationConnectionId(String destinationConnectionId);

Builder from(V2CreateBulkSyncRequest other);
}

public interface ModeStage {
NameStage mode(String mode);
}

public interface NameStage {
ScheduleStage name(String name);
}
Expand All @@ -254,13 +254,13 @@ public interface _FinalStage {

_FinalStage active(Boolean active);

_FinalStage automaticallyAddNewFields(Optional<BulkDiscover> automaticallyAddNewFields);
_FinalStage automaticallyAddNewFields(Optional<Boolean> automaticallyAddNewFields);

_FinalStage automaticallyAddNewFields(BulkDiscover automaticallyAddNewFields);
_FinalStage automaticallyAddNewFields(Boolean automaticallyAddNewFields);

_FinalStage automaticallyAddNewObjects(Optional<BulkDiscover> automaticallyAddNewObjects);
_FinalStage automaticallyAddNewObjects(Optional<Boolean> automaticallyAddNewObjects);

_FinalStage automaticallyAddNewObjects(BulkDiscover automaticallyAddNewObjects);
_FinalStage automaticallyAddNewObjects(Boolean automaticallyAddNewObjects);

_FinalStage destinationConfiguration(Optional<Map<String, Object>> destinationConfiguration);

Expand All @@ -274,10 +274,6 @@ public interface _FinalStage {

_FinalStage discover(Boolean discover);

_FinalStage mode(Optional<String> mode);

_FinalStage mode(String mode);

_FinalStage organizationId(Optional<String> organizationId);

_FinalStage organizationId(String organizationId);
Expand All @@ -297,9 +293,16 @@ public interface _FinalStage {

@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder
implements DestinationConnectionIdStage, NameStage, ScheduleStage, SourceConnectionIdStage, _FinalStage {
implements DestinationConnectionIdStage,
ModeStage,
NameStage,
ScheduleStage,
SourceConnectionIdStage,
_FinalStage {
private String destinationConnectionId;

private String mode;

private String name;

private BulkSchedule schedule;
Expand All @@ -314,17 +317,15 @@ public static final class Builder

private Optional<String> organizationId = Optional.empty();

private Optional<String> mode = Optional.empty();

private Optional<Boolean> discover = Optional.empty();

private Optional<Boolean> disableRecordTimestamps = Optional.empty();

private Optional<Map<String, Object>> destinationConfiguration = Optional.empty();

private Optional<BulkDiscover> automaticallyAddNewObjects = Optional.empty();
private Optional<Boolean> automaticallyAddNewObjects = Optional.empty();

private Optional<BulkDiscover> automaticallyAddNewFields = Optional.empty();
private Optional<Boolean> automaticallyAddNewFields = Optional.empty();

private Optional<Boolean> active = Optional.empty();

Expand Down Expand Up @@ -355,11 +356,18 @@ public Builder from(V2CreateBulkSyncRequest other) {

@java.lang.Override
@JsonSetter("destination_connection_id")
public NameStage destinationConnectionId(String destinationConnectionId) {
public ModeStage destinationConnectionId(String destinationConnectionId) {
this.destinationConnectionId = destinationConnectionId;
return this;
}

@java.lang.Override
@JsonSetter("mode")
public NameStage mode(String mode) {
this.mode = mode;
return this;
}

@java.lang.Override
@JsonSetter("name")
public ScheduleStage name(String name) {
Expand Down Expand Up @@ -433,22 +441,6 @@ public _FinalStage organizationId(Optional<String> organizationId) {
return this;
}

/**
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage mode(String mode) {
this.mode = Optional.of(mode);
return this;
}

@java.lang.Override
@JsonSetter(value = "mode", nulls = Nulls.SKIP)
public _FinalStage mode(Optional<String> mode) {
this.mode = mode;
return this;
}

/**
* <p>DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down Expand Up @@ -493,27 +485,27 @@ public _FinalStage destinationConfiguration(Optional<Map<String, Object>> destin
}

@java.lang.Override
public _FinalStage automaticallyAddNewObjects(BulkDiscover automaticallyAddNewObjects) {
public _FinalStage automaticallyAddNewObjects(Boolean automaticallyAddNewObjects) {
this.automaticallyAddNewObjects = Optional.of(automaticallyAddNewObjects);
return this;
}

@java.lang.Override
@JsonSetter(value = "automatically_add_new_objects", nulls = Nulls.SKIP)
public _FinalStage automaticallyAddNewObjects(Optional<BulkDiscover> automaticallyAddNewObjects) {
public _FinalStage automaticallyAddNewObjects(Optional<Boolean> automaticallyAddNewObjects) {
this.automaticallyAddNewObjects = automaticallyAddNewObjects;
return this;
}

@java.lang.Override
public _FinalStage automaticallyAddNewFields(BulkDiscover automaticallyAddNewFields) {
public _FinalStage automaticallyAddNewFields(Boolean automaticallyAddNewFields) {
this.automaticallyAddNewFields = Optional.of(automaticallyAddNewFields);
return this;
}

@java.lang.Override
@JsonSetter(value = "automatically_add_new_fields", nulls = Nulls.SKIP)
public _FinalStage automaticallyAddNewFields(Optional<BulkDiscover> automaticallyAddNewFields) {
public _FinalStage automaticallyAddNewFields(Optional<Boolean> automaticallyAddNewFields) {
this.automaticallyAddNewFields = automaticallyAddNewFields;
return this;
}
Expand Down
Loading

0 comments on commit e8e9b82

Please sign in to comment.