manager-app/manager_api_new/lib/model/instance_quota_dto.dart
2026-07-17 15:20:41 +02:00

107 lines
3.1 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class InstanceQuotaDTO {
/// Returns a new [InstanceQuotaDTO] instance.
InstanceQuotaDTO({
this.storageUsedBytes,
this.storageQuotaBytes,
this.aiTokensUsed,
this.aiTokensPerMonth,
});
int? storageUsedBytes;
int? storageQuotaBytes;
int? aiTokensUsed;
int? aiTokensPerMonth;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is InstanceQuotaDTO &&
other.storageUsedBytes == storageUsedBytes &&
other.storageQuotaBytes == storageQuotaBytes &&
other.aiTokensUsed == aiTokensUsed &&
other.aiTokensPerMonth == aiTokensPerMonth;
@override
int get hashCode =>
(storageUsedBytes == null ? 0 : storageUsedBytes!.hashCode) +
(storageQuotaBytes == null ? 0 : storageQuotaBytes!.hashCode) +
(aiTokensUsed == null ? 0 : aiTokensUsed!.hashCode) +
(aiTokensPerMonth == null ? 0 : aiTokensPerMonth!.hashCode);
@override
String toString() =>
'InstanceQuotaDTO[storageUsedBytes=$storageUsedBytes, storageQuotaBytes=$storageQuotaBytes, aiTokensUsed=$aiTokensUsed, aiTokensPerMonth=$aiTokensPerMonth]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.storageUsedBytes != null) {
json[r'storageUsedBytes'] = this.storageUsedBytes;
} else {
json[r'storageUsedBytes'] = null;
}
if (this.storageQuotaBytes != null) {
json[r'storageQuotaBytes'] = this.storageQuotaBytes;
} else {
json[r'storageQuotaBytes'] = null;
}
if (this.aiTokensUsed != null) {
json[r'aiTokensUsed'] = this.aiTokensUsed;
} else {
json[r'aiTokensUsed'] = null;
}
if (this.aiTokensPerMonth != null) {
json[r'aiTokensPerMonth'] = this.aiTokensPerMonth;
} else {
json[r'aiTokensPerMonth'] = null;
}
return json;
}
// ignore: prefer_constructors_over_static_methods
static InstanceQuotaDTO? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return InstanceQuotaDTO(
storageUsedBytes: mapValueOfType<int>(json, r'storageUsedBytes'),
storageQuotaBytes: mapValueOfType<int>(json, r'storageQuotaBytes'),
aiTokensUsed: mapValueOfType<int>(json, r'aiTokensUsed'),
aiTokensPerMonth: mapValueOfType<int>(json, r'aiTokensPerMonth'),
);
}
return null;
}
static List<InstanceQuotaDTO> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <InstanceQuotaDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = InstanceQuotaDTO.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static const requiredKeys = <String>{};
}