SecuritySchemePatterns extension

Adds pattern-matching-related methods to SecurityScheme.

on

Methods

map<TResult extends Object?>({required TResult apiKey(SecuritySchemeApiKey value), required TResult http(SecuritySchemeHttp value), required TResult mutualTLS(SecuritySchemeMutualTLS value), required TResult oauth2(SecuritySchemeOauth2 value), required TResult openIdConnect(SecuritySchemeOpenIdConnect value)}) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? apiKey(SecuritySchemeApiKey value)?, TResult? http(SecuritySchemeHttp value)?, TResult? mutualTLS(SecuritySchemeMutualTLS value)?, TResult? oauth2(SecuritySchemeOauth2 value)?, TResult? openIdConnect(SecuritySchemeOpenIdConnect value)?}) → TResult?

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult apiKey(SecuritySchemeApiKey value)?, TResult http(SecuritySchemeHttp value)?, TResult mutualTLS(SecuritySchemeMutualTLS value)?, TResult oauth2(SecuritySchemeOauth2 value)?, TResult openIdConnect(SecuritySchemeOpenIdConnect value)?, required TResult orElse()}) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult apiKey(String name, String? description, ApiKeyLocation location)?, TResult http(HttpSecurityScheme scheme, String? bearerFormat, String? description)?, TResult mutualTLS(String? description)?, TResult oauth2(String? description, OAuthFlows flows)?, TResult openIdConnect(String? description, String url)?, required TResult orElse()}) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>({required TResult apiKey(String name, String? description, ApiKeyLocation location), required TResult http(HttpSecurityScheme scheme, String? bearerFormat, String? description), required TResult mutualTLS(String? description), required TResult oauth2(String? description, OAuthFlows flows), required TResult openIdConnect(String? description, String url)}) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? apiKey(String name, String? description, ApiKeyLocation location)?, TResult? http(HttpSecurityScheme scheme, String? bearerFormat, String? description)?, TResult? mutualTLS(String? description)?, TResult? oauth2(String? description, OAuthFlows flows)?, TResult? openIdConnect(String? description, String url)?}) → TResult?

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of when that fallback to returning null