part of 'generated.dart';

class GetTeamByIdVariablesBuilder {
  String id;

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

  QueryRef<GetTeamByIdData, GetTeamByIdVariables> ref() {
    GetTeamByIdVariables vars= GetTeamByIdVariables(id: id,);
    return _dataConnect.query("getTeamById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamByIdTeam {
  final String id;
  final String teamName;
  final String ownerId;
  final String ownerName;
  final String ownerRole;
  final String? email;
  final String? companyLogo;
  final int? totalMembers;
  final int? activeMembers;
  final int? totalHubs;
  final AnyValue? departments;
  final int? favoriteStaffCount;
  final int? blockedStaffCount;
  final AnyValue? favoriteStaff;
  final AnyValue? blockedStaff;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  GetTeamByIdTeam.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamName = nativeFromJson<String>(json['teamName']),
  ownerId = nativeFromJson<String>(json['ownerId']),
  ownerName = nativeFromJson<String>(json['ownerName']),
  ownerRole = nativeFromJson<String>(json['ownerRole']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
  companyLogo = json['companyLogo'] == null ? null : nativeFromJson<String>(json['companyLogo']),
  totalMembers = json['totalMembers'] == null ? null : nativeFromJson<int>(json['totalMembers']),
  activeMembers = json['activeMembers'] == null ? null : nativeFromJson<int>(json['activeMembers']),
  totalHubs = json['totalHubs'] == null ? null : nativeFromJson<int>(json['totalHubs']),
  departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
  favoriteStaffCount = json['favoriteStaffCount'] == null ? null : nativeFromJson<int>(json['favoriteStaffCount']),
  blockedStaffCount = json['blockedStaffCount'] == null ? null : nativeFromJson<int>(json['blockedStaffCount']),
  favoriteStaff = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']),
  blockedStaff = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamByIdTeam otherTyped = other as GetTeamByIdTeam;
    return id == otherTyped.id && 
    teamName == otherTyped.teamName && 
    ownerId == otherTyped.ownerId && 
    ownerName == otherTyped.ownerName && 
    ownerRole == otherTyped.ownerRole && 
    email == otherTyped.email && 
    companyLogo == otherTyped.companyLogo && 
    totalMembers == otherTyped.totalMembers && 
    activeMembers == otherTyped.activeMembers && 
    totalHubs == otherTyped.totalHubs && 
    departments == otherTyped.departments && 
    favoriteStaffCount == otherTyped.favoriteStaffCount && 
    blockedStaffCount == otherTyped.blockedStaffCount && 
    favoriteStaff == otherTyped.favoriteStaff && 
    blockedStaff == otherTyped.blockedStaff && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerId.hashCode, ownerName.hashCode, ownerRole.hashCode, email.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['teamName'] = nativeToJson<String>(teamName);
    json['ownerId'] = nativeToJson<String>(ownerId);
    json['ownerName'] = nativeToJson<String>(ownerName);
    json['ownerRole'] = nativeToJson<String>(ownerRole);
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    if (companyLogo != null) {
      json['companyLogo'] = nativeToJson<String?>(companyLogo);
    }
    if (totalMembers != null) {
      json['totalMembers'] = nativeToJson<int?>(totalMembers);
    }
    if (activeMembers != null) {
      json['activeMembers'] = nativeToJson<int?>(activeMembers);
    }
    if (totalHubs != null) {
      json['totalHubs'] = nativeToJson<int?>(totalHubs);
    }
    if (departments != null) {
      json['departments'] = departments!.toJson();
    }
    if (favoriteStaffCount != null) {
      json['favoriteStaffCount'] = nativeToJson<int?>(favoriteStaffCount);
    }
    if (blockedStaffCount != null) {
      json['blockedStaffCount'] = nativeToJson<int?>(blockedStaffCount);
    }
    if (favoriteStaff != null) {
      json['favoriteStaff'] = favoriteStaff!.toJson();
    }
    if (blockedStaff != null) {
      json['blockedStaff'] = blockedStaff!.toJson();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  GetTeamByIdTeam({
    required this.id,
    required this.teamName,
    required this.ownerId,
    required this.ownerName,
    required this.ownerRole,
    this.email,
    this.companyLogo,
    this.totalMembers,
    this.activeMembers,
    this.totalHubs,
    this.departments,
    this.favoriteStaffCount,
    this.blockedStaffCount,
    this.favoriteStaff,
    this.blockedStaff,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

    final GetTeamByIdData otherTyped = other as GetTeamByIdData;
    return team == otherTyped.team;
    
  }
  @override
  int get hashCode => team.hashCode;
  

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

  GetTeamByIdData({
    this.team,
  });
}

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

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

