354 lines
9.7 KiB
Dart
354 lines
9.7 KiB
Dart
|
// To parse this JSON data, do
|
||
|
//
|
||
|
// final eventsDetailsResp = eventsDetailsRespFromJson(jsonString);
|
||
|
|
||
|
import 'dart:convert';
|
||
|
|
||
|
EventsDetailsResp eventsDetailsRespFromJson(String str) =>
|
||
|
EventsDetailsResp.fromJson(json.decode(str));
|
||
|
|
||
|
String eventsDetailsRespToJson(EventsDetailsResp data) =>
|
||
|
json.encode(data.toJson());
|
||
|
|
||
|
class EventsDetailsResp {
|
||
|
OverviewData data;
|
||
|
|
||
|
EventsDetailsResp({
|
||
|
required this.data,
|
||
|
});
|
||
|
|
||
|
factory EventsDetailsResp.fromJson(Map<String, dynamic> json) =>
|
||
|
EventsDetailsResp(
|
||
|
data: OverviewData.fromJson(json["data"]),
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"data": data.toJson(),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
class OverviewData {
|
||
|
bool cal;
|
||
|
int grid;
|
||
|
String eventFor;
|
||
|
String eventId;
|
||
|
List<EventDatum> eventData;
|
||
|
List<EventTopic> eventTopics;
|
||
|
List<EventSponsor> eventSponsors;
|
||
|
bool eventUserAttendee;
|
||
|
bool eventUserInterest;
|
||
|
List<ArrEvent> arrEvents;
|
||
|
int attendeeCount;
|
||
|
int projectKolAttendee;
|
||
|
|
||
|
OverviewData({
|
||
|
required this.cal,
|
||
|
required this.grid,
|
||
|
required this.eventFor,
|
||
|
required this.eventId,
|
||
|
required this.eventData,
|
||
|
required this.eventTopics,
|
||
|
required this.eventSponsors,
|
||
|
required this.eventUserAttendee,
|
||
|
required this.eventUserInterest,
|
||
|
required this.arrEvents,
|
||
|
required this.attendeeCount,
|
||
|
required this.projectKolAttendee,
|
||
|
});
|
||
|
|
||
|
factory OverviewData.fromJson(Map<String, dynamic> json) => OverviewData(
|
||
|
cal: json["cal"],
|
||
|
grid: json["grid"],
|
||
|
eventFor: json["eventFor"],
|
||
|
eventId: json["eventId"],
|
||
|
eventData: List<EventDatum>.from(
|
||
|
json["eventData"].map((x) => EventDatum.fromJson(x))),
|
||
|
eventTopics: List<EventTopic>.from(
|
||
|
json["eventTopics"].map((x) => EventTopic.fromJson(x))),
|
||
|
eventSponsors: List<EventSponsor>.from(
|
||
|
json["eventSponsers"].map((x) => EventSponsor.fromJson(x))),
|
||
|
eventUserAttendee: json["event_user_attendee"],
|
||
|
eventUserInterest: json["event_user_interest"],
|
||
|
arrEvents: List<ArrEvent>.from(
|
||
|
json["arrEvents"].map((x) => ArrEvent.fromJson(x))),
|
||
|
attendeeCount: json["attendeeCount"],
|
||
|
projectKolAttendee: json["project_kol_attendee"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"cal": cal,
|
||
|
"grid": grid,
|
||
|
"eventFor": eventFor,
|
||
|
"eventId": eventId,
|
||
|
"eventData": List<dynamic>.from(eventData.map((x) => x.toJson())),
|
||
|
"eventTopics": List<dynamic>.from(eventTopics.map((x) => x.toJson())),
|
||
|
"eventSponsers":
|
||
|
List<dynamic>.from(eventSponsors.map((x) => x.toJson())),
|
||
|
"event_user_attendee": eventUserAttendee,
|
||
|
"event_user_interest": eventUserInterest,
|
||
|
"arrEvents": List<dynamic>.from(arrEvents.map((x) => x.toJson())),
|
||
|
"attendeeCount": attendeeCount,
|
||
|
"project_kol_attendee": projectKolAttendee,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
class ArrEvent {
|
||
|
String sponsorType;
|
||
|
String sponsorTypeName;
|
||
|
String id;
|
||
|
String kolId;
|
||
|
String type;
|
||
|
String eventType;
|
||
|
String eventId;
|
||
|
String sessionType;
|
||
|
String sessionName;
|
||
|
String role;
|
||
|
String topic;
|
||
|
String start;
|
||
|
String end;
|
||
|
String organizer;
|
||
|
String sessionSponsor;
|
||
|
String organizerType;
|
||
|
String location;
|
||
|
String address;
|
||
|
String cityId;
|
||
|
String stateId;
|
||
|
String countryId;
|
||
|
String postalCode;
|
||
|
dynamic subject;
|
||
|
String url1;
|
||
|
dynamic url2;
|
||
|
dynamic notes;
|
||
|
String createdBy;
|
||
|
DateTime createdOn;
|
||
|
dynamic modifiedBy;
|
||
|
DateTime modifiedOn;
|
||
|
String clientId;
|
||
|
dynamic projectId;
|
||
|
String activityType;
|
||
|
String profileType;
|
||
|
dynamic globalEventId;
|
||
|
String eventUniqueId;
|
||
|
String name;
|
||
|
String confEventType;
|
||
|
String country;
|
||
|
String eventTopic;
|
||
|
String confSessionType;
|
||
|
String region;
|
||
|
String city;
|
||
|
|
||
|
ArrEvent({
|
||
|
required this.sponsorType,
|
||
|
required this.sponsorTypeName,
|
||
|
required this.id,
|
||
|
required this.kolId,
|
||
|
required this.type,
|
||
|
required this.eventType,
|
||
|
required this.eventId,
|
||
|
required this.sessionType,
|
||
|
required this.sessionName,
|
||
|
required this.role,
|
||
|
required this.topic,
|
||
|
required this.start,
|
||
|
required this.end,
|
||
|
required this.organizer,
|
||
|
required this.sessionSponsor,
|
||
|
required this.organizerType,
|
||
|
required this.location,
|
||
|
required this.address,
|
||
|
required this.cityId,
|
||
|
required this.stateId,
|
||
|
required this.countryId,
|
||
|
required this.postalCode,
|
||
|
required this.subject,
|
||
|
required this.url1,
|
||
|
required this.url2,
|
||
|
required this.notes,
|
||
|
required this.createdBy,
|
||
|
required this.createdOn,
|
||
|
required this.modifiedBy,
|
||
|
required this.modifiedOn,
|
||
|
required this.clientId,
|
||
|
required this.projectId,
|
||
|
required this.activityType,
|
||
|
required this.profileType,
|
||
|
required this.globalEventId,
|
||
|
required this.eventUniqueId,
|
||
|
required this.name,
|
||
|
required this.confEventType,
|
||
|
required this.country,
|
||
|
required this.eventTopic,
|
||
|
required this.confSessionType,
|
||
|
required this.region,
|
||
|
required this.city,
|
||
|
});
|
||
|
|
||
|
factory ArrEvent.fromJson(Map<String, dynamic> json) => ArrEvent(
|
||
|
sponsorType: json["sponsor_type"],
|
||
|
sponsorTypeName: json["sponsor_type_name"],
|
||
|
id: json["id"],
|
||
|
kolId: json["kol_id"],
|
||
|
type: json["type"],
|
||
|
eventType: json["event_type"],
|
||
|
eventId: json["event_id"],
|
||
|
sessionType: json["session_type"],
|
||
|
sessionName: json["session_name"],
|
||
|
role: json["role"],
|
||
|
topic: json["topic"],
|
||
|
start: json["start"],
|
||
|
end: json["end"],
|
||
|
organizer: json["organizer"],
|
||
|
sessionSponsor: json["session_sponsor"],
|
||
|
organizerType: json["organizer_type"],
|
||
|
location: json["location"],
|
||
|
address: json["address"],
|
||
|
cityId: json["city_id"],
|
||
|
stateId: json["state_id"],
|
||
|
countryId: json["country_id"],
|
||
|
postalCode: json["postal_code"],
|
||
|
subject: json["subject"],
|
||
|
url1: json["url1"],
|
||
|
url2: json["url2"],
|
||
|
notes: json["notes"],
|
||
|
createdBy: json["created_by"],
|
||
|
createdOn: DateTime.parse(json["created_on"]),
|
||
|
modifiedBy: json["modified_by"],
|
||
|
modifiedOn: DateTime.parse(json["modified_on"]),
|
||
|
clientId: json["client_id"],
|
||
|
projectId: json["project_id"],
|
||
|
activityType: json["activity_type"],
|
||
|
profileType: json["profile_type"],
|
||
|
globalEventId: json["global_event_id"],
|
||
|
eventUniqueId: json["event_unique_id"],
|
||
|
name: json["name"],
|
||
|
confEventType: json["conf_event_type"],
|
||
|
country: json["country"],
|
||
|
eventTopic: json["event_topic"],
|
||
|
confSessionType: json["conf_session_type"],
|
||
|
region: json["region"],
|
||
|
city: json["city"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"sponsor_type": sponsorType,
|
||
|
"sponsor_type_name": sponsorTypeName,
|
||
|
"id": id,
|
||
|
"kol_id": kolId,
|
||
|
"type": type,
|
||
|
"event_type": eventType,
|
||
|
"event_id": eventId,
|
||
|
"session_type": sessionType,
|
||
|
"session_name": sessionName,
|
||
|
"role": role,
|
||
|
"topic": topic,
|
||
|
"start": start,
|
||
|
"end": end,
|
||
|
"organizer": organizer,
|
||
|
"session_sponsor": sessionSponsor,
|
||
|
"organizer_type": organizerType,
|
||
|
"location": location,
|
||
|
"address": address,
|
||
|
"city_id": cityId,
|
||
|
"state_id": stateId,
|
||
|
"country_id": countryId,
|
||
|
"postal_code": postalCode,
|
||
|
"subject": subject,
|
||
|
"url1": url1,
|
||
|
"url2": url2,
|
||
|
"notes": notes,
|
||
|
"created_by": createdBy,
|
||
|
"created_on": createdOn.toIso8601String(),
|
||
|
"modified_by": modifiedBy,
|
||
|
"modified_on": modifiedOn.toIso8601String(),
|
||
|
"client_id": clientId,
|
||
|
"project_id": projectId,
|
||
|
"activity_type": activityType,
|
||
|
"profile_type": profileType,
|
||
|
"global_event_id": globalEventId,
|
||
|
"event_unique_id": eventUniqueId,
|
||
|
"name": name,
|
||
|
"conf_event_type": confEventType,
|
||
|
"country": country,
|
||
|
"event_topic": eventTopic,
|
||
|
"conf_session_type": confSessionType,
|
||
|
"region": region,
|
||
|
"city": city,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
class EventDatum {
|
||
|
String firstName;
|
||
|
dynamic middleName;
|
||
|
dynamic lastName;
|
||
|
String numSess;
|
||
|
|
||
|
EventDatum({
|
||
|
required this.firstName,
|
||
|
required this.middleName,
|
||
|
required this.lastName,
|
||
|
required this.numSess,
|
||
|
});
|
||
|
|
||
|
factory EventDatum.fromJson(Map<String, dynamic> json) => EventDatum(
|
||
|
firstName: json["first_name"],
|
||
|
middleName: json["middle_name"],
|
||
|
lastName: json["last_name"],
|
||
|
numSess: json["num_sess"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"first_name": firstName,
|
||
|
"middle_name": middleName,
|
||
|
"last_name": lastName,
|
||
|
"num_sess": numSess,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
class EventSponsor {
|
||
|
String numSess;
|
||
|
String sessionSponsor;
|
||
|
String type;
|
||
|
String sponsorsType;
|
||
|
|
||
|
EventSponsor({
|
||
|
required this.numSess,
|
||
|
required this.sessionSponsor,
|
||
|
required this.type,
|
||
|
required this.sponsorsType,
|
||
|
});
|
||
|
|
||
|
factory EventSponsor.fromJson(Map<String, dynamic> json) => EventSponsor(
|
||
|
numSess: json["num_sess"],
|
||
|
sessionSponsor: json["session_sponsor"],
|
||
|
type: json["type"],
|
||
|
sponsorsType: json["sponsors_type"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"num_sess": numSess,
|
||
|
"session_sponsor": sessionSponsor,
|
||
|
"type": type,
|
||
|
"sponsors_type": sponsorsType,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
class EventTopic {
|
||
|
String numTopics;
|
||
|
String eventTopics;
|
||
|
|
||
|
EventTopic({
|
||
|
required this.numTopics,
|
||
|
required this.eventTopics,
|
||
|
});
|
||
|
|
||
|
factory EventTopic.fromJson(Map<String, dynamic> json) => EventTopic(
|
||
|
numTopics: json["num_topics"],
|
||
|
eventTopics: json["event_topics"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"num_topics": numTopics,
|
||
|
"event_topics": eventTopics,
|
||
|
};
|
||
|
}
|