RunObjectResponseFormatPatterns extension

Adds pattern-matching-related methods to RunObjectResponseFormat.

on

Methods

map<TResult extends Object?>({required TResult mode(RunObjectResponseFormatEnumeration value), required TResult responseFormat(RunObjectResponseFormatResponseFormat value)}) → TResult

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? mode(RunObjectResponseFormatEnumeration value)?, TResult? responseFormat(RunObjectResponseFormatResponseFormat value)?}) → TResult?

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult mode(RunObjectResponseFormatEnumeration value)?, TResult responseFormat(RunObjectResponseFormatResponseFormat value)?, required TResult orElse()}) → TResult

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult mode(RunObjectResponseFormatMode value)?, TResult responseFormat(ResponseFormat value)?, required TResult orElse()}) → TResult

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>({required TResult mode(RunObjectResponseFormatMode value), required TResult responseFormat(ResponseFormat value)}) → TResult

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? mode(RunObjectResponseFormatMode value)?, TResult? responseFormat(ResponseFormat value)?}) → TResult?

Available on RunObjectResponseFormat, provided by the RunObjectResponseFormatPatterns extension

A variant of when that fallback to returning null