bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalizationNullableFromJson function

BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization? bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalizationNullableFromJson(
  1. Object? bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, [
  2. BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization? defaultValue
])

Implementation

enums.BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization?
    bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalizationNullableFromJson(
  Object? bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization, [
  enums.BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization?
      defaultValue,
]) {
  if (bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization == null) {
    return null;
  }
  return enums.BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization
          .values
          .firstWhereOrNull((e) =>
              e.value ==
              bodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization) ??
      defaultValue;
}