part of 'generated.dart';

class ListShiftRolesByVendorIdVariablesBuilder {
  String vendorId;
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  ListShiftRolesByVendorIdVariablesBuilder offset(int? t) {
   _offset.value = t;
   return this;
  }
  ListShiftRolesByVendorIdVariablesBuilder limit(int? t) {
   _limit.value = t;
   return this;
  }

  ListShiftRolesByVendorIdVariablesBuilder(this._dataConnect, {required  this.vendorId,});
  Deserializer<ListShiftRolesByVendorIdData> dataDeserializer = (dynamic json)  => ListShiftRolesByVendorIdData.fromJson(jsonDecode(json));
  Serializer<ListShiftRolesByVendorIdVariables> varsSerializer = (ListShiftRolesByVendorIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables> ref() {
    ListShiftRolesByVendorIdVariables vars= ListShiftRolesByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,);
    return _dataConnect.query("listShiftRolesByVendorId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListShiftRolesByVendorIdShiftRoles {
  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 ListShiftRolesByVendorIdShiftRolesRole role;
  final ListShiftRolesByVendorIdShiftRolesShift shift;
  ListShiftRolesByVendorIdShiftRoles.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 = ListShiftRolesByVendorIdShiftRolesRole.fromJson(json['role']),
  shift = ListShiftRolesByVendorIdShiftRolesShift.fromJson(json['shift']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListShiftRolesByVendorIdShiftRoles otherTyped = other as ListShiftRolesByVendorIdShiftRoles;
    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;
  }

  ListShiftRolesByVendorIdShiftRoles({
    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 ListShiftRolesByVendorIdShiftRolesRole {
  final String id;
  final String name;
  final double costPerHour;
  ListShiftRolesByVendorIdShiftRolesRole.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 ListShiftRolesByVendorIdShiftRolesRole otherTyped = other as ListShiftRolesByVendorIdShiftRolesRole;
    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;
  }

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

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

    final ListShiftRolesByVendorIdShiftRolesShift otherTyped = other as ListShiftRolesByVendorIdShiftRolesShift;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    date == otherTyped.date && 
    location == otherTyped.location && 
    locationAddress == otherTyped.locationAddress && 
    description == otherTyped.description && 
    orderId == otherTyped.orderId && 
    order == otherTyped.order;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode, orderId.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 (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    json['orderId'] = nativeToJson<String>(orderId);
    json['order'] = order.toJson();
    return json;
  }

  ListShiftRolesByVendorIdShiftRolesShift({
    required this.id,
    required this.title,
    this.date,
    this.location,
    this.locationAddress,
    this.description,
    required this.orderId,
    required this.order,
  });
}

@immutable
class ListShiftRolesByVendorIdShiftRolesShiftOrder {
  final String id;
  final String? eventName;
  final String? vendorId;
  final String businessId;
  final EnumValue<OrderType> orderType;
  final EnumValue<OrderStatus> status;
  final Timestamp? date;
  final AnyValue? recurringDays;
  final AnyValue? permanentDays;
  final String? notes;
  final ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness business;
  final ListShiftRolesByVendorIdShiftRolesShiftOrderVendor? vendor;
  ListShiftRolesByVendorIdShiftRolesShiftOrder.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
  vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
  businessId = nativeFromJson<String>(json['businessId']),
  orderType = orderTypeDeserializer(json['orderType']),
  status = orderStatusDeserializer(json['status']),
  date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
  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 = ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness.fromJson(json['business']),
  vendor = json['vendor'] == null ? null : ListShiftRolesByVendorIdShiftRolesShiftOrderVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListShiftRolesByVendorIdShiftRolesShiftOrder otherTyped = other as ListShiftRolesByVendorIdShiftRolesShiftOrder;
    return id == otherTyped.id && 
    eventName == otherTyped.eventName && 
    vendorId == otherTyped.vendorId && 
    businessId == otherTyped.businessId && 
    orderType == otherTyped.orderType && 
    status == otherTyped.status && 
    date == otherTyped.date && 
    recurringDays == otherTyped.recurringDays && 
    permanentDays == otherTyped.permanentDays && 
    notes == otherTyped.notes && 
    business == otherTyped.business && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.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);
    }
    if (vendorId != null) {
      json['vendorId'] = nativeToJson<String?>(vendorId);
    }
    json['businessId'] = nativeToJson<String>(businessId);
    json['orderType'] = 
    orderTypeSerializer(orderType)
    ;
    json['status'] = 
    orderStatusSerializer(status)
    ;
    if (date != null) {
      json['date'] = date!.toJson();
    }
    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;
  }

  ListShiftRolesByVendorIdShiftRolesShiftOrder({
    required this.id,
    this.eventName,
    this.vendorId,
    required this.businessId,
    required this.orderType,
    required this.status,
    this.date,
    this.recurringDays,
    this.permanentDays,
    this.notes,
    required this.business,
    this.vendor,
  });
}

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

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

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

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

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

    final ListShiftRolesByVendorIdData otherTyped = other as ListShiftRolesByVendorIdData;
    return shiftRoles == otherTyped.shiftRoles;
    
  }
  @override
  int get hashCode => shiftRoles.hashCode;
  

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

  ListShiftRolesByVendorIdData({
    required this.shiftRoles,
  });
}

@immutable
class ListShiftRolesByVendorIdVariables {
  final String vendorId;
  late final Optional<int>offset;
  late final Optional<int>limit;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  ListShiftRolesByVendorIdVariables.fromJson(Map<String, dynamic> json):
  
  vendorId = nativeFromJson<String>(json['vendorId']) {
  
  
  
    offset = Optional.optional(nativeFromJson, nativeToJson);
    offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
  
  
    limit = Optional.optional(nativeFromJson, nativeToJson);
    limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['vendorId'] = nativeToJson<String>(vendorId);
    if(offset.state == OptionalState.set) {
      json['offset'] = offset.toJson();
    }
    if(limit.state == OptionalState.set) {
      json['limit'] = limit.toJson();
    }
    return json;
  }

  ListShiftRolesByVendorIdVariables({
    required this.vendorId,
    required this.offset,
    required this.limit,
  });
}

