part of 'generated.dart';

class ListTeamHubsVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListTeamHubsVariablesBuilder(this._dataConnect, );
  Deserializer<ListTeamHubsData> dataDeserializer = (dynamic json)  => ListTeamHubsData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListTeamHubsData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListTeamHubsData, void> ref() {
    
    return _dataConnect.query("listTeamHubs", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListTeamHubsTeamHubs {
  final String id;
  final String teamId;
  final String hubName;
  final String address;
  final String? city;
  final String? state;
  final String? zipCode;
  final String? managerName;
  final bool isActive;
  final AnyValue? departments;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  ListTeamHubsTeamHubs.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamId = nativeFromJson<String>(json['teamId']),
  hubName = nativeFromJson<String>(json['hubName']),
  address = nativeFromJson<String>(json['address']),
  city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
  state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
  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']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamHubsTeamHubs otherTyped = other as ListTeamHubsTeamHubs;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    hubName == otherTyped.hubName && 
    address == otherTyped.address && 
    city == otherTyped.city && 
    state == otherTyped.state && 
    zipCode == otherTyped.zipCode && 
    managerName == otherTyped.managerName && 
    isActive == otherTyped.isActive && 
    departments == otherTyped.departments && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.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 (city != null) {
      json['city'] = nativeToJson<String?>(city);
    }
    if (state != null) {
      json['state'] = nativeToJson<String?>(state);
    }
    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();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  ListTeamHubsTeamHubs({
    required this.id,
    required this.teamId,
    required this.hubName,
    required this.address,
    this.city,
    this.state,
    this.zipCode,
    this.managerName,
    required this.isActive,
    this.departments,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

@immutable
class ListTeamHubsData {
  final List<ListTeamHubsTeamHubs> teamHubs;
  ListTeamHubsData.fromJson(dynamic json):
  
  teamHubs = (json['teamHubs'] as List<dynamic>)
        .map((e) => ListTeamHubsTeamHubs.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamHubsData otherTyped = other as ListTeamHubsData;
    return teamHubs == otherTyped.teamHubs;
    
  }
  @override
  int get hashCode => teamHubs.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['teamHubs'] = teamHubs.map((e) => e.toJson()).toList();
    return json;
  }

  ListTeamHubsData({
    required this.teamHubs,
  });
}

