MeetingTimeSuggestion.fromJson constructor

MeetingTimeSuggestion.fromJson(
  1. Map<String, dynamic> json
)

Creates a new instance of MeetingTimeSuggestion from a JSON object.

The JSON object should contain keys that correspond to the parameters of MeetingTimeSuggestion.

Implementation

factory MeetingTimeSuggestion.fromJson(Map<String, dynamic> json) {
  return MeetingTimeSuggestion(
    confidence: json['confidence'],
    organizerAvailability: json['organizerAvailability'],
    attendeeAvailability: json['attendeeAvailability'] != null
        ? (json['attendeeAvailability'] as List)
            .map((i) => AttendeeAvailability.fromJson(i))
            .toList()
        : null,
    locations: json['locations'] != null
        ? (json['locations'] as List)
            .map((i) => Location.fromJson(i))
            .toList()
        : null,
    meetingTimeSlot: json['meetingTimeSlot'] != null
        ? TimeSlot.fromJson(json['meetingTimeSlot'])
        : null,
  );
}