part of 'generated.dart';

class GetMyTasksVariablesBuilder {
  String teamMemberId;

  final FirebaseDataConnect _dataConnect;
  GetMyTasksVariablesBuilder(this._dataConnect, {required  this.teamMemberId,});
  Deserializer<GetMyTasksData> dataDeserializer = (dynamic json)  => GetMyTasksData.fromJson(jsonDecode(json));
  Serializer<GetMyTasksVariables> varsSerializer = (GetMyTasksVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetMyTasksData, GetMyTasksVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetMyTasksData, GetMyTasksVariables> ref() {
    GetMyTasksVariables vars= GetMyTasksVariables(teamMemberId: teamMemberId,);
    return _dataConnect.query("getMyTasks", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetMyTasksMemberTasks {
  final String id;
  final GetMyTasksMemberTasksTask task;
  final GetMyTasksMemberTasksTeamMember teamMember;
  GetMyTasksMemberTasks.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  task = GetMyTasksMemberTasksTask.fromJson(json['task']),
  teamMember = GetMyTasksMemberTasksTeamMember.fromJson(json['teamMember']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetMyTasksMemberTasks otherTyped = other as GetMyTasksMemberTasks;
    return id == otherTyped.id && 
    task == otherTyped.task && 
    teamMember == otherTyped.teamMember;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, task.hashCode, teamMember.hashCode]);
  

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

  GetMyTasksMemberTasks({
    required this.id,
    required this.task,
    required this.teamMember,
  });
}

@immutable
class GetMyTasksMemberTasksTask {
  final String id;
  final String taskName;
  final String? description;
  final EnumValue<TaskStatus> status;
  final Timestamp? dueDate;
  final int? progress;
  final EnumValue<TaskPriority> priority;
  GetMyTasksMemberTasksTask.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  taskName = nativeFromJson<String>(json['taskName']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  status = taskStatusDeserializer(json['status']),
  dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']),
  progress = json['progress'] == null ? null : nativeFromJson<int>(json['progress']),
  priority = taskPriorityDeserializer(json['priority']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetMyTasksMemberTasksTask otherTyped = other as GetMyTasksMemberTasksTask;
    return id == otherTyped.id && 
    taskName == otherTyped.taskName && 
    description == otherTyped.description && 
    status == otherTyped.status && 
    dueDate == otherTyped.dueDate && 
    progress == otherTyped.progress && 
    priority == otherTyped.priority;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, priority.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['taskName'] = nativeToJson<String>(taskName);
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    json['status'] = 
    taskStatusSerializer(status)
    ;
    if (dueDate != null) {
      json['dueDate'] = dueDate!.toJson();
    }
    if (progress != null) {
      json['progress'] = nativeToJson<int?>(progress);
    }
    json['priority'] = 
    taskPrioritySerializer(priority)
    ;
    return json;
  }

  GetMyTasksMemberTasksTask({
    required this.id,
    required this.taskName,
    this.description,
    required this.status,
    this.dueDate,
    this.progress,
    required this.priority,
  });
}

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

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

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

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

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

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

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

    final GetMyTasksData otherTyped = other as GetMyTasksData;
    return memberTasks == otherTyped.memberTasks;
    
  }
  @override
  int get hashCode => memberTasks.hashCode;
  

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

  GetMyTasksData({
    required this.memberTasks,
  });
}

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

    final GetMyTasksVariables otherTyped = other as GetMyTasksVariables;
    return teamMemberId == otherTyped.teamMemberId;
    
  }
  @override
  int get hashCode => teamMemberId.hashCode;
  

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

  GetMyTasksVariables({
    required this.teamMemberId,
  });
}

