81 lines
2.2 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class LoginDTO {
/// Returns a new [LoginDTO] instance.
LoginDTO({
this.email,
this.password,
});
String email;
String password;
@override
bool operator ==(Object other) => identical(this, other) || other is LoginDTO &&
other.email == email &&
other.password == password;
@override
int get hashCode =>
(email == null ? 0 : email.hashCode) +
(password == null ? 0 : password.hashCode);
@override
String toString() => 'LoginDTO[email=$email, password=$password]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (email != null) {
json[r'email'] = email;
}
if (password != null) {
json[r'password'] = password;
}
return json;
}
/// Returns a new [LoginDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static LoginDTO fromJson(Map<String, dynamic> json) => json == null
? null
: LoginDTO(
email: json[r'email'],
password: json[r'password'],
);
static List<LoginDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <LoginDTO>[]
: json.map((v) => LoginDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, LoginDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, LoginDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = LoginDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of LoginDTO-objects as value to a dart map
static Map<String, List<LoginDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<LoginDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = LoginDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}