ApiKey class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
ApiKey({required String id, String? name, String? start, String? prefix, String? key, required String userId, @Default.new(true) bool enabled, DateTime? expiresAt, required DateTime createdAt, DateTime? updatedAt, DateTime? lastRefillAt, DateTime? lastRequest, Map<
String, dynamic> ? metadata, double? rateLimitMax, double? rateLimitTimeWindow, double? remaining, double? refillAmount, double? refillInterval, bool? rateLimitEnabled, double? requestCount, String? permissions}) -
constfactory
-
ApiKey.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ $ApiKeyCopyWith<
ApiKey> -
Create a copy of ApiKey
with the given fields replaced by the non-null parameter values.
no setterinherited
- createdAt → DateTime
-
no setterinherited
- enabled → bool
-
no setterinherited
- expiresAt → DateTime?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
no setterinherited
- key → String?
-
no setterinherited
- lastRefillAt → DateTime?
-
no setterinherited
- lastRequest → DateTime?
-
no setterinherited
-
metadata
→ Map<
String, dynamic> ? -
no setterinherited
- name → String?
-
no setterinherited
- permissions → String?
-
no setterinherited
- prefix → String?
-
no setterinherited
- rateLimitEnabled → bool?
-
no setterinherited
- rateLimitMax → double?
-
no setterinherited
- rateLimitTimeWindow → double?
-
no setterinherited
- refillAmount → double?
-
no setterinherited
- refillInterval → double?
-
no setterinherited
- remaining → double?
-
no setterinherited
- requestCount → double?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → String?
-
no setterinherited
- updatedAt → DateTime?
-
no setterinherited
- userId → String
-
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ApiKey value)) → TResult -
Available on ApiKey, provided by the ApiKeyPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ApiKey value)?) → TResult? -
Available on ApiKey, provided by the ApiKeyPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_ApiKey value)?, {required TResult orElse()}) → TResult -
Available on ApiKey, provided by the ApiKeyPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String? name, String? start, String? prefix, String? key, String userId, bool enabled, DateTime? expiresAt, DateTime createdAt, DateTime? updatedAt, DateTime? lastRefillAt, DateTime? lastRequest, Map< String, dynamic> ? metadata, double? rateLimitMax, double? rateLimitTimeWindow, double? remaining, double? refillAmount, double? refillInterval, bool? rateLimitEnabled, double? requestCount, String? permissions)?, {required TResult orElse()}) → TResult -
Available on ApiKey, provided by the ApiKeyPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ApiKey to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, String? name, String? start, String? prefix, String? key, String userId, bool enabled, DateTime? expiresAt, DateTime createdAt, DateTime? updatedAt, DateTime? lastRefillAt, DateTime? lastRequest, Map< String, dynamic> ? metadata, double? rateLimitMax, double? rateLimitTimeWindow, double? remaining, double? refillAmount, double? refillInterval, bool? rateLimitEnabled, double? requestCount, String? permissions)) → TResult -
Available on ApiKey, provided by the ApiKeyPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String? name, String? start, String? prefix, String? key, String userId, bool enabled, DateTime? expiresAt, DateTime createdAt, DateTime? updatedAt, DateTime? lastRefillAt, DateTime? lastRequest, Map< String, dynamic> ? metadata, double? rateLimitMax, double? rateLimitTimeWindow, double? remaining, double? refillAmount, double? refillInterval, bool? rateLimitEnabled, double? requestCount, String? permissions)?) → TResult? -
Available on ApiKey, provided by the ApiKeyPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited