part of 'generated.dart';

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

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

@immutable
class ListVendorsVendors {
  final String id;
  final String userId;
  final String companyName;
  final String? email;
  final String? phone;
  final String? photoUrl;
  final String? address;
  final String? billingAddress;
  final String? timezone;
  final String? legalName;
  final String? doingBusinessAs;
  final String? region;
  final String? state;
  final String? city;
  final String? serviceSpecialty;
  final EnumValue<ApprovalStatus>? approvalStatus;
  final bool? isActive;
  final double? markup;
  final double? fee;
  final double? csat;
  final EnumValue<VendorTier>? tier;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  ListVendorsVendors.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  userId = nativeFromJson<String>(json['userId']),
  companyName = nativeFromJson<String>(json['companyName']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
  phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
  photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']),
  address = json['address'] == null ? null : nativeFromJson<String>(json['address']),
  billingAddress = json['billingAddress'] == null ? null : nativeFromJson<String>(json['billingAddress']),
  timezone = json['timezone'] == null ? null : nativeFromJson<String>(json['timezone']),
  legalName = json['legalName'] == null ? null : nativeFromJson<String>(json['legalName']),
  doingBusinessAs = json['doingBusinessAs'] == null ? null : nativeFromJson<String>(json['doingBusinessAs']),
  region = json['region'] == null ? null : nativeFromJson<String>(json['region']),
  state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
  city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
  serviceSpecialty = json['serviceSpecialty'] == null ? null : nativeFromJson<String>(json['serviceSpecialty']),
  approvalStatus = json['approvalStatus'] == null ? null : approvalStatusDeserializer(json['approvalStatus']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']),
  markup = json['markup'] == null ? null : nativeFromJson<double>(json['markup']),
  fee = json['fee'] == null ? null : nativeFromJson<double>(json['fee']),
  csat = json['csat'] == null ? null : nativeFromJson<double>(json['csat']),
  tier = json['tier'] == null ? null : vendorTierDeserializer(json['tier']),
  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 ListVendorsVendors otherTyped = other as ListVendorsVendors;
    return id == otherTyped.id && 
    userId == otherTyped.userId && 
    companyName == otherTyped.companyName && 
    email == otherTyped.email && 
    phone == otherTyped.phone && 
    photoUrl == otherTyped.photoUrl && 
    address == otherTyped.address && 
    billingAddress == otherTyped.billingAddress && 
    timezone == otherTyped.timezone && 
    legalName == otherTyped.legalName && 
    doingBusinessAs == otherTyped.doingBusinessAs && 
    region == otherTyped.region && 
    state == otherTyped.state && 
    city == otherTyped.city && 
    serviceSpecialty == otherTyped.serviceSpecialty && 
    approvalStatus == otherTyped.approvalStatus && 
    isActive == otherTyped.isActive && 
    markup == otherTyped.markup && 
    fee == otherTyped.fee && 
    csat == otherTyped.csat && 
    tier == otherTyped.tier && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['userId'] = nativeToJson<String>(userId);
    json['companyName'] = nativeToJson<String>(companyName);
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    if (phone != null) {
      json['phone'] = nativeToJson<String?>(phone);
    }
    if (photoUrl != null) {
      json['photoUrl'] = nativeToJson<String?>(photoUrl);
    }
    if (address != null) {
      json['address'] = nativeToJson<String?>(address);
    }
    if (billingAddress != null) {
      json['billingAddress'] = nativeToJson<String?>(billingAddress);
    }
    if (timezone != null) {
      json['timezone'] = nativeToJson<String?>(timezone);
    }
    if (legalName != null) {
      json['legalName'] = nativeToJson<String?>(legalName);
    }
    if (doingBusinessAs != null) {
      json['doingBusinessAs'] = nativeToJson<String?>(doingBusinessAs);
    }
    if (region != null) {
      json['region'] = nativeToJson<String?>(region);
    }
    if (state != null) {
      json['state'] = nativeToJson<String?>(state);
    }
    if (city != null) {
      json['city'] = nativeToJson<String?>(city);
    }
    if (serviceSpecialty != null) {
      json['serviceSpecialty'] = nativeToJson<String?>(serviceSpecialty);
    }
    if (approvalStatus != null) {
      json['approvalStatus'] = 
    approvalStatusSerializer(approvalStatus!)
    ;
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    if (markup != null) {
      json['markup'] = nativeToJson<double?>(markup);
    }
    if (fee != null) {
      json['fee'] = nativeToJson<double?>(fee);
    }
    if (csat != null) {
      json['csat'] = nativeToJson<double?>(csat);
    }
    if (tier != null) {
      json['tier'] = 
    vendorTierSerializer(tier!)
    ;
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  ListVendorsVendors({
    required this.id,
    required this.userId,
    required this.companyName,
    this.email,
    this.phone,
    this.photoUrl,
    this.address,
    this.billingAddress,
    this.timezone,
    this.legalName,
    this.doingBusinessAs,
    this.region,
    this.state,
    this.city,
    this.serviceSpecialty,
    this.approvalStatus,
    this.isActive,
    this.markup,
    this.fee,
    this.csat,
    this.tier,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

    final ListVendorsData otherTyped = other as ListVendorsData;
    return vendors == otherTyped.vendors;
    
  }
  @override
  int get hashCode => vendors.hashCode;
  

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

  ListVendorsData({
    required this.vendors,
  });
}

