part of 'generated.dart';

class ListTaskCommentsVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListTaskCommentsVariablesBuilder(this._dataConnect, );
  Deserializer<ListTaskCommentsData> dataDeserializer = (dynamic json)  => ListTaskCommentsData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListTaskCommentsData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListTaskCommentsData, void> ref() {
    
    return _dataConnect.query("listTaskComments", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListTaskCommentsTaskComments {
  final String id;
  final String taskId;
  final String teamMemberId;
  final String comment;
  final bool isSystem;
  final Timestamp? createdAt;
  final ListTaskCommentsTaskCommentsTeamMember teamMember;
  ListTaskCommentsTaskComments.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  taskId = nativeFromJson<String>(json['taskId']),
  teamMemberId = nativeFromJson<String>(json['teamMemberId']),
  comment = nativeFromJson<String>(json['comment']),
  isSystem = nativeFromJson<bool>(json['isSystem']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  teamMember = ListTaskCommentsTaskCommentsTeamMember.fromJson(json['teamMember']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTaskCommentsTaskComments otherTyped = other as ListTaskCommentsTaskComments;
    return id == otherTyped.id && 
    taskId == otherTyped.taskId && 
    teamMemberId == otherTyped.teamMemberId && 
    comment == otherTyped.comment && 
    isSystem == otherTyped.isSystem && 
    createdAt == otherTyped.createdAt && 
    teamMember == otherTyped.teamMember;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, taskId.hashCode, teamMemberId.hashCode, comment.hashCode, isSystem.hashCode, createdAt.hashCode, teamMember.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['taskId'] = nativeToJson<String>(taskId);
    json['teamMemberId'] = nativeToJson<String>(teamMemberId);
    json['comment'] = nativeToJson<String>(comment);
    json['isSystem'] = nativeToJson<bool>(isSystem);
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['teamMember'] = teamMember.toJson();
    return json;
  }

  ListTaskCommentsTaskComments({
    required this.id,
    required this.taskId,
    required this.teamMemberId,
    required this.comment,
    required this.isSystem,
    this.createdAt,
    required this.teamMember,
  });
}

@immutable
class ListTaskCommentsTaskCommentsTeamMember {
  final ListTaskCommentsTaskCommentsTeamMemberUser user;
  ListTaskCommentsTaskCommentsTeamMember.fromJson(dynamic json):
  
  user = ListTaskCommentsTaskCommentsTeamMemberUser.fromJson(json['user']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTaskCommentsTaskCommentsTeamMember otherTyped = other as ListTaskCommentsTaskCommentsTeamMember;
    return user == otherTyped.user;
    
  }
  @override
  int get hashCode => user.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['user'] = user.toJson();
    return json;
  }

  ListTaskCommentsTaskCommentsTeamMember({
    required this.user,
  });
}

@immutable
class ListTaskCommentsTaskCommentsTeamMemberUser {
  final String? fullName;
  final String? email;
  ListTaskCommentsTaskCommentsTeamMemberUser.fromJson(dynamic json):
  
  fullName = json['fullName'] == null ? null : nativeFromJson<String>(json['fullName']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTaskCommentsTaskCommentsTeamMemberUser otherTyped = other as ListTaskCommentsTaskCommentsTeamMemberUser;
    return fullName == otherTyped.fullName && 
    email == otherTyped.email;
    
  }
  @override
  int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (fullName != null) {
      json['fullName'] = nativeToJson<String?>(fullName);
    }
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    return json;
  }

  ListTaskCommentsTaskCommentsTeamMemberUser({
    this.fullName,
    this.email,
  });
}

@immutable
class ListTaskCommentsData {
  final List<ListTaskCommentsTaskComments> taskComments;
  ListTaskCommentsData.fromJson(dynamic json):
  
  taskComments = (json['taskComments'] as List<dynamic>)
        .map((e) => ListTaskCommentsTaskComments.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTaskCommentsData otherTyped = other as ListTaskCommentsData;
    return taskComments == otherTyped.taskComments;
    
  }
  @override
  int get hashCode => taskComments.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['taskComments'] = taskComments.map((e) => e.toJson()).toList();
    return json;
  }

  ListTaskCommentsData({
    required this.taskComments,
  });
}

