part of 'generated.dart';

class GetClientFeedbackByIdVariablesBuilder {
  String id;

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

  QueryRef<GetClientFeedbackByIdData, GetClientFeedbackByIdVariables> ref() {
    GetClientFeedbackByIdVariables vars= GetClientFeedbackByIdVariables(id: id,);
    return _dataConnect.query("getClientFeedbackById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetClientFeedbackByIdClientFeedback {
  final String id;
  final String businessId;
  final String vendorId;
  final int? rating;
  final String? comment;
  final Timestamp? date;
  final Timestamp? createdAt;
  final GetClientFeedbackByIdClientFeedbackBusiness business;
  final GetClientFeedbackByIdClientFeedbackVendor vendor;
  GetClientFeedbackByIdClientFeedback.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  businessId = nativeFromJson<String>(json['businessId']),
  vendorId = nativeFromJson<String>(json['vendorId']),
  rating = json['rating'] == null ? null : nativeFromJson<int>(json['rating']),
  comment = json['comment'] == null ? null : nativeFromJson<String>(json['comment']),
  date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  business = GetClientFeedbackByIdClientFeedbackBusiness.fromJson(json['business']),
  vendor = GetClientFeedbackByIdClientFeedbackVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetClientFeedbackByIdClientFeedback otherTyped = other as GetClientFeedbackByIdClientFeedback;
    return id == otherTyped.id && 
    businessId == otherTyped.businessId && 
    vendorId == otherTyped.vendorId && 
    rating == otherTyped.rating && 
    comment == otherTyped.comment && 
    date == otherTyped.date && 
    createdAt == otherTyped.createdAt && 
    business == otherTyped.business && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['businessId'] = nativeToJson<String>(businessId);
    json['vendorId'] = nativeToJson<String>(vendorId);
    if (rating != null) {
      json['rating'] = nativeToJson<int?>(rating);
    }
    if (comment != null) {
      json['comment'] = nativeToJson<String?>(comment);
    }
    if (date != null) {
      json['date'] = date!.toJson();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['business'] = business.toJson();
    json['vendor'] = vendor.toJson();
    return json;
  }

  GetClientFeedbackByIdClientFeedback({
    required this.id,
    required this.businessId,
    required this.vendorId,
    this.rating,
    this.comment,
    this.date,
    this.createdAt,
    required this.business,
    required this.vendor,
  });
}

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

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

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

  GetClientFeedbackByIdClientFeedbackBusiness({
    required this.id,
    required this.businessName,
  });
}

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

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

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

  GetClientFeedbackByIdClientFeedbackVendor({
    required this.id,
    required this.companyName,
  });
}

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

    final GetClientFeedbackByIdData otherTyped = other as GetClientFeedbackByIdData;
    return clientFeedback == otherTyped.clientFeedback;
    
  }
  @override
  int get hashCode => clientFeedback.hashCode;
  

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

  GetClientFeedbackByIdData({
    this.clientFeedback,
  });
}

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

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

