part of 'generated.dart';

class CreateTeamHudDepartmentVariablesBuilder {
  String name;
  Optional<String> _costCenter = Optional.optional(nativeFromJson, nativeToJson);
  String teamHubId;

  final FirebaseDataConnect _dataConnect;  CreateTeamHudDepartmentVariablesBuilder costCenter(String? t) {
   _costCenter.value = t;
   return this;
  }

  CreateTeamHudDepartmentVariablesBuilder(this._dataConnect, {required  this.name,required  this.teamHubId,});
  Deserializer<CreateTeamHudDepartmentData> dataDeserializer = (dynamic json)  => CreateTeamHudDepartmentData.fromJson(jsonDecode(json));
  Serializer<CreateTeamHudDepartmentVariables> varsSerializer = (CreateTeamHudDepartmentVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables>> execute() {
    return ref().execute();
  }

  MutationRef<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables> ref() {
    CreateTeamHudDepartmentVariables vars= CreateTeamHudDepartmentVariables(name: name,costCenter: _costCenter,teamHubId: teamHubId,);
    return _dataConnect.mutation("createTeamHudDepartment", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final CreateTeamHudDepartmentData otherTyped = other as CreateTeamHudDepartmentData;
    return teamHudDepartment_insert == otherTyped.teamHudDepartment_insert;
    
  }
  @override
  int get hashCode => teamHudDepartment_insert.hashCode;
  

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

  CreateTeamHudDepartmentData({
    required this.teamHudDepartment_insert,
  });
}

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

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

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

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

