part of 'generated.dart';

class ListRolesByroleCategoryIdVariablesBuilder {
  String roleCategoryId;

  final FirebaseDataConnect _dataConnect;
  ListRolesByroleCategoryIdVariablesBuilder(this._dataConnect, {required  this.roleCategoryId,});
  Deserializer<ListRolesByroleCategoryIdData> dataDeserializer = (dynamic json)  => ListRolesByroleCategoryIdData.fromJson(jsonDecode(json));
  Serializer<ListRolesByroleCategoryIdVariables> varsSerializer = (ListRolesByroleCategoryIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables> ref() {
    ListRolesByroleCategoryIdVariables vars= ListRolesByroleCategoryIdVariables(roleCategoryId: roleCategoryId,);
    return _dataConnect.query("listRolesByroleCategoryId", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class ListRolesByroleCategoryIdRoles {
  final String id;
  final String name;
  final double costPerHour;
  final String vendorId;
  final String roleCategoryId;
  final Timestamp? createdAt;
  ListRolesByroleCategoryIdRoles.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  name = nativeFromJson<String>(json['name']),
  costPerHour = nativeFromJson<double>(json['costPerHour']),
  vendorId = nativeFromJson<String>(json['vendorId']),
  roleCategoryId = nativeFromJson<String>(json['roleCategoryId']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['name'] = nativeToJson<String>(name);
    json['costPerHour'] = nativeToJson<double>(costPerHour);
    json['vendorId'] = nativeToJson<String>(vendorId);
    json['roleCategoryId'] = nativeToJson<String>(roleCategoryId);
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    return json;
  }

  ListRolesByroleCategoryIdRoles({
    required this.id,
    required this.name,
    required this.costPerHour,
    required this.vendorId,
    required this.roleCategoryId,
    this.createdAt,
  });
}

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

    final ListRolesByroleCategoryIdData otherTyped = other as ListRolesByroleCategoryIdData;
    return roles == otherTyped.roles;
    
  }
  @override
  int get hashCode => roles.hashCode;
  

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

  ListRolesByroleCategoryIdData({
    required this.roles,
  });
}

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

    final ListRolesByroleCategoryIdVariables otherTyped = other as ListRolesByroleCategoryIdVariables;
    return roleCategoryId == otherTyped.roleCategoryId;
    
  }
  @override
  int get hashCode => roleCategoryId.hashCode;
  

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

  ListRolesByroleCategoryIdVariables({
    required this.roleCategoryId,
  });
}

