part of 'generated.dart';

class GetTeamHudDepartmentByIdVariablesBuilder {
  String id;

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

  QueryRef<GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables> ref() {
    GetTeamHudDepartmentByIdVariables vars= GetTeamHudDepartmentByIdVariables(id: id,);
    return _dataConnect.query("getTeamHudDepartmentById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamHudDepartmentByIdTeamHudDepartment {
  final String id;
  final String name;
  final String? costCenter;
  final String teamHubId;
  final GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub teamHub;
  final Timestamp? createdAt;
  GetTeamHudDepartmentByIdTeamHudDepartment.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  name = nativeFromJson<String>(json['name']),
  costCenter = json['costCenter'] == null ? null : nativeFromJson<String>(json['costCenter']),
  teamHubId = nativeFromJson<String>(json['teamHubId']),
  teamHub = GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub.fromJson(json['teamHub']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['name'] = nativeToJson<String>(name);
    if (costCenter != null) {
      json['costCenter'] = nativeToJson<String?>(costCenter);
    }
    json['teamHubId'] = nativeToJson<String>(teamHubId);
    json['teamHub'] = teamHub.toJson();
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    return json;
  }

  GetTeamHudDepartmentByIdTeamHudDepartment({
    required this.id,
    required this.name,
    this.costCenter,
    required this.teamHubId,
    required this.teamHub,
    this.createdAt,
  });
}

@immutable
class GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub {
  final String id;
  final String hubName;
  GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  hubName = nativeFromJson<String>(json['hubName']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub({
    required this.id,
    required this.hubName,
  });
}

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

    final GetTeamHudDepartmentByIdData otherTyped = other as GetTeamHudDepartmentByIdData;
    return teamHudDepartment == otherTyped.teamHudDepartment;
    
  }
  @override
  int get hashCode => teamHudDepartment.hashCode;
  

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

  GetTeamHudDepartmentByIdData({
    this.teamHudDepartment,
  });
}

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

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

