part of 'generated.dart';

class GetAssignmentByIdVariablesBuilder {
  String id;

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

  QueryRef<GetAssignmentByIdData, GetAssignmentByIdVariables> ref() {
    GetAssignmentByIdVariables vars= GetAssignmentByIdVariables(id: id,);
    return _dataConnect.query("getAssignmentById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetAssignmentByIdAssignment {
  final String id;
  final String? title;
  final String? description;
  final String? instructions;
  final EnumValue<AssignmentStatus>? status;
  final bool? tipsAvailable;
  final bool? travelTime;
  final bool? mealProvided;
  final bool? parkingAvailable;
  final bool? gasCompensation;
  final List<AnyValue>? managers;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  final GetAssignmentByIdAssignmentWorkforce workforce;
  final GetAssignmentByIdAssignmentShiftRole shiftRole;
  GetAssignmentByIdAssignment.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  title = json['title'] == null ? null : nativeFromJson<String>(json['title']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  instructions = json['instructions'] == null ? null : nativeFromJson<String>(json['instructions']),
  status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']),
  tipsAvailable = json['tipsAvailable'] == null ? null : nativeFromJson<bool>(json['tipsAvailable']),
  travelTime = json['travelTime'] == null ? null : nativeFromJson<bool>(json['travelTime']),
  mealProvided = json['mealProvided'] == null ? null : nativeFromJson<bool>(json['mealProvided']),
  parkingAvailable = json['parkingAvailable'] == null ? null : nativeFromJson<bool>(json['parkingAvailable']),
  gasCompensation = json['gasCompensation'] == null ? null : nativeFromJson<bool>(json['gasCompensation']),
  managers = json['managers'] == null ? null : (json['managers'] as List<dynamic>)
        .map((e) => AnyValue.fromJson(e))
        .toList(),
  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']),
  workforce = GetAssignmentByIdAssignmentWorkforce.fromJson(json['workforce']),
  shiftRole = GetAssignmentByIdAssignmentShiftRole.fromJson(json['shiftRole']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetAssignmentByIdAssignment otherTyped = other as GetAssignmentByIdAssignment;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    description == otherTyped.description && 
    instructions == otherTyped.instructions && 
    status == otherTyped.status && 
    tipsAvailable == otherTyped.tipsAvailable && 
    travelTime == otherTyped.travelTime && 
    mealProvided == otherTyped.mealProvided && 
    parkingAvailable == otherTyped.parkingAvailable && 
    gasCompensation == otherTyped.gasCompensation && 
    managers == otherTyped.managers && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    workforce == otherTyped.workforce && 
    shiftRole == otherTyped.shiftRole;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, instructions.hashCode, status.hashCode, tipsAvailable.hashCode, travelTime.hashCode, mealProvided.hashCode, parkingAvailable.hashCode, gasCompensation.hashCode, managers.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, workforce.hashCode, shiftRole.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if (title != null) {
      json['title'] = nativeToJson<String?>(title);
    }
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    if (instructions != null) {
      json['instructions'] = nativeToJson<String?>(instructions);
    }
    if (status != null) {
      json['status'] = 
    assignmentStatusSerializer(status!)
    ;
    }
    if (tipsAvailable != null) {
      json['tipsAvailable'] = nativeToJson<bool?>(tipsAvailable);
    }
    if (travelTime != null) {
      json['travelTime'] = nativeToJson<bool?>(travelTime);
    }
    if (mealProvided != null) {
      json['mealProvided'] = nativeToJson<bool?>(mealProvided);
    }
    if (parkingAvailable != null) {
      json['parkingAvailable'] = nativeToJson<bool?>(parkingAvailable);
    }
    if (gasCompensation != null) {
      json['gasCompensation'] = nativeToJson<bool?>(gasCompensation);
    }
    if (managers != null) {
      json['managers'] = managers?.map((e) => e!.toJson()).toList();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    json['workforce'] = workforce.toJson();
    json['shiftRole'] = shiftRole.toJson();
    return json;
  }

  GetAssignmentByIdAssignment({
    required this.id,
    this.title,
    this.description,
    this.instructions,
    this.status,
    this.tipsAvailable,
    this.travelTime,
    this.mealProvided,
    this.parkingAvailable,
    this.gasCompensation,
    this.managers,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
    required this.workforce,
    required this.shiftRole,
  });
}

@immutable
class GetAssignmentByIdAssignmentWorkforce {
  final String id;
  final String workforceNumber;
  final EnumValue<WorkforceStatus>? status;
  final GetAssignmentByIdAssignmentWorkforceStaff staff;
  GetAssignmentByIdAssignmentWorkforce.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  workforceNumber = nativeFromJson<String>(json['workforceNumber']),
  status = json['status'] == null ? null : workforceStatusDeserializer(json['status']),
  staff = GetAssignmentByIdAssignmentWorkforceStaff.fromJson(json['staff']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  GetAssignmentByIdAssignmentWorkforce({
    required this.id,
    required this.workforceNumber,
    this.status,
    required this.staff,
  });
}

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

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

@immutable
class GetAssignmentByIdAssignmentShiftRole {
  final String id;
  final Timestamp? startTime;
  final Timestamp? endTime;
  final double? hours;
  final double? totalValue;
  final EnumValue<BreakDuration>? breakType;
  final String? uniform;
  final String? department;
  final GetAssignmentByIdAssignmentShiftRoleRole role;
  final GetAssignmentByIdAssignmentShiftRoleShift shift;
  GetAssignmentByIdAssignmentShiftRole.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
  endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
  hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
  totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
  breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']),
  uniform = json['uniform'] == null ? null : nativeFromJson<String>(json['uniform']),
  department = json['department'] == null ? null : nativeFromJson<String>(json['department']),
  role = GetAssignmentByIdAssignmentShiftRoleRole.fromJson(json['role']),
  shift = GetAssignmentByIdAssignmentShiftRoleShift.fromJson(json['shift']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  GetAssignmentByIdAssignmentShiftRole({
    required this.id,
    this.startTime,
    this.endTime,
    this.hours,
    this.totalValue,
    this.breakType,
    this.uniform,
    this.department,
    required this.role,
    required this.shift,
  });
}

@immutable
class GetAssignmentByIdAssignmentShiftRoleRole {
  final String id;
  final String name;
  final double costPerHour;
  GetAssignmentByIdAssignmentShiftRoleRole.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  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 GetAssignmentByIdAssignmentShiftRoleRole otherTyped = other as GetAssignmentByIdAssignmentShiftRoleRole;
    return id == otherTyped.id && 
    name == otherTyped.name && 
    costPerHour == otherTyped.costPerHour;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]);
  

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

  GetAssignmentByIdAssignmentShiftRoleRole({
    required this.id,
    required this.name,
    required this.costPerHour,
  });
}

@immutable
class GetAssignmentByIdAssignmentShiftRoleShift {
  final String id;
  final String title;
  final Timestamp? date;
  final String? location;
  final String? locationAddress;
  final double? latitude;
  final double? longitude;
  final EnumValue<ShiftStatus>? status;
  final List<AnyValue>? managers;
  final GetAssignmentByIdAssignmentShiftRoleShiftOrder order;
  GetAssignmentByIdAssignmentShiftRoleShift.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  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']),
  latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
  longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
  status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
  managers = json['managers'] == null ? null : (json['managers'] as List<dynamic>)
        .map((e) => AnyValue.fromJson(e))
        .toList(),
  order = GetAssignmentByIdAssignmentShiftRoleShiftOrder.fromJson(json['order']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetAssignmentByIdAssignmentShiftRoleShift otherTyped = other as GetAssignmentByIdAssignmentShiftRoleShift;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    date == otherTyped.date && 
    location == otherTyped.location && 
    locationAddress == otherTyped.locationAddress && 
    latitude == otherTyped.latitude && 
    longitude == otherTyped.longitude && 
    status == otherTyped.status && 
    managers == otherTyped.managers && 
    order == otherTyped.order;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, status.hashCode, managers.hashCode, order.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    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 (latitude != null) {
      json['latitude'] = nativeToJson<double?>(latitude);
    }
    if (longitude != null) {
      json['longitude'] = nativeToJson<double?>(longitude);
    }
    if (status != null) {
      json['status'] = 
    shiftStatusSerializer(status!)
    ;
    }
    if (managers != null) {
      json['managers'] = managers?.map((e) => e!.toJson()).toList();
    }
    json['order'] = order.toJson();
    return json;
  }

  GetAssignmentByIdAssignmentShiftRoleShift({
    required this.id,
    required this.title,
    this.date,
    this.location,
    this.locationAddress,
    this.latitude,
    this.longitude,
    this.status,
    this.managers,
    required this.order,
  });
}

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

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

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

  GetAssignmentByIdAssignmentShiftRoleShiftOrder({
    required this.id,
    this.eventName,
    required this.orderType,
    required this.business,
    this.vendor,
  });
}

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

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

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

  GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness({
    required this.id,
    required this.businessName,
    this.email,
    this.contactName,
  });
}

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

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

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

    final GetAssignmentByIdData otherTyped = other as GetAssignmentByIdData;
    return assignment == otherTyped.assignment;
    
  }
  @override
  int get hashCode => assignment.hashCode;
  

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

  GetAssignmentByIdData({
    this.assignment,
  });
}

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

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

