bodySpeechToTextV1SpeechToTextPostTimestampsGranularityNullableFromJson function

BodySpeechToTextV1SpeechToTextPostTimestampsGranularity? bodySpeechToTextV1SpeechToTextPostTimestampsGranularityNullableFromJson(
  1. Object? bodySpeechToTextV1SpeechToTextPostTimestampsGranularity, [
  2. BodySpeechToTextV1SpeechToTextPostTimestampsGranularity? defaultValue
])

Implementation

enums.BodySpeechToTextV1SpeechToTextPostTimestampsGranularity?
    bodySpeechToTextV1SpeechToTextPostTimestampsGranularityNullableFromJson(
  Object? bodySpeechToTextV1SpeechToTextPostTimestampsGranularity, [
  enums.BodySpeechToTextV1SpeechToTextPostTimestampsGranularity? defaultValue,
]) {
  if (bodySpeechToTextV1SpeechToTextPostTimestampsGranularity == null) {
    return null;
  }
  return enums.BodySpeechToTextV1SpeechToTextPostTimestampsGranularity.values
          .firstWhereOrNull((e) =>
              e.value ==
              bodySpeechToTextV1SpeechToTextPostTimestampsGranularity) ??
      defaultValue;
}