v1TextToSpeechVoiceIdStreamPostOutputFormatNullableFromJson function

V1TextToSpeechVoiceIdStreamPostOutputFormat? v1TextToSpeechVoiceIdStreamPostOutputFormatNullableFromJson(
  1. Object? v1TextToSpeechVoiceIdStreamPostOutputFormat, [
  2. V1TextToSpeechVoiceIdStreamPostOutputFormat? defaultValue
])

Implementation

enums.V1TextToSpeechVoiceIdStreamPostOutputFormat?
    v1TextToSpeechVoiceIdStreamPostOutputFormatNullableFromJson(
  Object? v1TextToSpeechVoiceIdStreamPostOutputFormat, [
  enums.V1TextToSpeechVoiceIdStreamPostOutputFormat? defaultValue,
]) {
  if (v1TextToSpeechVoiceIdStreamPostOutputFormat == null) {
    return null;
  }
  return enums.V1TextToSpeechVoiceIdStreamPostOutputFormat.values
          .firstWhereOrNull(
              (e) => e.value == v1TextToSpeechVoiceIdStreamPostOutputFormat) ??
      defaultValue;
}