part of 'generated.dart';

class ListAssignmentsByWorkforceIdsVariablesBuilder {
  List<String> workforceIds;
  Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);

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

  ListAssignmentsByWorkforceIdsVariablesBuilder(this._dataConnect, {required  this.workforceIds,});
  Deserializer<ListAssignmentsByWorkforceIdsData> dataDeserializer = (dynamic json)  => ListAssignmentsByWorkforceIdsData.fromJson(jsonDecode(json));
  Serializer<ListAssignmentsByWorkforceIdsVariables> varsSerializer = (ListAssignmentsByWorkforceIdsVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables> ref() {
    ListAssignmentsByWorkforceIdsVariables vars= ListAssignmentsByWorkforceIdsVariables(workforceIds: workforceIds,offset: _offset,limit: _limit,);
    return _dataConnect.query("listAssignmentsByWorkforceIds", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListAssignmentsByWorkforceIdsAssignments {
  final String id;
  final String? title;
  final EnumValue<AssignmentStatus>? status;
  final Timestamp? createdAt;
  final ListAssignmentsByWorkforceIdsAssignmentsWorkforce workforce;
  final ListAssignmentsByWorkforceIdsAssignmentsShiftRole shiftRole;
  ListAssignmentsByWorkforceIdsAssignments.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  title = json['title'] == null ? null : nativeFromJson<String>(json['title']),
  status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  workforce = ListAssignmentsByWorkforceIdsAssignmentsWorkforce.fromJson(json['workforce']),
  shiftRole = ListAssignmentsByWorkforceIdsAssignmentsShiftRole.fromJson(json['shiftRole']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListAssignmentsByWorkforceIdsAssignments otherTyped = other as ListAssignmentsByWorkforceIdsAssignments;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    status == otherTyped.status && 
    createdAt == otherTyped.createdAt && 
    workforce == otherTyped.workforce && 
    shiftRole == otherTyped.shiftRole;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.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 (status != null) {
      json['status'] = 
    assignmentStatusSerializer(status!)
    ;
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['workforce'] = workforce.toJson();
    json['shiftRole'] = shiftRole.toJson();
    return json;
  }

  ListAssignmentsByWorkforceIdsAssignments({
    required this.id,
    this.title,
    this.status,
    this.createdAt,
    required this.workforce,
    required this.shiftRole,
  });
}

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

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

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

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

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

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

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

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

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

  ListAssignmentsByWorkforceIdsAssignmentsShiftRole({
    required this.id,
    required this.role,
    required this.shift,
  });
}

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

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

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

  ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole({
    required this.id,
    required this.name,
  });
}

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

    final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift;
    return id == otherTyped.id && 
    title == otherTyped.title && 
    date == otherTyped.date && 
    order == otherTyped.order;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.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();
    }
    json['order'] = order.toJson();
    return json;
  }

  ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift({
    required this.id,
    required this.title,
    this.date,
    required this.order,
  });
}

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

    final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder;
    return id == otherTyped.id && 
    eventName == otherTyped.eventName && 
    business == otherTyped.business && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, eventName.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['business'] = business.toJson();
    if (vendor != null) {
      json['vendor'] = vendor!.toJson();
    }
    return json;
  }

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

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

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

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

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

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

    final ListAssignmentsByWorkforceIdsData otherTyped = other as ListAssignmentsByWorkforceIdsData;
    return assignments == otherTyped.assignments;
    
  }
  @override
  int get hashCode => assignments.hashCode;
  

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

  ListAssignmentsByWorkforceIdsData({
    required this.assignments,
  });
}

@immutable
class ListAssignmentsByWorkforceIdsVariables {
  final List<String> workforceIds;
  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.')
  ListAssignmentsByWorkforceIdsVariables.fromJson(Map<String, dynamic> json):
  
  workforceIds = (json['workforceIds'] as List<dynamic>)
        .map((e) => nativeFromJson<String>(e))
        .toList() {
  
  
  
    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 ListAssignmentsByWorkforceIdsVariables otherTyped = other as ListAssignmentsByWorkforceIdsVariables;
    return workforceIds == otherTyped.workforceIds && 
    offset == otherTyped.offset && 
    limit == otherTyped.limit;
    
  }
  @override
  int get hashCode => Object.hashAll([workforceIds.hashCode, offset.hashCode, limit.hashCode]);
  

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

  ListAssignmentsByWorkforceIdsVariables({
    required this.workforceIds,
    required this.offset,
    required this.limit,
  });
}

