part of 'generated.dart';

class GetAttireOptionByIdVariablesBuilder {
  String id;

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

  QueryRef<GetAttireOptionByIdData, GetAttireOptionByIdVariables> ref() {
    GetAttireOptionByIdVariables vars= GetAttireOptionByIdVariables(id: id,);
    return _dataConnect.query("getAttireOptionById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetAttireOptionByIdAttireOption {
  final String id;
  final String itemId;
  final String label;
  final String? icon;
  final String? imageUrl;
  final bool? isMandatory;
  final String? vendorId;
  final Timestamp? createdAt;
  GetAttireOptionByIdAttireOption.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 GetAttireOptionByIdAttireOption otherTyped = other as GetAttireOptionByIdAttireOption;
    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;
  }

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

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

    final GetAttireOptionByIdData otherTyped = other as GetAttireOptionByIdData;
    return attireOption == otherTyped.attireOption;
    
  }
  @override
  int get hashCode => attireOption.hashCode;
  

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

  GetAttireOptionByIdData({
    this.attireOption,
  });
}

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

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

