
com.bandwidth.sdk.model.RecordingStateEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bandwidth-sdk Show documentation
Show all versions of bandwidth-sdk Show documentation
The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs
/*
* Bandwidth
* Bandwidth's Communication APIs
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.bandwidth.sdk.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* The recording state. Possible values: `paused` to pause an active recording `recording` to resume a paused recording
*/
@JsonAdapter(RecordingStateEnum.Adapter.class)
public enum RecordingStateEnum {
PAUSED("paused"),
RECORDING("recording");
private String value;
RecordingStateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static RecordingStateEnum fromValue(String value) {
for (RecordingStateEnum b : RecordingStateEnum.values()) {
if (b.value.equalsIgnoreCase(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final RecordingStateEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public RecordingStateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return RecordingStateEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
RecordingStateEnum.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy