part of 'generated.dart';

class GetTeamHubByIdVariablesBuilder {
  String id;

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

  QueryRef<GetTeamHubByIdData, GetTeamHubByIdVariables> ref() {
    GetTeamHubByIdVariables vars= GetTeamHubByIdVariables(id: id,);
    return _dataConnect.query("getTeamHubById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamHubByIdTeamHub {
  final String id;
  final String teamId;
  final String hubName;
  final String address;
  final String? placeId;
  final double? latitude;
  final double? longitude;
  final String? city;
  final String? state;
  final String? street;
  final String? country;
  final String? zipCode;
  final String? managerName;
  final bool isActive;
  final AnyValue? departments;
  GetTeamHubByIdTeamHub.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamId = nativeFromJson<String>(json['teamId']),
  hubName = nativeFromJson<String>(json['hubName']),
  address = nativeFromJson<String>(json['address']),
  placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
  latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
  longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
  city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
  state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
  street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
  country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
  zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
  managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
  isActive = nativeFromJson<bool>(json['isActive']),
  departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamHubByIdTeamHub otherTyped = other as GetTeamHubByIdTeamHub;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    hubName == otherTyped.hubName && 
    address == otherTyped.address && 
    placeId == otherTyped.placeId && 
    latitude == otherTyped.latitude && 
    longitude == otherTyped.longitude && 
    city == otherTyped.city && 
    state == otherTyped.state && 
    street == otherTyped.street && 
    country == otherTyped.country && 
    zipCode == otherTyped.zipCode && 
    managerName == otherTyped.managerName && 
    isActive == otherTyped.isActive && 
    departments == otherTyped.departments;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['teamId'] = nativeToJson<String>(teamId);
    json['hubName'] = nativeToJson<String>(hubName);
    json['address'] = nativeToJson<String>(address);
    if (placeId != null) {
      json['placeId'] = nativeToJson<String?>(placeId);
    }
    if (latitude != null) {
      json['latitude'] = nativeToJson<double?>(latitude);
    }
    if (longitude != null) {
      json['longitude'] = nativeToJson<double?>(longitude);
    }
    if (city != null) {
      json['city'] = nativeToJson<String?>(city);
    }
    if (state != null) {
      json['state'] = nativeToJson<String?>(state);
    }
    if (street != null) {
      json['street'] = nativeToJson<String?>(street);
    }
    if (country != null) {
      json['country'] = nativeToJson<String?>(country);
    }
    if (zipCode != null) {
      json['zipCode'] = nativeToJson<String?>(zipCode);
    }
    if (managerName != null) {
      json['managerName'] = nativeToJson<String?>(managerName);
    }
    json['isActive'] = nativeToJson<bool>(isActive);
    if (departments != null) {
      json['departments'] = departments!.toJson();
    }
    return json;
  }

  GetTeamHubByIdTeamHub({
    required this.id,
    required this.teamId,
    required this.hubName,
    required this.address,
    this.placeId,
    this.latitude,
    this.longitude,
    this.city,
    this.state,
    this.street,
    this.country,
    this.zipCode,
    this.managerName,
    required this.isActive,
    this.departments,
  });
}

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

    final GetTeamHubByIdData otherTyped = other as GetTeamHubByIdData;
    return teamHub == otherTyped.teamHub;
    
  }
  @override
  int get hashCode => teamHub.hashCode;
  

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

  GetTeamHubByIdData({
    this.teamHub,
  });
}

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

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

