import 'package:json_annotation/json_annotation.dart';
part 'keyboard_prologue_list_response.g.dart';
@JsonSerializable()
class KeyboardPrologueListResponse {
  @JsonKey(name: "prologues")
  List<Prologue>? prologues;

  KeyboardPrologueListResponse({this.prologues});

  factory KeyboardPrologueListResponse.fromJson(Map<String, dynamic> json) =>
      _$KeyboardPrologueListResponseFromJson(json);

  Map<String, dynamic> toJson() => _$KeyboardPrologueListResponseToJson(this);
}

@JsonSerializable()
class Prologue {
  @JsonKey(name: "title")
  String? title;

  @JsonKey(name: "topics")
  List<Topic>? topics;

  Prologue({this.title, this.topics});

  factory Prologue.fromJson(Map<String, dynamic> json) =>
      _$PrologueFromJson(json);

  Map<String, dynamic> toJson() => _$PrologueToJson(this);
}

@JsonSerializable()
class Topic {
  @JsonKey(name: "name")
  String? name;

  Topic({this.name});

  factory Topic.fromJson(Map<String, dynamic> json) => _$TopicFromJson(json);

  Map<String, dynamic> toJson() => _$TopicToJson(this);
}
