part of 'generated.dart';

class UpdateVendorBenefitPlanVariablesBuilder {
  String id;
  Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _title = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _requestLabel = Optional.optional(nativeFromJson, nativeToJson);
  Optional<int> _total = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _createdBy = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateVendorBenefitPlanVariablesBuilder vendorId(String? t) {
   _vendorId.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder title(String? t) {
   _title.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder description(String? t) {
   _description.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder requestLabel(String? t) {
   _requestLabel.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder total(int? t) {
   _total.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder isActive(bool? t) {
   _isActive.value = t;
   return this;
  }
  UpdateVendorBenefitPlanVariablesBuilder createdBy(String? t) {
   _createdBy.value = t;
   return this;
  }

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

  MutationRef<UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables> ref() {
    UpdateVendorBenefitPlanVariables vars= UpdateVendorBenefitPlanVariables(id: id,vendorId: _vendorId,title: _title,description: _description,requestLabel: _requestLabel,total: _total,isActive: _isActive,createdBy: _createdBy,);
    return _dataConnect.mutation("updateVendorBenefitPlan", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final UpdateVendorBenefitPlanData otherTyped = other as UpdateVendorBenefitPlanData;
    return vendorBenefitPlan_update == otherTyped.vendorBenefitPlan_update;
    
  }
  @override
  int get hashCode => vendorBenefitPlan_update.hashCode;
  

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

  UpdateVendorBenefitPlanData({
    this.vendorBenefitPlan_update,
  });
}

@immutable
class UpdateVendorBenefitPlanVariables {
  final String id;
  late final Optional<String>vendorId;
  late final Optional<String>title;
  late final Optional<String>description;
  late final Optional<String>requestLabel;
  late final Optional<int>total;
  late final Optional<bool>isActive;
  late final Optional<String>createdBy;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateVendorBenefitPlanVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    vendorId = Optional.optional(nativeFromJson, nativeToJson);
    vendorId.value = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']);
  
  
    title = Optional.optional(nativeFromJson, nativeToJson);
    title.value = json['title'] == null ? null : nativeFromJson<String>(json['title']);
  
  
    description = Optional.optional(nativeFromJson, nativeToJson);
    description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
  
  
    requestLabel = Optional.optional(nativeFromJson, nativeToJson);
    requestLabel.value = json['requestLabel'] == null ? null : nativeFromJson<String>(json['requestLabel']);
  
  
    total = Optional.optional(nativeFromJson, nativeToJson);
    total.value = json['total'] == null ? null : nativeFromJson<int>(json['total']);
  
  
    isActive = Optional.optional(nativeFromJson, nativeToJson);
    isActive.value = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']);
  
  
    createdBy = Optional.optional(nativeFromJson, nativeToJson);
    createdBy.value = 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 UpdateVendorBenefitPlanVariables otherTyped = other as UpdateVendorBenefitPlanVariables;
    return id == otherTyped.id && 
    vendorId == otherTyped.vendorId && 
    title == otherTyped.title && 
    description == otherTyped.description && 
    requestLabel == otherTyped.requestLabel && 
    total == otherTyped.total && 
    isActive == otherTyped.isActive && 
    createdBy == otherTyped.createdBy;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdBy.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(vendorId.state == OptionalState.set) {
      json['vendorId'] = vendorId.toJson();
    }
    if(title.state == OptionalState.set) {
      json['title'] = title.toJson();
    }
    if(description.state == OptionalState.set) {
      json['description'] = description.toJson();
    }
    if(requestLabel.state == OptionalState.set) {
      json['requestLabel'] = requestLabel.toJson();
    }
    if(total.state == OptionalState.set) {
      json['total'] = total.toJson();
    }
    if(isActive.state == OptionalState.set) {
      json['isActive'] = isActive.toJson();
    }
    if(createdBy.state == OptionalState.set) {
      json['createdBy'] = createdBy.toJson();
    }
    return json;
  }

  UpdateVendorBenefitPlanVariables({
    required this.id,
    required this.vendorId,
    required this.title,
    required this.description,
    required this.requestLabel,
    required this.total,
    required this.isActive,
    required this.createdBy,
  });
}

