part of 'generated.dart';

class DeleteInvoiceVariablesBuilder {
  String id;

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

  MutationRef<DeleteInvoiceData, DeleteInvoiceVariables> ref() {
    DeleteInvoiceVariables vars= DeleteInvoiceVariables(id: id,);
    return _dataConnect.mutation("deleteInvoice", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final DeleteInvoiceData otherTyped = other as DeleteInvoiceData;
    return invoice_delete == otherTyped.invoice_delete;
    
  }
  @override
  int get hashCode => invoice_delete.hashCode;
  

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

  DeleteInvoiceData({
    this.invoice_delete,
  });
}

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

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

