part of 'generated.dart';

class GetTaskCommentsByTaskIdVariablesBuilder {
  String taskId;

  final FirebaseDataConnect _dataConnect;
  GetTaskCommentsByTaskIdVariablesBuilder(this._dataConnect, {required  this.taskId,});
  Deserializer<GetTaskCommentsByTaskIdData> dataDeserializer = (dynamic json)  => GetTaskCommentsByTaskIdData.fromJson(jsonDecode(json));
  Serializer<GetTaskCommentsByTaskIdVariables> varsSerializer = (GetTaskCommentsByTaskIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables> ref() {
    GetTaskCommentsByTaskIdVariables vars= GetTaskCommentsByTaskIdVariables(taskId: taskId,);
    return _dataConnect.query("getTaskCommentsByTaskId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTaskCommentsByTaskIdTaskComments {
  final String id;
  final String taskId;
  final String teamMemberId;
  final String comment;
  final bool isSystem;
  final Timestamp? createdAt;
  final GetTaskCommentsByTaskIdTaskCommentsTeamMember teamMember;
  GetTaskCommentsByTaskIdTaskComments.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 = GetTaskCommentsByTaskIdTaskCommentsTeamMember.fromJson(json['teamMember']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTaskCommentsByTaskIdTaskComments otherTyped = other as GetTaskCommentsByTaskIdTaskComments;
    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;
  }

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

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

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

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

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

@immutable
class GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser {
  final String? fullName;
  final String? email;
  GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser.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 GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser otherTyped = other as GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser;
    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;
  }

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

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

    final GetTaskCommentsByTaskIdData otherTyped = other as GetTaskCommentsByTaskIdData;
    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;
  }

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

@immutable
class GetTaskCommentsByTaskIdVariables {
  final String taskId;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  GetTaskCommentsByTaskIdVariables.fromJson(Map<String, dynamic> json):
  
  taskId = nativeFromJson<String>(json['taskId']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTaskCommentsByTaskIdVariables otherTyped = other as GetTaskCommentsByTaskIdVariables;
    return taskId == otherTyped.taskId;
    
  }
  @override
  int get hashCode => taskId.hashCode;
  

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

  GetTaskCommentsByTaskIdVariables({
    required this.taskId,
  });
}

