part of 'generated.dart';

class FilterAttireOptionsVariablesBuilder {
  Optional<String> _itemId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isMandatory = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;
  FilterAttireOptionsVariablesBuilder itemId(String? t) {
   _itemId.value = t;
   return this;
  }
  FilterAttireOptionsVariablesBuilder isMandatory(bool? t) {
   _isMandatory.value = t;
   return this;
  }
  FilterAttireOptionsVariablesBuilder vendorId(String? t) {
   _vendorId.value = t;
   return this;
  }

  FilterAttireOptionsVariablesBuilder(this._dataConnect, );
  Deserializer<FilterAttireOptionsData> dataDeserializer = (dynamic json)  => FilterAttireOptionsData.fromJson(jsonDecode(json));
  Serializer<FilterAttireOptionsVariables> varsSerializer = (FilterAttireOptionsVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<FilterAttireOptionsData, FilterAttireOptionsVariables>> execute() {
    return ref().execute();
  }

  QueryRef<FilterAttireOptionsData, FilterAttireOptionsVariables> ref() {
    FilterAttireOptionsVariables vars= FilterAttireOptionsVariables(itemId: _itemId,isMandatory: _isMandatory,vendorId: _vendorId,);
    return _dataConnect.query("filterAttireOptions", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class FilterAttireOptionsAttireOptions {
  final String id;
  final String itemId;
  final String label;
  final String? icon;
  final String? imageUrl;
  final bool? isMandatory;
  final String? vendorId;
  FilterAttireOptionsAttireOptions.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  itemId = nativeFromJson<String>(json['itemId']),
  label = nativeFromJson<String>(json['label']),
  icon = json['icon'] == null ? null : nativeFromJson<String>(json['icon']),
  imageUrl = json['imageUrl'] == null ? null : nativeFromJson<String>(json['imageUrl']),
  isMandatory = json['isMandatory'] == null ? null : nativeFromJson<bool>(json['isMandatory']),
  vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final FilterAttireOptionsAttireOptions otherTyped = other as FilterAttireOptionsAttireOptions;
    return id == otherTyped.id && 
    itemId == otherTyped.itemId && 
    label == otherTyped.label && 
    icon == otherTyped.icon && 
    imageUrl == otherTyped.imageUrl && 
    isMandatory == otherTyped.isMandatory && 
    vendorId == otherTyped.vendorId;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['itemId'] = nativeToJson<String>(itemId);
    json['label'] = nativeToJson<String>(label);
    if (icon != null) {
      json['icon'] = nativeToJson<String?>(icon);
    }
    if (imageUrl != null) {
      json['imageUrl'] = nativeToJson<String?>(imageUrl);
    }
    if (isMandatory != null) {
      json['isMandatory'] = nativeToJson<bool?>(isMandatory);
    }
    if (vendorId != null) {
      json['vendorId'] = nativeToJson<String?>(vendorId);
    }
    return json;
  }

  FilterAttireOptionsAttireOptions({
    required this.id,
    required this.itemId,
    required this.label,
    this.icon,
    this.imageUrl,
    this.isMandatory,
    this.vendorId,
  });
}

@immutable
class FilterAttireOptionsData {
  final List<FilterAttireOptionsAttireOptions> attireOptions;
  FilterAttireOptionsData.fromJson(dynamic json):
  
  attireOptions = (json['attireOptions'] as List<dynamic>)
        .map((e) => FilterAttireOptionsAttireOptions.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final FilterAttireOptionsData otherTyped = other as FilterAttireOptionsData;
    return attireOptions == otherTyped.attireOptions;
    
  }
  @override
  int get hashCode => attireOptions.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['attireOptions'] = attireOptions.map((e) => e.toJson()).toList();
    return json;
  }

  FilterAttireOptionsData({
    required this.attireOptions,
  });
}

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

    final FilterAttireOptionsVariables otherTyped = other as FilterAttireOptionsVariables;
    return itemId == otherTyped.itemId && 
    isMandatory == otherTyped.isMandatory && 
    vendorId == otherTyped.vendorId;
    
  }
  @override
  int get hashCode => Object.hashAll([itemId.hashCode, isMandatory.hashCode, vendorId.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if(itemId.state == OptionalState.set) {
      json['itemId'] = itemId.toJson();
    }
    if(isMandatory.state == OptionalState.set) {
      json['isMandatory'] = isMandatory.toJson();
    }
    if(vendorId.state == OptionalState.set) {
      json['vendorId'] = vendorId.toJson();
    }
    return json;
  }

  FilterAttireOptionsVariables({
    required this.itemId,
    required this.isMandatory,
    required this.vendorId,
  });
}

