part of 'generated.dart';

class GetTaxFormByIdVariablesBuilder {
  String id;

  final FirebaseDataConnect _dataConnect;
  GetTaxFormByIdVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<GetTaxFormByIdData> dataDeserializer = (dynamic json)  => GetTaxFormByIdData.fromJson(jsonDecode(json));
  Serializer<GetTaxFormByIdVariables> varsSerializer = (GetTaxFormByIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTaxFormByIdData, GetTaxFormByIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTaxFormByIdData, GetTaxFormByIdVariables> ref() {
    GetTaxFormByIdVariables vars= GetTaxFormByIdVariables(id: id,);
    return _dataConnect.query("getTaxFormById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTaxFormByIdTaxForm {
  final String id;
  final EnumValue<TaxFormType> formType;
  final String title;
  final String? subtitle;
  final String? description;
  final EnumValue<TaxFormStatus> status;
  final String staffId;
  final AnyValue? formData;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  GetTaxFormByIdTaxForm.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  formType = taxFormTypeDeserializer(json['formType']),
  title = nativeFromJson<String>(json['title']),
  subtitle = json['subtitle'] == null ? null : nativeFromJson<String>(json['subtitle']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  status = taxFormStatusDeserializer(json['status']),
  staffId = nativeFromJson<String>(json['staffId']),
  formData = json['formData'] == null ? null : AnyValue.fromJson(json['formData']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
  createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTaxFormByIdTaxForm otherTyped = other as GetTaxFormByIdTaxForm;
    return id == otherTyped.id && 
    formType == otherTyped.formType && 
    title == otherTyped.title && 
    subtitle == otherTyped.subtitle && 
    description == otherTyped.description && 
    status == otherTyped.status && 
    staffId == otherTyped.staffId && 
    formData == otherTyped.formData && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['formType'] = 
    taxFormTypeSerializer(formType)
    ;
    json['title'] = nativeToJson<String>(title);
    if (subtitle != null) {
      json['subtitle'] = nativeToJson<String?>(subtitle);
    }
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    json['status'] = 
    taxFormStatusSerializer(status)
    ;
    json['staffId'] = nativeToJson<String>(staffId);
    if (formData != null) {
      json['formData'] = formData!.toJson();
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    return json;
  }

  GetTaxFormByIdTaxForm({
    required this.id,
    required this.formType,
    required this.title,
    this.subtitle,
    this.description,
    required this.status,
    required this.staffId,
    this.formData,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
  });
}

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

    final GetTaxFormByIdData otherTyped = other as GetTaxFormByIdData;
    return taxForm == otherTyped.taxForm;
    
  }
  @override
  int get hashCode => taxForm.hashCode;
  

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

  GetTaxFormByIdData({
    this.taxForm,
  });
}

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

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

