part of 'generated.dart';

class UpdateTeamHudDepartmentVariablesBuilder {
  String id;
  Optional<String> _name = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _costCenter = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _teamHubId = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateTeamHudDepartmentVariablesBuilder name(String? t) {
   _name.value = t;
   return this;
  }
  UpdateTeamHudDepartmentVariablesBuilder costCenter(String? t) {
   _costCenter.value = t;
   return this;
  }
  UpdateTeamHudDepartmentVariablesBuilder teamHubId(String? t) {
   _teamHubId.value = t;
   return this;
  }

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

  MutationRef<UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables> ref() {
    UpdateTeamHudDepartmentVariables vars= UpdateTeamHudDepartmentVariables(id: id,name: _name,costCenter: _costCenter,teamHubId: _teamHubId,);
    return _dataConnect.mutation("updateTeamHudDepartment", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final UpdateTeamHudDepartmentData otherTyped = other as UpdateTeamHudDepartmentData;
    return teamHudDepartment_update == otherTyped.teamHudDepartment_update;
    
  }
  @override
  int get hashCode => teamHudDepartment_update.hashCode;
  

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

  UpdateTeamHudDepartmentData({
    this.teamHudDepartment_update,
  });
}

@immutable
class UpdateTeamHudDepartmentVariables {
  final String id;
  late final Optional<String>name;
  late final Optional<String>costCenter;
  late final Optional<String>teamHubId;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateTeamHudDepartmentVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    name = Optional.optional(nativeFromJson, nativeToJson);
    name.value = json['name'] == null ? null : nativeFromJson<String>(json['name']);
  
  
    costCenter = Optional.optional(nativeFromJson, nativeToJson);
    costCenter.value = json['costCenter'] == null ? null : nativeFromJson<String>(json['costCenter']);
  
  
    teamHubId = Optional.optional(nativeFromJson, nativeToJson);
    teamHubId.value = json['teamHubId'] == null ? null : nativeFromJson<String>(json['teamHubId']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateTeamHudDepartmentVariables otherTyped = other as UpdateTeamHudDepartmentVariables;
    return id == otherTyped.id && 
    name == otherTyped.name && 
    costCenter == otherTyped.costCenter && 
    teamHubId == otherTyped.teamHubId;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costCenter.hashCode, teamHubId.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(name.state == OptionalState.set) {
      json['name'] = name.toJson();
    }
    if(costCenter.state == OptionalState.set) {
      json['costCenter'] = costCenter.toJson();
    }
    if(teamHubId.state == OptionalState.set) {
      json['teamHubId'] = teamHubId.toJson();
    }
    return json;
  }

  UpdateTeamHudDepartmentVariables({
    required this.id,
    required this.name,
    required this.costCenter,
    required this.teamHubId,
  });
}

