// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'thumbnails.dart';

// **************************************************************************
// _IsarEmbeddedGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
// ignore_for_file: type=lint

const ThumbnailsSchema = IsarGeneratedSchema(
  schema: IsarSchema(
    name: 'Thumbnails',
    embedded: true,
    properties: [
      IsarPropertySchema(
        name: 'tiny',
        type: IsarType.object,
        target: 'Thumbnail',
      ),
      IsarPropertySchema(
        name: 'small',
        type: IsarType.object,
        target: 'Thumbnail',
      ),
      IsarPropertySchema(
        name: 'card_cover',
        type: IsarType.object,
        target: 'Thumbnail',
      ),
    ],
    indexes: [],
  ),
  converter: IsarObjectConverter<void, Thumbnails>(
    serialize: serializeThumbnails,
    deserialize: deserializeThumbnails,
  ),
);

@isarProtected
int serializeThumbnails(IsarWriter writer, Thumbnails object) {
  {
    final value = object.tiny;
    if (value == null) {
      IsarCore.writeNull(writer, 1);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 1);
      serializeThumbnail(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.small;
    if (value == null) {
      IsarCore.writeNull(writer, 2);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 2);
      serializeThumbnail(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.card_cover;
    if (value == null) {
      IsarCore.writeNull(writer, 3);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 3);
      serializeThumbnail(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  return 0;
}

@isarProtected
Thumbnails deserializeThumbnails(IsarReader reader) {
  final object = Thumbnails();
  {
    final objectReader = IsarCore.readObject(reader, 1);
    if (objectReader.isNull) {
      object.tiny = null;
    } else {
      final embedded = deserializeThumbnail(objectReader);
      IsarCore.freeReader(objectReader);
      object.tiny = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 2);
    if (objectReader.isNull) {
      object.small = null;
    } else {
      final embedded = deserializeThumbnail(objectReader);
      IsarCore.freeReader(objectReader);
      object.small = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 3);
    if (objectReader.isNull) {
      object.card_cover = null;
    } else {
      final embedded = deserializeThumbnail(objectReader);
      IsarCore.freeReader(objectReader);
      object.card_cover = embedded;
    }
  }
  return object;
}

extension ThumbnailsQueryFilter
    on QueryBuilder<Thumbnails, Thumbnails, QFilterCondition> {
  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> tinyIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 1));
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> tinyIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 1));
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> smallIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 2));
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> smallIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 2));
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition>
      card_coverIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 3));
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition>
      card_coverIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 3));
    });
  }
}

extension ThumbnailsQueryObject
    on QueryBuilder<Thumbnails, Thumbnails, QFilterCondition> {
  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> tiny(
      FilterQuery<Thumbnail> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 1);
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> small(
      FilterQuery<Thumbnail> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 2);
    });
  }

  QueryBuilder<Thumbnails, Thumbnails, QAfterFilterCondition> card_cover(
      FilterQuery<Thumbnail> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 3);
    });
  }
}

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

Thumbnails _$ThumbnailsFromJson(Map<String, dynamic> json) => Thumbnails()
  ..tiny = json['tiny'] == null
      ? null
      : Thumbnail.fromJson(json['tiny'] as Map<String, dynamic>)
  ..small = json['small'] == null
      ? null
      : Thumbnail.fromJson(json['small'] as Map<String, dynamic>)
  ..card_cover = json['card_cover'] == null
      ? null
      : Thumbnail.fromJson(json['card_cover'] as Map<String, dynamic>);

Map<String, dynamic> _$ThumbnailsToJson(Thumbnails instance) =>
    <String, dynamic>{
      'tiny': instance.tiny?.toJson(),
      'small': instance.small?.toJson(),
      'card_cover': instance.card_cover?.toJson(),
    };
