v1SpeechToSpeechVoiceIdStreamPostOutputFormatNullableFromJson function

V1SpeechToSpeechVoiceIdStreamPostOutputFormat? v1SpeechToSpeechVoiceIdStreamPostOutputFormatNullableFromJson(
  1. Object? v1SpeechToSpeechVoiceIdStreamPostOutputFormat, [
  2. V1SpeechToSpeechVoiceIdStreamPostOutputFormat? defaultValue
])

Implementation

enums.V1SpeechToSpeechVoiceIdStreamPostOutputFormat?
    v1SpeechToSpeechVoiceIdStreamPostOutputFormatNullableFromJson(
  Object? v1SpeechToSpeechVoiceIdStreamPostOutputFormat, [
  enums.V1SpeechToSpeechVoiceIdStreamPostOutputFormat? defaultValue,
]) {
  if (v1SpeechToSpeechVoiceIdStreamPostOutputFormat == null) {
    return null;
  }
  return enums.V1SpeechToSpeechVoiceIdStreamPostOutputFormat.values
          .firstWhereOrNull((e) =>
              e.value == v1SpeechToSpeechVoiceIdStreamPostOutputFormat) ??
      defaultValue;
}