part of 'generated.dart';

class GetVendorBenefitPlanByIdVariablesBuilder {
  String id;

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

  QueryRef<GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables> ref() {
    GetVendorBenefitPlanByIdVariables vars= GetVendorBenefitPlanByIdVariables(id: id,);
    return _dataConnect.query("getVendorBenefitPlanById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetVendorBenefitPlanByIdVendorBenefitPlan {
  final String id;
  final String vendorId;
  final String title;
  final String? description;
  final String? requestLabel;
  final int? total;
  final bool? isActive;
  final Timestamp? createdAt;
  final Timestamp? updatedAt;
  final String? createdBy;
  final GetVendorBenefitPlanByIdVendorBenefitPlanVendor vendor;
  GetVendorBenefitPlanByIdVendorBenefitPlan.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  vendorId = nativeFromJson<String>(json['vendorId']),
  title = nativeFromJson<String>(json['title']),
  description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
  requestLabel = json['requestLabel'] == null ? null : nativeFromJson<String>(json['requestLabel']),
  total = json['total'] == null ? null : nativeFromJson<int>(json['total']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']),
  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']),
  vendor = GetVendorBenefitPlanByIdVendorBenefitPlanVendor.fromJson(json['vendor']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetVendorBenefitPlanByIdVendorBenefitPlan otherTyped = other as GetVendorBenefitPlanByIdVendorBenefitPlan;
    return id == otherTyped.id && 
    vendorId == otherTyped.vendorId && 
    title == otherTyped.title && 
    description == otherTyped.description && 
    requestLabel == otherTyped.requestLabel && 
    total == otherTyped.total && 
    isActive == otherTyped.isActive && 
    createdAt == otherTyped.createdAt && 
    updatedAt == otherTyped.updatedAt && 
    createdBy == otherTyped.createdBy && 
    vendor == otherTyped.vendor;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['vendorId'] = nativeToJson<String>(vendorId);
    json['title'] = nativeToJson<String>(title);
    if (description != null) {
      json['description'] = nativeToJson<String?>(description);
    }
    if (requestLabel != null) {
      json['requestLabel'] = nativeToJson<String?>(requestLabel);
    }
    if (total != null) {
      json['total'] = nativeToJson<int?>(total);
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    if (updatedAt != null) {
      json['updatedAt'] = updatedAt!.toJson();
    }
    if (createdBy != null) {
      json['createdBy'] = nativeToJson<String?>(createdBy);
    }
    json['vendor'] = vendor.toJson();
    return json;
  }

  GetVendorBenefitPlanByIdVendorBenefitPlan({
    required this.id,
    required this.vendorId,
    required this.title,
    this.description,
    this.requestLabel,
    this.total,
    this.isActive,
    this.createdAt,
    this.updatedAt,
    this.createdBy,
    required this.vendor,
  });
}

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

    final GetVendorBenefitPlanByIdVendorBenefitPlanVendor otherTyped = other as GetVendorBenefitPlanByIdVendorBenefitPlanVendor;
    return companyName == otherTyped.companyName;
    
  }
  @override
  int get hashCode => companyName.hashCode;
  

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

  GetVendorBenefitPlanByIdVendorBenefitPlanVendor({
    required this.companyName,
  });
}

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

    final GetVendorBenefitPlanByIdData otherTyped = other as GetVendorBenefitPlanByIdData;
    return vendorBenefitPlan == otherTyped.vendorBenefitPlan;
    
  }
  @override
  int get hashCode => vendorBenefitPlan.hashCode;
  

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

  GetVendorBenefitPlanByIdData({
    this.vendorBenefitPlan,
  });
}

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

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

