part of 'generated.dart';

class GetRecentPaymentByIdVariablesBuilder {
  String id;

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

  QueryRef<GetRecentPaymentByIdData, GetRecentPaymentByIdVariables> ref() {
    GetRecentPaymentByIdVariables vars= GetRecentPaymentByIdVariables(id: id,);
    return _dataConnect.query("getRecentPaymentById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetRecentPaymentByIdRecentPayment {
  final String id;
  final String? workedTime;
  final EnumValue<RecentPaymentStatus>? status;
  final String staffId;
  final String applicationId;
  final String invoiceId;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  final GetRecentPaymentByIdRecentPaymentApplication application;
  final GetRecentPaymentByIdRecentPaymentInvoice invoice;
  GetRecentPaymentByIdRecentPayment.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  workedTime = json['workedTime'] == null ? null : nativeFromJson<String>(json['workedTime']),
  status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']),
  staffId = nativeFromJson<String>(json['staffId']),
  applicationId = nativeFromJson<String>(json['applicationId']),
  invoiceId = nativeFromJson<String>(json['invoiceId']),
  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']),
  application = GetRecentPaymentByIdRecentPaymentApplication.fromJson(json['application']),
  invoice = GetRecentPaymentByIdRecentPaymentInvoice.fromJson(json['invoice']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetRecentPaymentByIdRecentPayment otherTyped = other as GetRecentPaymentByIdRecentPayment;
    return id == otherTyped.id && 
    workedTime == otherTyped.workedTime && 
    status == otherTyped.status && 
    staffId == otherTyped.staffId && 
    applicationId == otherTyped.applicationId && 
    invoiceId == otherTyped.invoiceId && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    application == otherTyped.application && 
    invoice == otherTyped.invoice;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if (workedTime != null) {
      json['workedTime'] = nativeToJson<String?>(workedTime);
    }
    if (status != null) {
      json['status'] = 
    recentPaymentStatusSerializer(status!)
    ;
    }
    json['staffId'] = nativeToJson<String>(staffId);
    json['applicationId'] = nativeToJson<String>(applicationId);
    json['invoiceId'] = nativeToJson<String>(invoiceId);
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    json['application'] = application.toJson();
    json['invoice'] = invoice.toJson();
    return json;
  }

  GetRecentPaymentByIdRecentPayment({
    required this.id,
    this.workedTime,
    this.status,
    required this.staffId,
    required this.applicationId,
    required this.invoiceId,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
    required this.application,
    required this.invoice,
  });
}

@immutable
class GetRecentPaymentByIdRecentPaymentApplication {
  final Timestamp? checkInTime;
  final Timestamp? checkOutTime;
  final GetRecentPaymentByIdRecentPaymentApplicationShiftRole shiftRole;
  GetRecentPaymentByIdRecentPaymentApplication.fromJson(dynamic json):
  
  checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
  checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']),
  shiftRole = GetRecentPaymentByIdRecentPaymentApplicationShiftRole.fromJson(json['shiftRole']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetRecentPaymentByIdRecentPaymentApplication otherTyped = other as GetRecentPaymentByIdRecentPaymentApplication;
    return checkInTime == otherTyped.checkInTime && 
    checkOutTime == otherTyped.checkOutTime && 
    shiftRole == otherTyped.shiftRole;
    
  }
  @override
  int get hashCode => Object.hashAll([checkInTime.hashCode, checkOutTime.hashCode, shiftRole.hashCode]);
  

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

  GetRecentPaymentByIdRecentPaymentApplication({
    this.checkInTime,
    this.checkOutTime,
    required this.shiftRole,
  });
}

@immutable
class GetRecentPaymentByIdRecentPaymentApplicationShiftRole {
  final double? hours;
  final double? totalValue;
  final Timestamp? startTime;
  final Timestamp? endTime;
  final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole role;
  final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift shift;
  GetRecentPaymentByIdRecentPaymentApplicationShiftRole.fromJson(dynamic json):
  
  hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
  totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
  startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
  endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
  role = GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole.fromJson(json['role']),
  shift = GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift.fromJson(json['shift']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetRecentPaymentByIdRecentPaymentApplicationShiftRole otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRole;
    return hours == otherTyped.hours && 
    totalValue == otherTyped.totalValue && 
    startTime == otherTyped.startTime && 
    endTime == otherTyped.endTime && 
    role == otherTyped.role && 
    shift == otherTyped.shift;
    
  }
  @override
  int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, startTime.hashCode, endTime.hashCode, role.hashCode, shift.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (hours != null) {
      json['hours'] = nativeToJson<double?>(hours);
    }
    if (totalValue != null) {
      json['totalValue'] = nativeToJson<double?>(totalValue);
    }
    if (startTime != null) {
      json['startTime'] = startTime!.toJson();
    }
    if (endTime != null) {
      json['endTime'] = endTime!.toJson();
    }
    json['role'] = role.toJson();
    json['shift'] = shift.toJson();
    return json;
  }

  GetRecentPaymentByIdRecentPaymentApplicationShiftRole({
    this.hours,
    this.totalValue,
    this.startTime,
    this.endTime,
    required this.role,
    required this.shift,
  });
}

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

    final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole;
    return name == otherTyped.name && 
    costPerHour == otherTyped.costPerHour;
    
  }
  @override
  int get hashCode => Object.hashAll([name.hashCode, costPerHour.hashCode]);
  

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

  GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole({
    required this.name,
    required this.costPerHour,
  });
}

@immutable
class GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift {
  final String title;
  final Timestamp? date;
  final String? location;
  final String? locationAddress;
  final String? description;
  GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift.fromJson(dynamic json):
  
  title = nativeFromJson<String>(json['title']),
  date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
  location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
  locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift;
    return title == otherTyped.title && 
    date == otherTyped.date && 
    location == otherTyped.location && 
    locationAddress == otherTyped.locationAddress && 
    description == otherTyped.description;
    
  }
  @override
  int get hashCode => Object.hashAll([title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['title'] = nativeToJson<String>(title);
    if (date != null) {
      json['date'] = date!.toJson();
    }
    if (location != null) {
      json['location'] = nativeToJson<String?>(location);
    }
    if (locationAddress != null) {
      json['locationAddress'] = nativeToJson<String?>(locationAddress);
    }
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    return json;
  }

  GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift({
    required this.title,
    this.date,
    this.location,
    this.locationAddress,
    this.description,
  });
}

@immutable
class GetRecentPaymentByIdRecentPaymentInvoice {
  final EnumValue<InvoiceStatus> status;
  final String invoiceNumber;
  final Timestamp issueDate;
  final GetRecentPaymentByIdRecentPaymentInvoiceBusiness business;
  final GetRecentPaymentByIdRecentPaymentInvoiceVendor vendor;
  final GetRecentPaymentByIdRecentPaymentInvoiceOrder order;
  GetRecentPaymentByIdRecentPaymentInvoice.fromJson(dynamic json):
  
  status = invoiceStatusDeserializer(json['status']),
  invoiceNumber = nativeFromJson<String>(json['invoiceNumber']),
  issueDate = Timestamp.fromJson(json['issueDate']),
  business = GetRecentPaymentByIdRecentPaymentInvoiceBusiness.fromJson(json['business']),
  vendor = GetRecentPaymentByIdRecentPaymentInvoiceVendor.fromJson(json['vendor']),
  order = GetRecentPaymentByIdRecentPaymentInvoiceOrder.fromJson(json['order']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetRecentPaymentByIdRecentPaymentInvoice otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoice;
    return status == otherTyped.status && 
    invoiceNumber == otherTyped.invoiceNumber && 
    issueDate == otherTyped.issueDate && 
    business == otherTyped.business && 
    vendor == otherTyped.vendor && 
    order == otherTyped.order;
    
  }
  @override
  int get hashCode => Object.hashAll([status.hashCode, invoiceNumber.hashCode, issueDate.hashCode, business.hashCode, vendor.hashCode, order.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['status'] = 
    invoiceStatusSerializer(status)
    ;
    json['invoiceNumber'] = nativeToJson<String>(invoiceNumber);
    json['issueDate'] = issueDate.toJson();
    json['business'] = business.toJson();
    json['vendor'] = vendor.toJson();
    json['order'] = order.toJson();
    return json;
  }

  GetRecentPaymentByIdRecentPaymentInvoice({
    required this.status,
    required this.invoiceNumber,
    required this.issueDate,
    required this.business,
    required this.vendor,
    required this.order,
  });
}

@immutable
class GetRecentPaymentByIdRecentPaymentInvoiceBusiness {
  final String id;
  final String businessName;
  GetRecentPaymentByIdRecentPaymentInvoiceBusiness.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 GetRecentPaymentByIdRecentPaymentInvoiceBusiness otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoiceBusiness;
    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;
  }

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

@immutable
class GetRecentPaymentByIdRecentPaymentInvoiceVendor {
  final String id;
  final String companyName;
  GetRecentPaymentByIdRecentPaymentInvoiceVendor.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 GetRecentPaymentByIdRecentPaymentInvoiceVendor otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoiceVendor;
    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;
  }

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

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

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if (eventName != null) {
      json['eventName'] = nativeToJson<String?>(eventName);
    }
    return json;
  }

  GetRecentPaymentByIdRecentPaymentInvoiceOrder({
    required this.id,
    this.eventName,
  });
}

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

    final GetRecentPaymentByIdData otherTyped = other as GetRecentPaymentByIdData;
    return recentPayment == otherTyped.recentPayment;
    
  }
  @override
  int get hashCode => recentPayment.hashCode;
  

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

  GetRecentPaymentByIdData({
    this.recentPayment,
  });
}

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

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

