Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

197 righe
7.0 KiB

class Actor {
late int id;
late String description;
late int actor_type_id;
late String deleted;
late String contacts;
Map toJson() => {
'id': id,
'description': description,
'actor_type_id': actor_type_id,
'deleted': deleted,
'contacts': contacts
};
Actor() {}
Actor.fromJson(Map<String, dynamic> json)
: this.id = (json['id'] != null ? json['id'] : 0),
this.description = (json['id'] != null ? json['id'].toString() : ""),
this.actor_type_id =
(json['actor_type_id'] != null ? json['actor_type_id'] : 0),
this.deleted =
(json['deleted'] != null ? json['deleted'].toString() : ""),
this.contacts =
(json['contacts'] != null ? json['contacts'].toString() : "");
}
class Organisation {
late int id;
late String acronym;
late String address;
late String district;
late String cap;
late String province;
late int organisation_type_id;
late int actor_id;
late String pec;
late String coordinates;
late String feature_collection;
late String deleted;
late String photo;
late int controllable_object_interface_id;
late Actor actor;
Organisation.fromJson(Map<String, dynamic> json)
: this.id = (json['id'] != null ? json['id'] : 0),
this.acronym = (json['acronym'] != null ? json['acronym'] : 0),
this.address =
(json['address'] != null ? json['address'].toString() : ""),
this.district =
(json['district'] != null ? json['district'].toString() : ""),
this.cap = (json['cap'] != null ? json['cap'].toString() : ""),
this.province =
(json['province'] != null ? json['province'].toString() : ""),
this.coordinates =
(json['coordinates'] != null ? json['coordinates'].toString() : ""),
this.feature_collection = (json['feature_collection'] != null
? json['feature_collection'].toString()
: ""),
this.photo = (json['photo'] != null ? json['photo'].toString() : ""),
this.organisation_type_id = (json['organisation_type_id'] != null
? json['organisation_type_id']
: 0),
this.controllable_object_interface_id =
(json['controllable_object_interface_id'] != null
? json['controllable_object_interface_id']
: 0),
this.pec = (json['pec'] != null ? json['pec'] : ""),
this.deleted =
(json['deleted'] != null ? json['deleted'].toString() : ""),
this.actor = Actor.fromJson(json['actor']),
this.actor_id = (json['actor_id'] != null ? json['actor_id'] : 0);
Map toJson() => {
'id': id,
'acronym': acronym,
'address': address,
'district': district,
'cap': cap,
'province': province,
'organisation_type_id': organisation_type_id,
'actor_id': actor_id,
'pec': pec,
'coordinates': coordinates,
'feature_collection': feature_collection,
'deleted': deleted,
'photo': photo,
'controllable_object_interface_id': controllable_object_interface_id,
'actor': actor.toJson(),
};
}
class UserList {
late int id;
late String username;
late String surname;
late String name;
late String address;
late String city;
late String cap;
late String tax_code;
late String photo;
late String birthplace;
late String birthday;
late String gender;
late String otp;
late String otp_redirect_url;
late String otp_expires;
late String timezone;
late Organisation organisation;
late UserActor user_actor;
late String organisation_description;
late String profiles;
late dynamic emails;
late dynamic mobile_phones;
late dynamic phones;
Map toJson() => {
'id': id,
'birthday': birthday,
'username': username,
'surname': surname,
'name': name,
'address': address,
'city': city,
'cap': cap,
'tax_code': tax_code,
'photo': photo,
'birthplace': birthplace,
'gender': gender,
'organisation_description': organisation_description,
'user_actor': user_actor.toJson(),
'otp': otp,
'otp_redirect_url': otp_redirect_url,
'otp_expires': otp_expires,
'timezone': timezone,
'emails': emails,
'mobile_phones': mobile_phones,
'phones': phones,
'profiles': profiles,
'organisation': organisation.toJson()
};
UserList.fromJson(Map<String, dynamic> json)
: this.id = (json['id'] != null ? json['id'] : 0),
this.birthday = (json['birthday'] != null ? json['birthday'] : ""),
this.username =
(json['username'] != null ? json['username'].toString() : ""),
this.surname =
(json['surname'] != null ? json['surname'].toString() : ""),
this.name = (json['name'] != null ? json['name'].toString() : ""),
this.address =
(json['address'] != null ? json['address'].toString() : ""),
this.city = (json['city'] != null ? json['city'].toString() : ""),
this.cap = (json['cap'] != null ? json['cap'].toString() : ""),
this.tax_code =
(json['tax_code'] != null ? json['tax_code'].toString() : ""),
this.photo = (json['photo'] != null ? json['photo'].toString() : ""),
this.birthplace =
(json['birthplace'] != null ? json['birthplace'].toString() : ""),
this.gender = (json['gender'] != null ? json['gender'].toString() : ""),
this.organisation_description =
(json['organisation_description'] != null
? json['organisation_description']
: ""),
this.emails = (json['emails'] != null ? json['emails'] : []),
this.mobile_phones =
(json['mobile_phones'] != null ? json['mobile_phones'] : []),
this.phones = (json['phones'] != null ? json['phones'] : []),
this.user_actor = UserActor.fromJson(json['user_actor']),
this.otp = (json['otp'] != null ? json['otp'].toString() : ""),
this.otp_redirect_url = (json['otp_redirect_url'] != null
? json['otp_redirect_url'].toString()
: ""),
this.otp_expires =
(json['otp_expires'] != null ? json['otp_expires'].toString() : ""),
this.timezone =
(json['timezone'] != null ? json['timezone'].toString() : ""),
this.profiles =
(json['profiles'] != null ? json['profiles'].toString() : ""),
this.organisation = Organisation.fromJson(json['organisation']);
UserList() {}
}
class UserActor {
late int id;
late String description;
late String contacts;
Map toJson() => {'id': id, 'description': description, 'contacts': contacts};
UserActor() {}
UserActor.fromJson(Map<String, dynamic> json)
: this.id = (json['tokeidn'] != null ? json['id'] : 0),
this.description =
(json['description'] != null ? json['description'].toString() : ""),
this.contacts =
(json['contacts'] != null ? json['contacts'].toString() : "");
}