part of 'generated.dart';

class UpdateAttireOptionVariablesBuilder {
  String id;
  Optional<String> _itemId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _label = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _icon = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _imageUrl = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isMandatory = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);

  final FirebaseDataConnect _dataConnect;  UpdateAttireOptionVariablesBuilder itemId(String? t) {
   _itemId.value = t;
   return this;
  }
  UpdateAttireOptionVariablesBuilder label(String? t) {
   _label.value = t;
   return this;
  }
  UpdateAttireOptionVariablesBuilder icon(String? t) {
   _icon.value = t;
   return this;
  }
  UpdateAttireOptionVariablesBuilder imageUrl(String? t) {
   _imageUrl.value = t;
   return this;
  }
  UpdateAttireOptionVariablesBuilder isMandatory(bool? t) {
   _isMandatory.value = t;
   return this;
  }
  UpdateAttireOptionVariablesBuilder vendorId(String? t) {
   _vendorId.value = t;
   return this;
  }

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

  MutationRef<UpdateAttireOptionData, UpdateAttireOptionVariables> ref() {
    UpdateAttireOptionVariables vars= UpdateAttireOptionVariables(id: id,itemId: _itemId,label: _label,icon: _icon,imageUrl: _imageUrl,isMandatory: _isMandatory,vendorId: _vendorId,);
    return _dataConnect.mutation("updateAttireOption", dataDeserializer, varsSerializer, vars);
  }
}

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

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

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

    final UpdateAttireOptionData otherTyped = other as UpdateAttireOptionData;
    return attireOption_update == otherTyped.attireOption_update;
    
  }
  @override
  int get hashCode => attireOption_update.hashCode;
  

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

  UpdateAttireOptionData({
    this.attireOption_update,
  });
}

@immutable
class UpdateAttireOptionVariables {
  final String id;
  late final Optional<String>itemId;
  late final Optional<String>label;
  late final Optional<String>icon;
  late final Optional<String>imageUrl;
  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.')
  UpdateAttireOptionVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    itemId = Optional.optional(nativeFromJson, nativeToJson);
    itemId.value = json['itemId'] == null ? null : nativeFromJson<String>(json['itemId']);
  
  
    label = Optional.optional(nativeFromJson, nativeToJson);
    label.value = json['label'] == null ? null : nativeFromJson<String>(json['label']);
  
  
    icon = Optional.optional(nativeFromJson, nativeToJson);
    icon.value = json['icon'] == null ? null : nativeFromJson<String>(json['icon']);
  
  
    imageUrl = Optional.optional(nativeFromJson, nativeToJson);
    imageUrl.value = json['imageUrl'] == null ? null : nativeFromJson<String>(json['imageUrl']);
  
  
    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 UpdateAttireOptionVariables otherTyped = other as UpdateAttireOptionVariables;
    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);
    if(itemId.state == OptionalState.set) {
      json['itemId'] = itemId.toJson();
    }
    if(label.state == OptionalState.set) {
      json['label'] = label.toJson();
    }
    if(icon.state == OptionalState.set) {
      json['icon'] = icon.toJson();
    }
    if(imageUrl.state == OptionalState.set) {
      json['imageUrl'] = imageUrl.toJson();
    }
    if(isMandatory.state == OptionalState.set) {
      json['isMandatory'] = isMandatory.toJson();
    }
    if(vendorId.state == OptionalState.set) {
      json['vendorId'] = vendorId.toJson();
    }
    return json;
  }

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

