part of 'generated.dart';

class GetTeamMembersByTeamIdVariablesBuilder {
  String teamId;

  final FirebaseDataConnect _dataConnect;
  GetTeamMembersByTeamIdVariablesBuilder(this._dataConnect, {required  this.teamId,});
  Deserializer<GetTeamMembersByTeamIdData> dataDeserializer = (dynamic json)  => GetTeamMembersByTeamIdData.fromJson(jsonDecode(json));
  Serializer<GetTeamMembersByTeamIdVariables> varsSerializer = (GetTeamMembersByTeamIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables> ref() {
    GetTeamMembersByTeamIdVariables vars= GetTeamMembersByTeamIdVariables(teamId: teamId,);
    return _dataConnect.query("getTeamMembersByTeamId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamMembersByTeamIdTeamMembers {
  final String id;
  final String teamId;
  final EnumValue<TeamMemberRole> role;
  final String? title;
  final String? department;
  final String? teamHubId;
  final bool? isActive;
  final Timestamp? createdAt;
  final GetTeamMembersByTeamIdTeamMembersUser user;
  final GetTeamMembersByTeamIdTeamMembersTeamHub? teamHub;
  GetTeamMembersByTeamIdTeamMembers.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamId = nativeFromJson<String>(json['teamId']),
  role = teamMemberRoleDeserializer(json['role']),
  title = json['title'] == null ? null : nativeFromJson<String>(json['title']),
  department = json['department'] == null ? null : nativeFromJson<String>(json['department']),
  teamHubId = json['teamHubId'] == null ? null : nativeFromJson<String>(json['teamHubId']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  user = GetTeamMembersByTeamIdTeamMembersUser.fromJson(json['user']),
  teamHub = json['teamHub'] == null ? null : GetTeamMembersByTeamIdTeamMembersTeamHub.fromJson(json['teamHub']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMembersByTeamIdTeamMembers otherTyped = other as GetTeamMembersByTeamIdTeamMembers;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    role == otherTyped.role && 
    title == otherTyped.title && 
    department == otherTyped.department && 
    teamHubId == otherTyped.teamHubId && 
    isActive == otherTyped.isActive && 
    createdAt == otherTyped.createdAt && 
    user == otherTyped.user && 
    teamHub == otherTyped.teamHub;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['teamId'] = nativeToJson<String>(teamId);
    json['role'] = 
    teamMemberRoleSerializer(role)
    ;
    if (title != null) {
      json['title'] = nativeToJson<String?>(title);
    }
    if (department != null) {
      json['department'] = nativeToJson<String?>(department);
    }
    if (teamHubId != null) {
      json['teamHubId'] = nativeToJson<String?>(teamHubId);
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['user'] = user.toJson();
    if (teamHub != null) {
      json['teamHub'] = teamHub!.toJson();
    }
    return json;
  }

  GetTeamMembersByTeamIdTeamMembers({
    required this.id,
    required this.teamId,
    required this.role,
    this.title,
    this.department,
    this.teamHubId,
    this.isActive,
    this.createdAt,
    required this.user,
    this.teamHub,
  });
}

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

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

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

    final GetTeamMembersByTeamIdTeamMembersTeamHub otherTyped = other as GetTeamMembersByTeamIdTeamMembersTeamHub;
    return hubName == otherTyped.hubName;
    
  }
  @override
  int get hashCode => hubName.hashCode;
  

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

  GetTeamMembersByTeamIdTeamMembersTeamHub({
    required this.hubName,
  });
}

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

    final GetTeamMembersByTeamIdData otherTyped = other as GetTeamMembersByTeamIdData;
    return teamMembers == otherTyped.teamMembers;
    
  }
  @override
  int get hashCode => teamMembers.hashCode;
  

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

  GetTeamMembersByTeamIdData({
    required this.teamMembers,
  });
}

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

    final GetTeamMembersByTeamIdVariables otherTyped = other as GetTeamMembersByTeamIdVariables;
    return teamId == otherTyped.teamId;
    
  }
  @override
  int get hashCode => teamId.hashCode;
  

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

  GetTeamMembersByTeamIdVariables({
    required this.teamId,
  });
}

