part of 'generated.dart';

class GetMemberTasksByTaskIdVariablesBuilder {
  String taskId;

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

  QueryRef<GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables> ref() {
    GetMemberTasksByTaskIdVariables vars= GetMemberTasksByTaskIdVariables(taskId: taskId,);
    return _dataConnect.query("getMemberTasksByTaskId", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

@immutable
class GetMemberTasksByTaskIdMemberTasksTask {
  final String id;
  final String taskName;
  final String? description;
  final EnumValue<TaskStatus> status;
  final Timestamp? dueDate;
  final int? progress;
  final EnumValue<TaskPriority> priority;
  GetMemberTasksByTaskIdMemberTasksTask.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 GetMemberTasksByTaskIdMemberTasksTask otherTyped = other as GetMemberTasksByTaskIdMemberTasksTask;
    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;
  }

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

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

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

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

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

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

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

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

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

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

@immutable
class GetMemberTasksByTaskIdVariables {
  final String taskId;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  GetMemberTasksByTaskIdVariables.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 GetMemberTasksByTaskIdVariables otherTyped = other as GetMemberTasksByTaskIdVariables;
    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;
  }

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

