CreateThreadAndRunRequestResponseFormatPatterns extension

Adds pattern-matching-related methods to CreateThreadAndRunRequestResponseFormat.

on

Methods

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

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

Available on CreateThreadAndRunRequestResponseFormat, provided by the CreateThreadAndRunRequestResponseFormatPatterns extension

A variant of when that fallback to returning null