part of 'generated.dart';

class GetTeamsByOwnerIdVariablesBuilder {
  String ownerId;

  final FirebaseDataConnect _dataConnect;
  GetTeamsByOwnerIdVariablesBuilder(this._dataConnect, {required  this.ownerId,});
  Deserializer<GetTeamsByOwnerIdData> dataDeserializer = (dynamic json)  => GetTeamsByOwnerIdData.fromJson(jsonDecode(json));
  Serializer<GetTeamsByOwnerIdVariables> varsSerializer = (GetTeamsByOwnerIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables> ref() {
    GetTeamsByOwnerIdVariables vars= GetTeamsByOwnerIdVariables(ownerId: ownerId,);
    return _dataConnect.query("getTeamsByOwnerId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamsByOwnerIdTeams {
  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;
  GetTeamsByOwnerIdTeams.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 GetTeamsByOwnerIdTeams otherTyped = other as GetTeamsByOwnerIdTeams;
    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;
  }

  GetTeamsByOwnerIdTeams({
    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 GetTeamsByOwnerIdData {
  final List<GetTeamsByOwnerIdTeams> teams;
  GetTeamsByOwnerIdData.fromJson(dynamic json):
  
  teams = (json['teams'] as List<dynamic>)
        .map((e) => GetTeamsByOwnerIdTeams.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamsByOwnerIdData otherTyped = other as GetTeamsByOwnerIdData;
    return teams == otherTyped.teams;
    
  }
  @override
  int get hashCode => teams.hashCode;
  

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

  GetTeamsByOwnerIdData({
    required this.teams,
  });
}

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

    final GetTeamsByOwnerIdVariables otherTyped = other as GetTeamsByOwnerIdVariables;
    return ownerId == otherTyped.ownerId;
    
  }
  @override
  int get hashCode => ownerId.hashCode;
  

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

  GetTeamsByOwnerIdVariables({
    required this.ownerId,
  });
}

