part of 'generated.dart';

class IncrementUnreadForUserVariablesBuilder {
  String conversationId;
  String userId;
  int unreadCount;

  final FirebaseDataConnect _dataConnect;
  IncrementUnreadForUserVariablesBuilder(this._dataConnect, {required  this.conversationId,required  this.userId,required  this.unreadCount,});
  Deserializer<IncrementUnreadForUserData> dataDeserializer = (dynamic json)  => IncrementUnreadForUserData.fromJson(jsonDecode(json));
  Serializer<IncrementUnreadForUserVariables> varsSerializer = (IncrementUnreadForUserVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<IncrementUnreadForUserData, IncrementUnreadForUserVariables>> execute() {
    return ref().execute();
  }

  MutationRef<IncrementUnreadForUserData, IncrementUnreadForUserVariables> ref() {
    IncrementUnreadForUserVariables vars= IncrementUnreadForUserVariables(conversationId: conversationId,userId: userId,unreadCount: unreadCount,);
    return _dataConnect.mutation("incrementUnreadForUser", dataDeserializer, varsSerializer, vars);
  }
}

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

    final IncrementUnreadForUserUserConversationUpdate otherTyped = other as IncrementUnreadForUserUserConversationUpdate;
    return conversationId == otherTyped.conversationId && 
    userId == otherTyped.userId;
    
  }
  @override
  int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]);
  

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

  IncrementUnreadForUserUserConversationUpdate({
    required this.conversationId,
    required this.userId,
  });
}

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

    final IncrementUnreadForUserData otherTyped = other as IncrementUnreadForUserData;
    return userConversation_update == otherTyped.userConversation_update;
    
  }
  @override
  int get hashCode => userConversation_update.hashCode;
  

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

  IncrementUnreadForUserData({
    this.userConversation_update,
  });
}

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

    final IncrementUnreadForUserVariables otherTyped = other as IncrementUnreadForUserVariables;
    return conversationId == otherTyped.conversationId && 
    userId == otherTyped.userId && 
    unreadCount == otherTyped.unreadCount;
    
  }
  @override
  int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode, unreadCount.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['conversationId'] = nativeToJson<String>(conversationId);
    json['userId'] = nativeToJson<String>(userId);
    json['unreadCount'] = nativeToJson<int>(unreadCount);
    return json;
  }

  IncrementUnreadForUserVariables({
    required this.conversationId,
    required this.userId,
    required this.unreadCount,
  });
}

