Skip to content
Open
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 @@ -11,6 +11,6 @@
},
"enable-wire-tests": true
},
"originGitCommit": "e994b5ab79ae6fe3560daff055acdf80d315b48e",
"sdkVersion": "0.2.0"
"originGitCommit": "8bcf185d00ea632a19706a24a462d2205678b6c3",
"sdkVersion": "0.2.1"
}
6 changes: 3 additions & 3 deletions src/main/java/com/deepgram/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.deepgram:deepgram-java-sdk/0.2.0"); // x-release-please-version
put("User-Agent", "com.deepgram:deepgram-sdk/0.2.1");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.deepgram:deepgram-java-sdk");
put("X-Fern-SDK-Version", "0.2.0"); // x-release-please-version
put("X-Fern-SDK-Name", "com.deepgram.fern:api-sdk");
put("X-Fern-SDK-Version", "0.2.1");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.deepgram.resources.agent.v1.types;

import com.deepgram.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.databind.annotation.JsonDeserialize;
import java.util.HashMap;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = AgentV1ThinkUpdated.Builder.class)
public final class AgentV1ThinkUpdated {
private final Map<String, Object> additionalProperties;

private AgentV1ThinkUpdated(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
}

/**
* @return Message type identifier for think update confirmation
*/
@JsonProperty("type")
public String getType() {
return "ThinkUpdated";
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof AgentV1ThinkUpdated;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@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 {
@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

private Builder() {}

public Builder from(AgentV1ThinkUpdated other) {
return this;
}

public AgentV1ThinkUpdated build() {
return new AgentV1ThinkUpdated(additionalProperties);
}

public Builder additionalProperty(String key, Object value) {
this.additionalProperties.put(key, value);
return this;
}

public Builder additionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties.putAll(additionalProperties);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.deepgram.resources.agent.v1.types;

import com.deepgram.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 = AgentV1UpdateThink.Builder.class)
public final class AgentV1UpdateThink {
private final AgentV1UpdateThinkThink think;

private final Map<String, Object> additionalProperties;

private AgentV1UpdateThink(AgentV1UpdateThinkThink think, Map<String, Object> additionalProperties) {
this.think = think;
this.additionalProperties = additionalProperties;
}

/**
* @return Message type identifier for updating the think model
*/
@JsonProperty("type")
public String getType() {
return "UpdateThink";
}

@JsonProperty("think")
public AgentV1UpdateThinkThink getThink() {
return think;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof AgentV1UpdateThink && equalTo((AgentV1UpdateThink) other);
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

private boolean equalTo(AgentV1UpdateThink other) {
return think.equals(other.think);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.think);
}

@java.lang.Override
public String toString() {
return ObjectMappers.stringify(this);
}

public static ThinkStage builder() {
return new Builder();
}

public interface ThinkStage {
_FinalStage think(@NotNull AgentV1UpdateThinkThink think);

Builder from(AgentV1UpdateThink other);
}

public interface _FinalStage {
AgentV1UpdateThink build();

_FinalStage additionalProperty(String key, Object value);

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

@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements ThinkStage, _FinalStage {
private AgentV1UpdateThinkThink think;

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

private Builder() {}

@java.lang.Override
public Builder from(AgentV1UpdateThink other) {
think(other.getThink());
return this;
}

@java.lang.Override
@JsonSetter("think")
public _FinalStage think(@NotNull AgentV1UpdateThinkThink think) {
this.think = Objects.requireNonNull(think, "think must not be null");
return this;
}

@java.lang.Override
public AgentV1UpdateThink build() {
return new AgentV1UpdateThink(think, 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<String, Object> additionalProperties) {
this.additionalProperties.putAll(additionalProperties);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.deepgram.resources.agent.v1.types;

import com.deepgram.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
import java.util.List;
import java.util.Objects;

@JsonDeserialize(using = AgentV1UpdateThinkThink.Deserializer.class)
public final class AgentV1UpdateThinkThink {
private final Object value;

private final int type;

private AgentV1UpdateThinkThink(Object value, int type) {
this.value = value;
this.type = type;
}

@JsonValue
public Object get() {
return this.value;
}

@SuppressWarnings("unchecked")
public <T> T visit(Visitor<T> visitor) {
if (this.type == 0) {
return visitor.visit((AgentV1UpdateThinkThinkContextLength) this.value);
} else if (this.type == 1) {
return visitor.visit((List<AgentV1UpdateThinkThinkOneItem>) this.value);
}
throw new IllegalStateException("Failed to visit value. This should never happen.");
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof AgentV1UpdateThinkThink && equalTo((AgentV1UpdateThinkThink) other);
}

private boolean equalTo(AgentV1UpdateThinkThink other) {
return value.equals(other.value);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.value);
}

@java.lang.Override
public String toString() {
return this.value.toString();
}

public static AgentV1UpdateThinkThink of(AgentV1UpdateThinkThinkContextLength value) {
return new AgentV1UpdateThinkThink(value, 0);
}

public static AgentV1UpdateThinkThink of(List<AgentV1UpdateThinkThinkOneItem> value) {
return new AgentV1UpdateThinkThink(value, 1);
}

public interface Visitor<T> {
T visit(AgentV1UpdateThinkThinkContextLength value);

T visit(List<AgentV1UpdateThinkThinkOneItem> value);
}

static final class Deserializer extends StdDeserializer<AgentV1UpdateThinkThink> {
Deserializer() {
super(AgentV1UpdateThinkThink.class);
}

@java.lang.Override
public AgentV1UpdateThinkThink deserialize(JsonParser p, DeserializationContext context) throws IOException {
Object value = p.readValueAs(Object.class);
try {
return of(ObjectMappers.JSON_MAPPER.convertValue(value, AgentV1UpdateThinkThinkContextLength.class));
} catch (RuntimeException e) {
}
try {
return of(ObjectMappers.JSON_MAPPER.convertValue(
value, new TypeReference<List<AgentV1UpdateThinkThinkOneItem>>() {}));
} catch (RuntimeException e) {
}
throw new JsonParseException(p, "Failed to deserialize");
}
}
}
Loading
Loading