part of 'generated.dart';

class GetWorkforceByVendorAndStaffVariablesBuilder {
  String vendorId;
  String staffId;

  final FirebaseDataConnect _dataConnect;
  GetWorkforceByVendorAndStaffVariablesBuilder(this._dataConnect, {required  this.vendorId,required  this.staffId,});
  Deserializer<GetWorkforceByVendorAndStaffData> dataDeserializer = (dynamic json)  => GetWorkforceByVendorAndStaffData.fromJson(jsonDecode(json));
  Serializer<GetWorkforceByVendorAndStaffVariables> varsSerializer = (GetWorkforceByVendorAndStaffVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables> ref() {
    GetWorkforceByVendorAndStaffVariables vars= GetWorkforceByVendorAndStaffVariables(vendorId: vendorId,staffId: staffId,);
    return _dataConnect.query("getWorkforceByVendorAndStaff", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetWorkforceByVendorAndStaffWorkforces {
  final String id;
  final String vendorId;
  final String staffId;
  final String workforceNumber;
  final EnumValue<WorkforceEmploymentType>? employmentType;
  final EnumValue<WorkforceStatus>? status;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final GetWorkforceByVendorAndStaffWorkforcesStaff staff;
  final GetWorkforceByVendorAndStaffWorkforcesVendor vendor;
  GetWorkforceByVendorAndStaffWorkforces.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  vendorId = nativeFromJson<String>(json['vendorId']),
  staffId = nativeFromJson<String>(json['staffId']),
  workforceNumber = nativeFromJson<String>(json['workforceNumber']),
  employmentType = json['employmentType'] == null ? null : workforceEmploymentTypeDeserializer(json['employmentType']),
  status = json['status'] == null ? null : workforceStatusDeserializer(json['status']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  staff = GetWorkforceByVendorAndStaffWorkforcesStaff.fromJson(json['staff']),
  vendor = GetWorkforceByVendorAndStaffWorkforcesVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetWorkforceByVendorAndStaffWorkforces otherTyped = other as GetWorkforceByVendorAndStaffWorkforces;
    return id == otherTyped.id && 
    vendorId == otherTyped.vendorId && 
    staffId == otherTyped.staffId && 
    workforceNumber == otherTyped.workforceNumber && 
    employmentType == otherTyped.employmentType && 
    status == otherTyped.status && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    staff == otherTyped.staff && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, staffId.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode, createdAt.hashCode, updatedAt.hashCode, staff.hashCode, vendor.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['vendorId'] = nativeToJson<String>(vendorId);
    json['staffId'] = nativeToJson<String>(staffId);
    json['workforceNumber'] = nativeToJson<String>(workforceNumber);
    if (employmentType != null) {
      json['employmentType'] = 
    workforceEmploymentTypeSerializer(employmentType!)
    ;
    }
    if (status != null) {
      json['status'] = 
    workforceStatusSerializer(status!)
    ;
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    json['staff'] = staff.toJson();
    json['vendor'] = vendor.toJson();
    return json;
  }

  GetWorkforceByVendorAndStaffWorkforces({
    required this.id,
    required this.vendorId,
    required this.staffId,
    required this.workforceNumber,
    this.employmentType,
    this.status,
    this.createdAt,
    this.updatedAt,
    required this.staff,
    required this.vendor,
  });
}

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

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

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

  GetWorkforceByVendorAndStaffWorkforcesStaff({
    required this.id,
    required this.fullName,
  });
}

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

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

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

    final GetWorkforceByVendorAndStaffData otherTyped = other as GetWorkforceByVendorAndStaffData;
    return workforces == otherTyped.workforces;
    
  }
  @override
  int get hashCode => workforces.hashCode;
  

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

  GetWorkforceByVendorAndStaffData({
    required this.workforces,
  });
}

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

    final GetWorkforceByVendorAndStaffVariables otherTyped = other as GetWorkforceByVendorAndStaffVariables;
    return vendorId == otherTyped.vendorId && 
    staffId == otherTyped.staffId;
    
  }
  @override
  int get hashCode => Object.hashAll([vendorId.hashCode, staffId.hashCode]);
  

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

  GetWorkforceByVendorAndStaffVariables({
    required this.vendorId,
    required this.staffId,
  });
}

