part of 'generated.dart';

class UpdateTeamVariablesBuilder {
  String id;
  Optional<String> _teamName = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _ownerName = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _ownerRole = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _companyLogo = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _totalMembers = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _activeMembers = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _totalHubs = Optional.optional(nativeFromJson, nativeToJson);
  Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<int> _favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson);
  Optional<AnyValue> _favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
  Optional<AnyValue> _blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);

  final FirebaseDataConnect _dataConnect;  UpdateTeamVariablesBuilder teamName(String? t) {
   _teamName.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder ownerName(String? t) {
   _ownerName.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder ownerRole(String? t) {
   _ownerRole.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder companyLogo(String? t) {
   _companyLogo.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder totalMembers(int? t) {
   _totalMembers.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder activeMembers(int? t) {
   _activeMembers.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder totalHubs(int? t) {
   _totalHubs.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder departments(AnyValue? t) {
   _departments.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder favoriteStaffCount(int? t) {
   _favoriteStaffCount.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder blockedStaffCount(int? t) {
   _blockedStaffCount.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder favoriteStaff(AnyValue? t) {
   _favoriteStaff.value = t;
   return this;
  }
  UpdateTeamVariablesBuilder blockedStaff(AnyValue? t) {
   _blockedStaff.value = t;
   return this;
  }

  UpdateTeamVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<UpdateTeamData> dataDeserializer = (dynamic json)  => UpdateTeamData.fromJson(jsonDecode(json));
  Serializer<UpdateTeamVariables> varsSerializer = (UpdateTeamVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<UpdateTeamData, UpdateTeamVariables>> execute() {
    return ref().execute();
  }

  MutationRef<UpdateTeamData, UpdateTeamVariables> ref() {
    UpdateTeamVariables vars= UpdateTeamVariables(id: id,teamName: _teamName,ownerName: _ownerName,ownerRole: _ownerRole,companyLogo: _companyLogo,totalMembers: _totalMembers,activeMembers: _activeMembers,totalHubs: _totalHubs,departments: _departments,favoriteStaffCount: _favoriteStaffCount,blockedStaffCount: _blockedStaffCount,favoriteStaff: _favoriteStaff,blockedStaff: _blockedStaff,);
    return _dataConnect.mutation("updateTeam", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class UpdateTeamTeamUpdate {
  final String id;
  UpdateTeamTeamUpdate.fromJson(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 UpdateTeamTeamUpdate otherTyped = other as UpdateTeamTeamUpdate;
    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;
  }

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

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

    final UpdateTeamData otherTyped = other as UpdateTeamData;
    return team_update == otherTyped.team_update;
    
  }
  @override
  int get hashCode => team_update.hashCode;
  

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

  UpdateTeamData({
    this.team_update,
  });
}

@immutable
class UpdateTeamVariables {
  final String id;
  late final Optional<String>teamName;
  late final Optional<String>ownerName;
  late final Optional<String>ownerRole;
  late final Optional<String>companyLogo;
  late final Optional<int>totalMembers;
  late final Optional<int>activeMembers;
  late final Optional<int>totalHubs;
  late final Optional<AnyValue>departments;
  late final Optional<int>favoriteStaffCount;
  late final Optional<int>blockedStaffCount;
  late final Optional<AnyValue>favoriteStaff;
  late final Optional<AnyValue>blockedStaff;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateTeamVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    teamName = Optional.optional(nativeFromJson, nativeToJson);
    teamName.value = json['teamName'] == null ? null : nativeFromJson<String>(json['teamName']);
  
  
    ownerName = Optional.optional(nativeFromJson, nativeToJson);
    ownerName.value = json['ownerName'] == null ? null : nativeFromJson<String>(json['ownerName']);
  
  
    ownerRole = Optional.optional(nativeFromJson, nativeToJson);
    ownerRole.value = json['ownerRole'] == null ? null : nativeFromJson<String>(json['ownerRole']);
  
  
    companyLogo = Optional.optional(nativeFromJson, nativeToJson);
    companyLogo.value = json['companyLogo'] == null ? null : nativeFromJson<String>(json['companyLogo']);
  
  
    totalMembers = Optional.optional(nativeFromJson, nativeToJson);
    totalMembers.value = json['totalMembers'] == null ? null : nativeFromJson<int>(json['totalMembers']);
  
  
    activeMembers = Optional.optional(nativeFromJson, nativeToJson);
    activeMembers.value = json['activeMembers'] == null ? null : nativeFromJson<int>(json['activeMembers']);
  
  
    totalHubs = Optional.optional(nativeFromJson, nativeToJson);
    totalHubs.value = json['totalHubs'] == null ? null : nativeFromJson<int>(json['totalHubs']);
  
  
    departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
    departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
  
  
    favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson);
    favoriteStaffCount.value = json['favoriteStaffCount'] == null ? null : nativeFromJson<int>(json['favoriteStaffCount']);
  
  
    blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson);
    blockedStaffCount.value = json['blockedStaffCount'] == null ? null : nativeFromJson<int>(json['blockedStaffCount']);
  
  
    favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
    favoriteStaff.value = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']);
  
  
    blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
    blockedStaff.value = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateTeamVariables otherTyped = other as UpdateTeamVariables;
    return id == otherTyped.id && 
    teamName == otherTyped.teamName && 
    ownerName == otherTyped.ownerName && 
    ownerRole == otherTyped.ownerRole && 
    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;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerName.hashCode, ownerRole.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(teamName.state == OptionalState.set) {
      json['teamName'] = teamName.toJson();
    }
    if(ownerName.state == OptionalState.set) {
      json['ownerName'] = ownerName.toJson();
    }
    if(ownerRole.state == OptionalState.set) {
      json['ownerRole'] = ownerRole.toJson();
    }
    if(companyLogo.state == OptionalState.set) {
      json['companyLogo'] = companyLogo.toJson();
    }
    if(totalMembers.state == OptionalState.set) {
      json['totalMembers'] = totalMembers.toJson();
    }
    if(activeMembers.state == OptionalState.set) {
      json['activeMembers'] = activeMembers.toJson();
    }
    if(totalHubs.state == OptionalState.set) {
      json['totalHubs'] = totalHubs.toJson();
    }
    if(departments.state == OptionalState.set) {
      json['departments'] = departments.toJson();
    }
    if(favoriteStaffCount.state == OptionalState.set) {
      json['favoriteStaffCount'] = favoriteStaffCount.toJson();
    }
    if(blockedStaffCount.state == OptionalState.set) {
      json['blockedStaffCount'] = blockedStaffCount.toJson();
    }
    if(favoriteStaff.state == OptionalState.set) {
      json['favoriteStaff'] = favoriteStaff.toJson();
    }
    if(blockedStaff.state == OptionalState.set) {
      json['blockedStaff'] = blockedStaff.toJson();
    }
    return json;
  }

  UpdateTeamVariables({
    required this.id,
    required this.teamName,
    required this.ownerName,
    required this.ownerRole,
    required this.companyLogo,
    required this.totalMembers,
    required this.activeMembers,
    required this.totalHubs,
    required this.departments,
    required this.favoriteStaffCount,
    required this.blockedStaffCount,
    required this.favoriteStaff,
    required this.blockedStaff,
  });
}

