part of 'generated.dart';

class GetShiftRoleByIdVariablesBuilder {
  String shiftId;
  String roleId;

  final FirebaseDataConnect _dataConnect;
  GetShiftRoleByIdVariablesBuilder(this._dataConnect, {required  this.shiftId,required  this.roleId,});
  Deserializer<GetShiftRoleByIdData> dataDeserializer = (dynamic json)  => GetShiftRoleByIdData.fromJson(jsonDecode(json));
  Serializer<GetShiftRoleByIdVariables> varsSerializer = (GetShiftRoleByIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetShiftRoleByIdData, GetShiftRoleByIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetShiftRoleByIdData, GetShiftRoleByIdVariables> ref() {
    GetShiftRoleByIdVariables vars= GetShiftRoleByIdVariables(shiftId: shiftId,roleId: roleId,);
    return _dataConnect.query("getShiftRoleById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetShiftRoleByIdShiftRole {
  final String id;
  final String shiftId;
  final String roleId;
  final int count;
  final int? assigned;
  final Timestamp? startTime;
  final Timestamp? endTime;
  final double? hours;
  final String? department;
  final String? uniform;
  final EnumValue<BreakDuration>? breakType;
  final double? totalValue;
  final Timestamp? createdAt;
  final GetShiftRoleByIdShiftRoleRole role;
  final GetShiftRoleByIdShiftRoleShift shift;
  GetShiftRoleByIdShiftRole.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  shiftId = nativeFromJson<String>(json['shiftId']),
  roleId = nativeFromJson<String>(json['roleId']),
  count = nativeFromJson<int>(json['count']),
  assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
  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']),
  department = json['department'] == null ? null : nativeFromJson<String>(json['department']),
  uniform = json['uniform'] == null ? null : nativeFromJson<String>(json['uniform']),
  breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']),
  totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  role = GetShiftRoleByIdShiftRoleRole.fromJson(json['role']),
  shift = GetShiftRoleByIdShiftRoleShift.fromJson(json['shift']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  GetShiftRoleByIdShiftRole({
    required this.id,
    required this.shiftId,
    required this.roleId,
    required this.count,
    this.assigned,
    this.startTime,
    this.endTime,
    this.hours,
    this.department,
    this.uniform,
    this.breakType,
    this.totalValue,
    this.createdAt,
    required this.role,
    required this.shift,
  });
}

@immutable
class GetShiftRoleByIdShiftRoleRole {
  final String id;
  final String name;
  final double costPerHour;
  GetShiftRoleByIdShiftRoleRole.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 GetShiftRoleByIdShiftRoleRole otherTyped = other as GetShiftRoleByIdShiftRoleRole;
    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;
  }

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

@immutable
class GetShiftRoleByIdShiftRoleShift {
  final String? location;
  final String? locationAddress;
  final String? description;
  final String orderId;
  final GetShiftRoleByIdShiftRoleShiftOrder order;
  GetShiftRoleByIdShiftRoleShift.fromJson(dynamic json):
  
  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']),
  orderId = nativeFromJson<String>(json['orderId']),
  order = GetShiftRoleByIdShiftRoleShiftOrder.fromJson(json['order']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

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

  GetShiftRoleByIdShiftRoleShift({
    this.location,
    this.locationAddress,
    this.description,
    required this.orderId,
    required this.order,
  });
}

@immutable
class GetShiftRoleByIdShiftRoleShiftOrder {
  final AnyValue? recurringDays;
  final AnyValue? permanentDays;
  final String? notes;
  final GetShiftRoleByIdShiftRoleShiftOrderBusiness business;
  final GetShiftRoleByIdShiftRoleShiftOrderVendor? vendor;
  GetShiftRoleByIdShiftRoleShiftOrder.fromJson(dynamic json):
  
  recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
  permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
  notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
  business = GetShiftRoleByIdShiftRoleShiftOrderBusiness.fromJson(json['business']),
  vendor = json['vendor'] == null ? null : GetShiftRoleByIdShiftRoleShiftOrderVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetShiftRoleByIdShiftRoleShiftOrder otherTyped = other as GetShiftRoleByIdShiftRoleShiftOrder;
    return recurringDays == otherTyped.recurringDays && 
    permanentDays == otherTyped.permanentDays && 
    notes == otherTyped.notes && 
    business == otherTyped.business && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (recurringDays != null) {
      json['recurringDays'] = recurringDays!.toJson();
    }
    if (permanentDays != null) {
      json['permanentDays'] = permanentDays!.toJson();
    }
    if (notes != null) {
      json['notes'] = nativeToJson<String?>(notes);
    }
    json['business'] = business.toJson();
    if (vendor != null) {
      json['vendor'] = vendor!.toJson();
    }
    return json;
  }

  GetShiftRoleByIdShiftRoleShiftOrder({
    this.recurringDays,
    this.permanentDays,
    this.notes,
    required this.business,
    this.vendor,
  });
}

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

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

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

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

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

    final GetShiftRoleByIdData otherTyped = other as GetShiftRoleByIdData;
    return shiftRole == otherTyped.shiftRole;
    
  }
  @override
  int get hashCode => shiftRole.hashCode;
  

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

  GetShiftRoleByIdData({
    this.shiftRole,
  });
}

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

    final GetShiftRoleByIdVariables otherTyped = other as GetShiftRoleByIdVariables;
    return shiftId == otherTyped.shiftId && 
    roleId == otherTyped.roleId;
    
  }
  @override
  int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]);
  

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

  GetShiftRoleByIdVariables({
    required this.shiftId,
    required this.roleId,
  });
}

