part of 'generated.dart';

class GetTaskCommentByIdVariablesBuilder {
  String id;

  final FirebaseDataConnect _dataConnect;
  GetTaskCommentByIdVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<GetTaskCommentByIdData> dataDeserializer = (dynamic json)  => GetTaskCommentByIdData.fromJson(jsonDecode(json));
  Serializer<GetTaskCommentByIdVariables> varsSerializer = (GetTaskCommentByIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTaskCommentByIdData, GetTaskCommentByIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTaskCommentByIdData, GetTaskCommentByIdVariables> ref() {
    GetTaskCommentByIdVariables vars= GetTaskCommentByIdVariables(id: id,);
    return _dataConnect.query("getTaskCommentById", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

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

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

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

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

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

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

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

    final GetTaskCommentByIdData otherTyped = other as GetTaskCommentByIdData;
    return taskComment == otherTyped.taskComment;
    
  }
  @override
  int get hashCode => taskComment.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (taskComment != null) {
      json['taskComment'] = taskComment!.toJson();
    }
    return json;
  }

  GetTaskCommentByIdData({
    this.taskComment,
  });
}

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

    final GetTaskCommentByIdVariables otherTyped = other as GetTaskCommentByIdVariables;
    return id == otherTyped.id;
    
  }
  @override
  int get hashCode => id.hashCode;
  

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

  GetTaskCommentByIdVariables({
    required this.id,
  });
}

