manager-app/manager_api_new/lib/model/instance_quota_dto.dart

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.aiRequestsUsed,
this.aiRequestsPerMonth,
});
int? storageUsedBytes;
int? storageQuotaBytes;
int? aiRequestsUsed;
int? aiRequestsPerMonth;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is InstanceQuotaDTO &&
other.storageUsedBytes == storageUsedBytes &&
other.storageQuotaBytes == storageQuotaBytes &&
other.aiRequestsUsed == aiRequestsUsed &&
other.aiRequestsPerMonth == aiRequestsPerMonth;
@override
int get hashCode =>
(storageUsedBytes == null ? 0 : storageUsedBytes!.hashCode) +
(storageQuotaBytes == null ? 0 : storageQuotaBytes!.hashCode) +
(aiRequestsUsed == null ? 0 : aiRequestsUsed!.hashCode) +
(aiRequestsPerMonth == null ? 0 : aiRequestsPerMonth!.hashCode);
@override
String toString() =>
'InstanceQuotaDTO[storageUsedBytes=$storageUsedBytes, storageQuotaBytes=$storageQuotaBytes, aiRequestsUsed=$aiRequestsUsed, aiRequestsPerMonth=$aiRequestsPerMonth]';
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.aiRequestsUsed != null) {
json[r'aiRequestsUsed'] = this.aiRequestsUsed;
} else {
json[r'aiRequestsUsed'] = null;
}
if (this.aiRequestsPerMonth != null) {
json[r'aiRequestsPerMonth'] = this.aiRequestsPerMonth;
} else {
json[r'aiRequestsPerMonth'] = 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'),
aiRequestsUsed: mapValueOfType<int>(json, r'aiRequestsUsed'),
aiRequestsPerMonth: mapValueOfType<int>(json, r'aiRequestsPerMonth'),
);
}
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>{};
}