part of 'generated.dart';

class GetMemberTaskByIdKeyVariablesBuilder {
  String teamMemberId;
  String taskId;

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

  QueryRef<GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables> ref() {
    GetMemberTaskByIdKeyVariables vars= GetMemberTaskByIdKeyVariables(teamMemberId: teamMemberId,taskId: taskId,);
    return _dataConnect.query("getMemberTaskByIdKey", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

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

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

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

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

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

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

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

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

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

    final GetMemberTaskByIdKeyData otherTyped = other as GetMemberTaskByIdKeyData;
    return memberTask == otherTyped.memberTask;
    
  }
  @override
  int get hashCode => memberTask.hashCode;
  

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

  GetMemberTaskByIdKeyData({
    this.memberTask,
  });
}

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

    final GetMemberTaskByIdKeyVariables otherTyped = other as GetMemberTaskByIdKeyVariables;
    return teamMemberId == otherTyped.teamMemberId && 
    taskId == otherTyped.taskId;
    
  }
  @override
  int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]);
  

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

  GetMemberTaskByIdKeyVariables({
    required this.teamMemberId,
    required this.taskId,
  });
}

