part of 'generated.dart';

class ListTeamHubsByOwnerIdVariablesBuilder {
  String ownerId;

  final FirebaseDataConnect _dataConnect;
  ListTeamHubsByOwnerIdVariablesBuilder(this._dataConnect, {required  this.ownerId,});
  Deserializer<ListTeamHubsByOwnerIdData> dataDeserializer = (dynamic json)  => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json));
  Serializer<ListTeamHubsByOwnerIdVariables> varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables> ref() {
    ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,);
    return _dataConnect.query("listTeamHubsByOwnerId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListTeamHubsByOwnerIdTeamHubs {
  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;
  ListTeamHubsByOwnerIdTeamHubs.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']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamHubsByOwnerIdTeamHubs otherTyped = other as ListTeamHubsByOwnerIdTeamHubs;
    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;
    
  }
  @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]);
  

  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();
    }
    return json;
  }

  ListTeamHubsByOwnerIdTeamHubs({
    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,
  });
}

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

    final ListTeamHubsByOwnerIdData otherTyped = other as ListTeamHubsByOwnerIdData;
    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;
  }

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

@immutable
class ListTeamHubsByOwnerIdVariables {
  final String ownerId;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListTeamHubsByOwnerIdVariables.fromJson(Map<String, dynamic> json):
  
  ownerId = nativeFromJson<String>(json['ownerId']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables;
    return ownerId == otherTyped.ownerId;
    
  }
  @override
  int get hashCode => ownerId.hashCode;
  

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

  ListTeamHubsByOwnerIdVariables({
    required this.ownerId,
  });
}

