From 75e8b0e10468c67682faf38064f5f2c7caacba5a Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:48:04 +0000 Subject: [PATCH] Release 0.0.0-alpha6 --- build.gradle | 10 ++--- .../java/com/vapi/api/core/ClientOptions.java | 2 +- .../java/com/vapi/api/types/PlayHtVoice.java | 12 +++--- ...HtVoiceVoiceId.java => PlayHtVoiceId.java} | 30 +++++++------- .../com/vapi/api/types/PlayHtVoiceIdEnum.java | 40 +++++++++++++++++++ 5 files changed, 67 insertions(+), 27 deletions(-) rename src/main/java/com/vapi/api/types/{PlayHtVoiceVoiceId.java => PlayHtVoiceId.java} (70%) create mode 100644 src/main/java/com/vapi/api/types/PlayHtVoiceIdEnum.java diff --git a/build.gradle b/build.gradle index 3e9ac56..684dd00 100644 --- a/build.gradle +++ b/build.gradle @@ -45,14 +45,14 @@ publishing { publications { maven(MavenPublication) { groupId = 'dev.vapi' - artifactId = 'vapi-java-sdk' - version = '0.0.0-alpha3' + artifactId = 'server-sdk' + version = '0.0.0-alpha6' from components.java pom { scm { - connection = 'scm:git:git://github.com/fern-demo/vapi-java-sdk.git' - developerConnection = 'scm:git:git://github.com/fern-demo/vapi-java-sdk.git' - url = 'https://github.com/fern-demo/vapi-java-sdk' + connection = 'scm:git:git://github.com/VapiAI/server-sdk-java.git' + developerConnection = 'scm:git:git://github.com/VapiAI/server-sdk-java.git' + url = 'https://github.com/VapiAI/server-sdk-java' } } } diff --git a/src/main/java/com/vapi/api/core/ClientOptions.java b/src/main/java/com/vapi/api/core/ClientOptions.java index d18e2c6..b17388c 100644 --- a/src/main/java/com/vapi/api/core/ClientOptions.java +++ b/src/main/java/com/vapi/api/core/ClientOptions.java @@ -30,7 +30,7 @@ private ClientOptions( { put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.vapi.fern:api-sdk"); - put("X-Fern-SDK-Version", "0.0.0-alpha3"); + put("X-Fern-SDK-Version", "0.0.0-alpha6"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/vapi/api/types/PlayHtVoice.java b/src/main/java/com/vapi/api/types/PlayHtVoice.java index 8d17353..2e35e30 100644 --- a/src/main/java/com/vapi/api/types/PlayHtVoice.java +++ b/src/main/java/com/vapi/api/types/PlayHtVoice.java @@ -23,7 +23,7 @@ public final class PlayHtVoice { private final Optional fillerInjectionEnabled; - private final PlayHtVoiceVoiceId voiceId; + private final PlayHtVoiceId voiceId; private final Optional speed; @@ -43,7 +43,7 @@ public final class PlayHtVoice { private PlayHtVoice( Optional fillerInjectionEnabled, - PlayHtVoiceVoiceId voiceId, + PlayHtVoiceId voiceId, Optional speed, Optional temperature, Optional emotion, @@ -77,7 +77,7 @@ public Optional getFillerInjectionEnabled() { * @return This is the provider-specific ID that will be used. */ @JsonProperty("voiceId") - public PlayHtVoiceVoiceId getVoiceId() { + public PlayHtVoiceId getVoiceId() { return voiceId; } @@ -184,7 +184,7 @@ public static VoiceIdStage builder() { } public interface VoiceIdStage { - _FinalStage voiceId(@NotNull PlayHtVoiceVoiceId voiceId); + _FinalStage voiceId(@NotNull PlayHtVoiceId voiceId); Builder from(PlayHtVoice other); } @@ -227,7 +227,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements VoiceIdStage, _FinalStage { - private PlayHtVoiceVoiceId voiceId; + private PlayHtVoiceId voiceId; private Optional chunkPlan = Optional.empty(); @@ -270,7 +270,7 @@ public Builder from(PlayHtVoice other) { */ @java.lang.Override @JsonSetter("voiceId") - public _FinalStage voiceId(@NotNull PlayHtVoiceVoiceId voiceId) { + public _FinalStage voiceId(@NotNull PlayHtVoiceId voiceId) { this.voiceId = Objects.requireNonNull(voiceId, "voiceId must not be null"); return this; } diff --git a/src/main/java/com/vapi/api/types/PlayHtVoiceVoiceId.java b/src/main/java/com/vapi/api/types/PlayHtVoiceId.java similarity index 70% rename from src/main/java/com/vapi/api/types/PlayHtVoiceVoiceId.java rename to src/main/java/com/vapi/api/types/PlayHtVoiceId.java index a7ed442..9c071f6 100644 --- a/src/main/java/com/vapi/api/types/PlayHtVoiceVoiceId.java +++ b/src/main/java/com/vapi/api/types/PlayHtVoiceId.java @@ -13,13 +13,13 @@ import java.io.IOException; import java.util.Objects; -@JsonDeserialize(using = PlayHtVoiceVoiceId.Deserializer.class) -public final class PlayHtVoiceVoiceId { +@JsonDeserialize(using = PlayHtVoiceId.Deserializer.class) +public final class PlayHtVoiceId { private final Object value; private final int type; - private PlayHtVoiceVoiceId(Object value, int type) { + private PlayHtVoiceId(Object value, int type) { this.value = value; this.type = type; } @@ -31,7 +31,7 @@ public Object get() { public T visit(Visitor visitor) { if (this.type == 0) { - return visitor.visit((PlayHtVoiceVoiceId) this.value); + return visitor.visit((PlayHtVoiceIdEnum) this.value); } else if (this.type == 1) { return visitor.visit((String) this.value); } @@ -41,10 +41,10 @@ public T visit(Visitor visitor) { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof PlayHtVoiceVoiceId && equalTo((PlayHtVoiceVoiceId) other); + return other instanceof PlayHtVoiceId && equalTo((PlayHtVoiceId) other); } - private boolean equalTo(PlayHtVoiceVoiceId other) { + private boolean equalTo(PlayHtVoiceId other) { return value.equals(other.value); } @@ -58,30 +58,30 @@ public String toString() { return this.value.toString(); } - public static PlayHtVoiceVoiceId of(PlayHtVoiceVoiceId value) { - return new PlayHtVoiceVoiceId(value, 0); + public static PlayHtVoiceId of(PlayHtVoiceIdEnum value) { + return new PlayHtVoiceId(value, 0); } - public static PlayHtVoiceVoiceId of(String value) { - return new PlayHtVoiceVoiceId(value, 1); + public static PlayHtVoiceId of(String value) { + return new PlayHtVoiceId(value, 1); } public interface Visitor { - T visit(PlayHtVoiceVoiceId value); + T visit(PlayHtVoiceIdEnum value); T visit(String value); } - static final class Deserializer extends StdDeserializer { + static final class Deserializer extends StdDeserializer { Deserializer() { - super(PlayHtVoiceVoiceId.class); + super(PlayHtVoiceId.class); } @java.lang.Override - public PlayHtVoiceVoiceId deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + public PlayHtVoiceId deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { Object value = p.readValueAs(Object.class); try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, PlayHtVoiceVoiceId.class)); + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PlayHtVoiceIdEnum.class)); } catch (IllegalArgumentException e) { } try { diff --git a/src/main/java/com/vapi/api/types/PlayHtVoiceIdEnum.java b/src/main/java/com/vapi/api/types/PlayHtVoiceIdEnum.java new file mode 100644 index 0000000..43890a2 --- /dev/null +++ b/src/main/java/com/vapi/api/types/PlayHtVoiceIdEnum.java @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.vapi.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum PlayHtVoiceIdEnum { + JENNIFER("jennifer"), + + MELISSA("melissa"), + + WILL("will"), + + CHRIS("chris"), + + MATT("matt"), + + JACK("jack"), + + RUBY("ruby"), + + DAVIS("davis"), + + DONNA("donna"), + + MICHAEL("michael"); + + private final String value; + + PlayHtVoiceIdEnum(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +}