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