part of 'generated.dart';

class UpdateTaskCommentVariablesBuilder {
  String id;
  Optional<String> _comment = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isSystem = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateTaskCommentVariablesBuilder comment(String? t) {
   _comment.value = t;
   return this;
  }
  UpdateTaskCommentVariablesBuilder isSystem(bool? t) {
   _isSystem.value = t;
   return this;
  }

  UpdateTaskCommentVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<UpdateTaskCommentData> dataDeserializer = (dynamic json)  => UpdateTaskCommentData.fromJson(jsonDecode(json));
  Serializer<UpdateTaskCommentVariables> varsSerializer = (UpdateTaskCommentVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<UpdateTaskCommentData, UpdateTaskCommentVariables>> execute() {
    return ref().execute();
  }

  MutationRef<UpdateTaskCommentData, UpdateTaskCommentVariables> ref() {
    UpdateTaskCommentVariables vars= UpdateTaskCommentVariables(id: id,comment: _comment,isSystem: _isSystem,);
    return _dataConnect.mutation("updateTaskComment", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final UpdateTaskCommentData otherTyped = other as UpdateTaskCommentData;
    return taskComment_update == otherTyped.taskComment_update;
    
  }
  @override
  int get hashCode => taskComment_update.hashCode;
  

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

  UpdateTaskCommentData({
    this.taskComment_update,
  });
}

@immutable
class UpdateTaskCommentVariables {
  final String id;
  late final Optional<String>comment;
  late final Optional<bool>isSystem;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateTaskCommentVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    comment = Optional.optional(nativeFromJson, nativeToJson);
    comment.value = json['comment'] == null ? null : nativeFromJson<String>(json['comment']);
  
  
    isSystem = Optional.optional(nativeFromJson, nativeToJson);
    isSystem.value = json['isSystem'] == null ? null : nativeFromJson<bool>(json['isSystem']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

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

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(comment.state == OptionalState.set) {
      json['comment'] = comment.toJson();
    }
    if(isSystem.state == OptionalState.set) {
      json['isSystem'] = isSystem.toJson();
    }
    return json;
  }

  UpdateTaskCommentVariables({
    required this.id,
    required this.comment,
    required this.isSystem,
  });
}

