Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Mar 18, 2024
1 parent a816472 commit c5ea0d1
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.assemblyai'
artifactId = 'assemblyai-java'
version = '1.0.8'
version = '1.0.9'
from components.java
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.assemblyai.api.resources.realtime.types;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public final class Realtime {
public static final Realtime PCM_S16LE = new Realtime(Value.PCM_S16LE, "pcm_s16le");

public static final Realtime PCM_MULAW = new Realtime(Value.PCM_MULAW, "pcm_mulaw");

private final Value value;

private final String string;

Realtime(Value value, String string) {
this.value = value;
this.string = string;
}

public Value getEnumValue() {
return value;
}

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

@java.lang.Override
public boolean equals(Object other) {
return (this == other) || (other instanceof Realtime && this.string.equals(((Realtime) other).string));
}

@java.lang.Override
public int hashCode() {
return this.string.hashCode();
}

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case PCM_S16LE:
return visitor.visitPcmS16le();
case PCM_MULAW:
return visitor.visitPcmMulaw();
case UNKNOWN:
default:
return visitor.visitUnknown(string);
}
}

@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static Realtime valueOf(String value) {
switch (value) {
case "pcm_s16le":
return PCM_S16LE;
case "pcm_mulaw":
return PCM_MULAW;
default:
return new Realtime(Value.UNKNOWN, value);
}
}

public enum Value {
PCM_S16LE,

PCM_MULAW,

UNKNOWN
}

public interface Visitor<T> {
T visitPcmS16le();

T visitPcmMulaw();

T visitUnknown(String unknownType);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.fasterxml.jackson.annotation.JsonValue;

public final class SpeechModel {
public static final SpeechModel CONFORMER2 = new SpeechModel(Value.CONFORMER2, "conformer-2");

public static final SpeechModel NANO = new SpeechModel(Value.NANO, "nano");

private final Value value;
Expand Down Expand Up @@ -40,6 +42,8 @@ public int hashCode() {

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case CONFORMER2:
return visitor.visitConformer2();
case NANO:
return visitor.visitNano();
case UNKNOWN:
Expand All @@ -51,6 +55,8 @@ public <T> T visit(Visitor<T> visitor) {
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static SpeechModel valueOf(String value) {
switch (value) {
case "conformer-2":
return CONFORMER2;
case "nano":
return NANO;
default:
Expand All @@ -61,12 +67,16 @@ public static SpeechModel valueOf(String value) {
public enum Value {
NANO,

CONFORMER2,

UNKNOWN
}

public interface Visitor<T> {
T visitNano();

T visitConformer2();

T visitUnknown(String unknownType);
}
}

0 comments on commit c5ea0d1

Please sign in to comment.