SecurityScheme class abstract

Represents a single security scheme object for OpenAPI 2.0.

Available extensions
Annotations
  • @Freezed.new(copyWith: true, fromJson: true, toJson: true, equal: true)

Constructors

SecurityScheme({required String type, String? description, String? name, @JsonKey.new(name: 'in') ParameterLocation? location, String? scheme, String? bearerFormat, String? flow, String? authorizationUrl, Map<String, String>? scopes})
Creates a SecurityScheme object.
const
factory
SecurityScheme.fromJson(Map<String, dynamic> json)
Creates a SecurityScheme from a JSON object.
factory

Properties

authorizationUrl String?
The authorization URL to be used for this flow.
no setterinherited
bearerFormat String?
A hint to the client to identify the bearer token scheme.
no setterinherited
copyWith → $SecuritySchemeCopyWith<SecurityScheme>
Create a copy of SecurityScheme with the given fields replaced by the non-null parameter values.
no setterinherited
description String?
A short description of the security scheme.
no setterinherited
flow String?
The flow used by the OAuth2 security scheme.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
location ParameterLocation?
The location of the API key.
no setterinherited
name String?
The name of the header, query, or cookie parameter to be used.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme String?
The name of the HTTP Authorization scheme to be used in the Authorization header.
no setterinherited
scopes Map<String, String>?
The available scopes for the OAuth2 flow.
no setterinherited
type String
The type of the security scheme.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_SecurityScheme value)) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_SecurityScheme value)?) → TResult?

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_SecurityScheme 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 $default(String type, String? description, String? name, ParameterLocation? location, String? scheme, String? bearerFormat, String? flow, String? authorizationUrl, Map<String, String>? scopes)?, {required TResult orElse()}) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this SecurityScheme to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String type, String? description, String? name, ParameterLocation? location, String? scheme, String? bearerFormat, String? flow, String? authorizationUrl, Map<String, String>? scopes)) → TResult

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String type, String? description, String? name, ParameterLocation? location, String? scheme, String? bearerFormat, String? flow, String? authorizationUrl, Map<String, String>? scopes)?) → TResult?

Available on SecurityScheme, provided by the SecuritySchemePatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited