ParameterPatterns extension
Adds pattern-matching-related methods to Parameter.
- on
Methods
-
map<
TResult extends Object?> ({required TResult cookie(ParameterCookie value), required TResult header(ParameterHeader value), required TResult query(ParameterQuery value), required TResult path(ParameterPath value)}) → TResult -
Available on Parameter, provided by the ParameterPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? cookie(ParameterCookie value)?, TResult? header(ParameterHeader value)?, TResult? query(ParameterQuery value)?, TResult? path(ParameterPath value)?}) → TResult? -
Available on Parameter, provided by the ParameterPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult cookie(ParameterCookie value)?, TResult header(ParameterHeader value)?, TResult query(ParameterQuery value)?, TResult path(ParameterPath value)?, required TResult orElse()}) → TResult -
Available on Parameter, provided by the ParameterPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult cookie(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult header(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult query(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult path(String? name, String? description, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema? schema, String? ref)?, required TResult orElse()}) → TResult -
Available on Parameter, provided by the ParameterPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> ({required TResult cookie(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref), required TResult header(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref), required TResult query(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref), required TResult path(String? name, String? description, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema? schema, String? ref)}) → TResult -
Available on Parameter, provided by the ParameterPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? cookie(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult? header(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult? query(String? name, String? description, bool? required, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema schema, String? ref)?, TResult? path(String? name, String? description, bool? deprecated, String? style, bool? explode, bool? allowReserved, String? example, Schema? schema, String? ref)?}) → TResult? -
Available on Parameter, provided by the ParameterPatterns extension
A variant ofwhenthat fallback to returningnull