part of 'generated.dart';

class DeleteHubVariablesBuilder {
  String id;

  final FirebaseDataConnect _dataConnect;
  DeleteHubVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<DeleteHubData> dataDeserializer = (dynamic json)  => DeleteHubData.fromJson(jsonDecode(json));
  Serializer<DeleteHubVariables> varsSerializer = (DeleteHubVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<DeleteHubData, DeleteHubVariables>> execute() {
    return ref().execute();
  }

  MutationRef<DeleteHubData, DeleteHubVariables> ref() {
    DeleteHubVariables vars= DeleteHubVariables(id: id,);
    return _dataConnect.mutation("deleteHub", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final DeleteHubData otherTyped = other as DeleteHubData;
    return hub_delete == otherTyped.hub_delete;
    
  }
  @override
  int get hashCode => hub_delete.hashCode;
  

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

  DeleteHubData({
    this.hub_delete,
  });
}

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

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

