part of 'generated.dart';

class ListAttireOptionsVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListAttireOptionsVariablesBuilder(this._dataConnect, );
  Deserializer<ListAttireOptionsData> dataDeserializer = (dynamic json)  => ListAttireOptionsData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListAttireOptionsData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListAttireOptionsData, void> ref() {
    
    return _dataConnect.query("listAttireOptions", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListAttireOptionsAttireOptions {
  final String id;
  final String itemId;
  final String label;
  final String? icon;
  final String? imageUrl;
  final bool? isMandatory;
  final String? vendorId;
  final Timestamp? createdAt;
  ListAttireOptionsAttireOptions.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']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListAttireOptionsAttireOptions otherTyped = other as ListAttireOptionsAttireOptions;
    return id == otherTyped.id && 
    itemId == otherTyped.itemId && 
    label == otherTyped.label && 
    icon == otherTyped.icon && 
    imageUrl == otherTyped.imageUrl && 
    isMandatory == otherTyped.isMandatory && 
    vendorId == otherTyped.vendorId && 
    createdAt == otherTyped.createdAt;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode, createdAt.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);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    return json;
  }

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

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

    final ListAttireOptionsData otherTyped = other as ListAttireOptionsData;
    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;
  }

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

