fromJson static method

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

Implementation

static BusinessAwayMessageSettings? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return BusinessAwayMessageSettings(
    shortcutId: (json['shortcut_id'] as int?) ?? 0,
    recipients: BusinessRecipients.fromJson(
      tdMapFromJson(json['recipients']),
    ),
    schedule: BusinessAwayMessageSchedule.fromJson(
      tdMapFromJson(json['schedule']),
    ),
    offlineOnly: (json['offline_only'] as bool?) ?? false,
  );
}