144 lines
3.8 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 ProviderDTO {
/// Returns a new [ProviderDTO] instance.
ProviderDTO({
this.id,
this.name,
this.type,
this.userId,
this.endpoint,
this.username,
this.password,
this.apiKey,
this.active,
});
String id;
String name;
String type;
String userId;
String endpoint;
String username;
String password;
String apiKey;
bool active;
@override
bool operator ==(Object other) => identical(this, other) || other is ProviderDTO &&
other.id == id &&
other.name == name &&
other.type == type &&
other.userId == userId &&
other.endpoint == endpoint &&
other.username == username &&
other.password == password &&
other.apiKey == apiKey &&
other.active == active;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(endpoint == null ? 0 : endpoint.hashCode) +
(username == null ? 0 : username.hashCode) +
(password == null ? 0 : password.hashCode) +
(apiKey == null ? 0 : apiKey.hashCode) +
(active == null ? 0 : active.hashCode);
@override
String toString() => 'ProviderDTO[id=$id, name=$name, type=$type, userId=$userId, endpoint=$endpoint, username=$username, password=$password, apiKey=$apiKey, active=$active]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
if (userId != null) {
json[r'userId'] = userId;
}
if (endpoint != null) {
json[r'endpoint'] = endpoint;
}
if (username != null) {
json[r'username'] = username;
}
if (password != null) {
json[r'password'] = password;
}
if (apiKey != null) {
json[r'apiKey'] = apiKey;
}
if (active != null) {
json[r'active'] = active;
}
return json;
}
/// Returns a new [ProviderDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static ProviderDTO fromJson(Map<String, dynamic> json) => json == null
? null
: ProviderDTO(
id: json[r'id'],
name: json[r'name'],
type: json[r'type'],
userId: json[r'userId'],
endpoint: json[r'endpoint'],
username: json[r'username'],
password: json[r'password'],
apiKey: json[r'apiKey'],
active: json[r'active'],
);
static List<ProviderDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <ProviderDTO>[]
: json.map((v) => ProviderDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, ProviderDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, ProviderDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = ProviderDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of ProviderDTO-objects as value to a dart map
static Map<String, List<ProviderDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<ProviderDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = ProviderDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}