// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'location_requirements.dart';

// **************************************************************************
// _IsarCollectionGenerator
// **************************************************************************

// 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

extension GetLocationRequirementsCollection on Isar {
  IsarCollection<int, LocationRequirements> get locationRequirements =>
      this.collection();
}

const LocationRequirementsSchema = IsarGeneratedSchema(
  schema: IsarSchema(
    name: 'LocationRequirements',
    idName: 'id',
    embedded: false,
    properties: [
      IsarPropertySchema(
        name: 'measures',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'areaType',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'exposition',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'light',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'humidity',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'topography',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'geometry',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'value',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'costs',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'effort',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'careEffort',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'minimalAreaSize',
        type: IsarType.long,
      ),
      IsarPropertySchema(
        name: 'ground',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'name',
        type: IsarType.string,
      ),
    ],
    indexes: [
      IsarIndexSchema(
        name: 'name',
        properties: [
          "name",
        ],
        unique: true,
        hash: true,
      ),
    ],
  ),
  converter: IsarObjectConverter<int, LocationRequirements>(
    serialize: serializeLocationRequirements,
    deserialize: deserializeLocationRequirements,
    deserializeProperty: deserializeLocationRequirementsProp,
  ),
  embeddedSchemas: [IdValueSchema, IdValueColorSchema],
);

@isarProtected
int serializeLocationRequirements(
    IsarWriter writer, LocationRequirements object) {
  {
    final list = object.measures;
    if (list == null) {
      IsarCore.writeNull(writer, 1);
    } else {
      final listWriter = IsarCore.beginList(writer, 1, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValue(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.areaType;
    if (list == null) {
      IsarCore.writeNull(writer, 2);
    } else {
      final listWriter = IsarCore.beginList(writer, 2, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.exposition;
    if (list == null) {
      IsarCore.writeNull(writer, 3);
    } else {
      final listWriter = IsarCore.beginList(writer, 3, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.light;
    if (list == null) {
      IsarCore.writeNull(writer, 4);
    } else {
      final listWriter = IsarCore.beginList(writer, 4, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.humidity;
    if (list == null) {
      IsarCore.writeNull(writer, 5);
    } else {
      final listWriter = IsarCore.beginList(writer, 5, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.topography;
    if (list == null) {
      IsarCore.writeNull(writer, 6);
    } else {
      final listWriter = IsarCore.beginList(writer, 6, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.geometry;
    if (list == null) {
      IsarCore.writeNull(writer, 7);
    } else {
      final listWriter = IsarCore.beginList(writer, 7, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final value = object.value;
    if (value == null) {
      IsarCore.writeNull(writer, 8);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 8);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.costs;
    if (value == null) {
      IsarCore.writeNull(writer, 9);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 9);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.effort;
    if (value == null) {
      IsarCore.writeNull(writer, 10);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 10);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.careEffort;
    if (value == null) {
      IsarCore.writeNull(writer, 11);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 11);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  IsarCore.writeLong(
      writer, 12, object.minimalAreaSize ?? -9223372036854775808);
  {
    final list = object.ground;
    if (list == null) {
      IsarCore.writeNull(writer, 13);
    } else {
      final listWriter = IsarCore.beginList(writer, 13, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final value = object.name;
    if (value == null) {
      IsarCore.writeNull(writer, 14);
    } else {
      IsarCore.writeString(writer, 14, value);
    }
  }
  return object.id;
}

@isarProtected
LocationRequirements deserializeLocationRequirements(IsarReader reader) {
  final object = LocationRequirements();
  {
    final length = IsarCore.readList(reader, 1, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.measures = null;
      } else {
        final list = List<IdValue>.filled(length, IdValue(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValue();
            } else {
              final embedded = deserializeIdValue(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.measures = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.areaType = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.areaType = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.exposition = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.exposition = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.light = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.light = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.humidity = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.humidity = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.topography = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.topography = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.geometry = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.geometry = list;
      }
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 8);
    if (objectReader.isNull) {
      object.value = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.value = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 9);
    if (objectReader.isNull) {
      object.costs = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.costs = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 10);
    if (objectReader.isNull) {
      object.effort = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.effort = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 11);
    if (objectReader.isNull) {
      object.careEffort = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.careEffort = embedded;
    }
  }
  {
    final value = IsarCore.readLong(reader, 12);
    if (value == -9223372036854775808) {
      object.minimalAreaSize = null;
    } else {
      object.minimalAreaSize = value;
    }
  }
  {
    final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.ground = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.ground = list;
      }
    }
  }
  object.id = IsarCore.readId(reader);
  object.name = IsarCore.readString(reader, 14);
  return object;
}

@isarProtected
dynamic deserializeLocationRequirementsProp(IsarReader reader, int property) {
  switch (property) {
    case 1:
      {
        final length = IsarCore.readList(reader, 1, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<IdValue>.filled(length, IdValue(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValue();
                } else {
                  final embedded = deserializeIdValue(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 2:
      {
        final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 3:
      {
        final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 4:
      {
        final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 5:
      {
        final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 6:
      {
        final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 7:
      {
        final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 8:
      {
        final objectReader = IsarCore.readObject(reader, 8);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 9:
      {
        final objectReader = IsarCore.readObject(reader, 9);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 10:
      {
        final objectReader = IsarCore.readObject(reader, 10);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 11:
      {
        final objectReader = IsarCore.readObject(reader, 11);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 12:
      {
        final value = IsarCore.readLong(reader, 12);
        if (value == -9223372036854775808) {
          return null;
        } else {
          return value;
        }
      }
    case 13:
      {
        final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 0:
      return IsarCore.readId(reader);
    case 14:
      return IsarCore.readString(reader, 14);
    default:
      throw ArgumentError('Unknown property: $property');
  }
}

sealed class _LocationRequirementsUpdate {
  bool call({
    required int id,
    int? minimalAreaSize,
    String? name,
  });
}

class _LocationRequirementsUpdateImpl implements _LocationRequirementsUpdate {
  const _LocationRequirementsUpdateImpl(this.collection);

  final IsarCollection<int, LocationRequirements> collection;

  @override
  bool call({
    required int id,
    Object? minimalAreaSize = ignore,
    Object? name = ignore,
  }) {
    return collection.updateProperties([
          id
        ], {
          if (minimalAreaSize != ignore) 12: minimalAreaSize as int?,
          if (name != ignore) 14: name as String?,
        }) >
        0;
  }
}

sealed class _LocationRequirementsUpdateAll {
  int call({
    required List<int> id,
    int? minimalAreaSize,
    String? name,
  });
}

class _LocationRequirementsUpdateAllImpl
    implements _LocationRequirementsUpdateAll {
  const _LocationRequirementsUpdateAllImpl(this.collection);

  final IsarCollection<int, LocationRequirements> collection;

  @override
  int call({
    required List<int> id,
    Object? minimalAreaSize = ignore,
    Object? name = ignore,
  }) {
    return collection.updateProperties(id, {
      if (minimalAreaSize != ignore) 12: minimalAreaSize as int?,
      if (name != ignore) 14: name as String?,
    });
  }
}

extension LocationRequirementsUpdate
    on IsarCollection<int, LocationRequirements> {
  _LocationRequirementsUpdate get update =>
      _LocationRequirementsUpdateImpl(this);

  _LocationRequirementsUpdateAll get updateAll =>
      _LocationRequirementsUpdateAllImpl(this);
}

sealed class _LocationRequirementsQueryUpdate {
  int call({
    int? minimalAreaSize,
    String? name,
  });
}

class _LocationRequirementsQueryUpdateImpl
    implements _LocationRequirementsQueryUpdate {
  const _LocationRequirementsQueryUpdateImpl(this.query, {this.limit});

  final IsarQuery<LocationRequirements> query;
  final int? limit;

  @override
  int call({
    Object? minimalAreaSize = ignore,
    Object? name = ignore,
  }) {
    return query.updateProperties(limit: limit, {
      if (minimalAreaSize != ignore) 12: minimalAreaSize as int?,
      if (name != ignore) 14: name as String?,
    });
  }
}

extension LocationRequirementsQueryUpdate on IsarQuery<LocationRequirements> {
  _LocationRequirementsQueryUpdate get updateFirst =>
      _LocationRequirementsQueryUpdateImpl(this, limit: 1);

  _LocationRequirementsQueryUpdate get updateAll =>
      _LocationRequirementsQueryUpdateImpl(this);
}

class _LocationRequirementsQueryBuilderUpdateImpl
    implements _LocationRequirementsQueryUpdate {
  const _LocationRequirementsQueryBuilderUpdateImpl(this.query, {this.limit});

  final QueryBuilder<LocationRequirements, LocationRequirements, QOperations>
      query;
  final int? limit;

  @override
  int call({
    Object? minimalAreaSize = ignore,
    Object? name = ignore,
  }) {
    final q = query.build();
    try {
      return q.updateProperties(limit: limit, {
        if (minimalAreaSize != ignore) 12: minimalAreaSize as int?,
        if (name != ignore) 14: name as String?,
      });
    } finally {
      q.close();
    }
  }
}

extension LocationRequirementsQueryBuilderUpdate
    on QueryBuilder<LocationRequirements, LocationRequirements, QOperations> {
  _LocationRequirementsQueryUpdate get updateFirst =>
      _LocationRequirementsQueryBuilderUpdateImpl(this, limit: 1);

  _LocationRequirementsQueryUpdate get updateAll =>
      _LocationRequirementsQueryBuilderUpdateImpl(this);
}

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

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

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> measuresIsEmpty() {
    return not().group(
      (q) => q.measuresIsNull().or().measuresIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> measuresIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 1, value: null),
      );
    });
  }

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

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

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> areaTypeIsEmpty() {
    return not().group(
      (q) => q.areaTypeIsNull().or().areaTypeIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> areaTypeIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 2, value: null),
      );
    });
  }

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

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

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> expositionIsEmpty() {
    return not().group(
      (q) => q.expositionIsNull().or().expositionIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> expositionIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 3, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> lightIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 4));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> lightIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 4));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> lightIsEmpty() {
    return not().group(
      (q) => q.lightIsNull().or().lightIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> lightIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 4, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> humidityIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 5));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> humidityIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 5));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> humidityIsEmpty() {
    return not().group(
      (q) => q.humidityIsNull().or().humidityIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> humidityIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 5, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> topographyIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 6));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> topographyIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 6));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> topographyIsEmpty() {
    return not().group(
      (q) => q.topographyIsNull().or().topographyIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> topographyIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 6, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> geometryIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 7));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> geometryIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 7));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> geometryIsEmpty() {
    return not().group(
      (q) => q.geometryIsNull().or().geometryIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> geometryIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 7, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> valueIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 8));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> valueIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 8));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> costsIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 9));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> costsIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 9));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> effortIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 10));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> effortIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 10));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> careEffortIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 11));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> careEffortIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 11));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 12));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 12));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 12,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeGreaterThan(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 12,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeGreaterThanOrEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 12,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeLessThan(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 12,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeLessThanOrEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 12,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> minimalAreaSizeBetween(
    int? lower,
    int? upper,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 12,
          lower: lower,
          upper: upper,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> groundIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 13));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> groundIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 13));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> groundIsEmpty() {
    return not().group(
      (q) => q.groundIsNull().or().groundIsNotEmpty(),
    );
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> groundIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 13, value: null),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idGreaterThan(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idGreaterThanOrEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idLessThan(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idLessThanOrEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> idBetween(
    int lower,
    int upper,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 0,
          lower: lower,
          upper: upper,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 14));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 14));
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameGreaterThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameGreaterThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameLessThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameLessThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameBetween(
    String? lower,
    String? upper, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 14,
          lower: lower,
          upper: upper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameStartsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        StartsWithCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameEndsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EndsWithCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
          QAfterFilterCondition>
      nameContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        ContainsCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
          QAfterFilterCondition>
      nameMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        MatchesCondition(
          property: 14,
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 14,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> nameIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 14,
          value: '',
        ),
      );
    });
  }
}

extension LocationRequirementsQueryObject on QueryBuilder<LocationRequirements,
    LocationRequirements, QFilterCondition> {
  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> value(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 8);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> costs(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 9);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> effort(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 10);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements,
      QAfterFilterCondition> careEffort(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 11);
    });
  }
}

extension LocationRequirementsQuerySortBy
    on QueryBuilder<LocationRequirements, LocationRequirements, QSortBy> {
  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortByMinimalAreaSize() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(12);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortByMinimalAreaSizeDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(12, sort: Sort.desc);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortById() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortByIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0, sort: Sort.desc);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortByName({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        14,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      sortByNameDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        14,
        sort: Sort.desc,
        caseSensitive: caseSensitive,
      );
    });
  }
}

extension LocationRequirementsQuerySortThenBy
    on QueryBuilder<LocationRequirements, LocationRequirements, QSortThenBy> {
  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenByMinimalAreaSize() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(12);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenByMinimalAreaSizeDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(12, sort: Sort.desc);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenById() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenByIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0, sort: Sort.desc);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenByName({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(14, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterSortBy>
      thenByNameDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive);
    });
  }
}

extension LocationRequirementsQueryWhereDistinct
    on QueryBuilder<LocationRequirements, LocationRequirements, QDistinct> {
  QueryBuilder<LocationRequirements, LocationRequirements, QAfterDistinct>
      distinctByMinimalAreaSize() {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(12);
    });
  }

  QueryBuilder<LocationRequirements, LocationRequirements, QAfterDistinct>
      distinctByName({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(14, caseSensitive: caseSensitive);
    });
  }
}

extension LocationRequirementsQueryProperty1
    on QueryBuilder<LocationRequirements, LocationRequirements, QProperty> {
  QueryBuilder<LocationRequirements, List<IdValue>?, QAfterProperty>
      measuresProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      areaTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      expositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      lightProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      humidityProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      topographyProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      geometryProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<LocationRequirements, IdValueColor?, QAfterProperty>
      valueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<LocationRequirements, IdValueColor?, QAfterProperty>
      costsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<LocationRequirements, IdValueColor?, QAfterProperty>
      effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<LocationRequirements, IdValueColor?, QAfterProperty>
      careEffortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<LocationRequirements, int?, QAfterProperty>
      minimalAreaSizeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<LocationRequirements, List<IdValueColor>?, QAfterProperty>
      groundProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<LocationRequirements, int, QAfterProperty> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }

  QueryBuilder<LocationRequirements, String?, QAfterProperty> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }
}

extension LocationRequirementsQueryProperty2<R>
    on QueryBuilder<LocationRequirements, R, QAfterProperty> {
  QueryBuilder<LocationRequirements, (R, List<IdValue>?), QAfterProperty>
      measuresProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      areaTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      expositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      lightProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      humidityProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      topographyProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      geometryProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<LocationRequirements, (R, IdValueColor?), QAfterProperty>
      valueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<LocationRequirements, (R, IdValueColor?), QAfterProperty>
      costsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<LocationRequirements, (R, IdValueColor?), QAfterProperty>
      effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<LocationRequirements, (R, IdValueColor?), QAfterProperty>
      careEffortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<LocationRequirements, (R, int?), QAfterProperty>
      minimalAreaSizeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<LocationRequirements, (R, List<IdValueColor>?), QAfterProperty>
      groundProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<LocationRequirements, (R, int), QAfterProperty> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }

  QueryBuilder<LocationRequirements, (R, String?), QAfterProperty>
      nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }
}

extension LocationRequirementsQueryProperty3<R1, R2>
    on QueryBuilder<LocationRequirements, (R1, R2), QAfterProperty> {
  QueryBuilder<LocationRequirements, (R1, R2, List<IdValue>?), QOperations>
      measuresProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      areaTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      expositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      lightProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      humidityProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      topographyProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      geometryProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, IdValueColor?), QOperations>
      valueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, IdValueColor?), QOperations>
      costsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, IdValueColor?), QOperations>
      effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, IdValueColor?), QOperations>
      careEffortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, int?), QOperations>
      minimalAreaSizeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, List<IdValueColor>?), QOperations>
      groundProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, int), QOperations> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }

  QueryBuilder<LocationRequirements, (R1, R2, String?), QOperations>
      nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }
}

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

LocationRequirements _$LocationRequirementsFromJson(
        Map<String, dynamic> json) =>
    LocationRequirements()
      ..id = (json['id'] as num).toInt()
      ..name = json['Name'] as String?
      ..measures =
          (json['Maßnahmentabelle Standortansprüche'] as List<dynamic>?)
              ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
              .toList()
      ..areaType = (json['Flächentyp'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..exposition = (json['Exposition'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..light = (json['Licht'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..humidity = (json['Feuchtigkeit'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..topography = (json['Topographie'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..geometry = (json['Geometrie'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..value = json['Wertigkeit'] == null
          ? null
          : IdValueColor.fromJson(json['Wertigkeit'] as Map<String, dynamic>)
      ..costs = json['Kosten'] == null
          ? null
          : IdValueColor.fromJson(json['Kosten'] as Map<String, dynamic>)
      ..effort = json['Aufwand'] == null
          ? null
          : IdValueColor.fromJson(json['Aufwand'] as Map<String, dynamic>)
      ..careEffort = json['Pflegeaufwand'] == null
          ? null
          : IdValueColor.fromJson(json['Pflegeaufwand'] as Map<String, dynamic>)
      ..minimalAreaSize = (json['Mindesflächengröße in m²'] as num?)?.toInt()
      ..ground = (json['Boden'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList();

Map<String, dynamic> _$LocationRequirementsToJson(
        LocationRequirements instance) =>
    <String, dynamic>{
      'id': instance.id,
      'Name': instance.name,
      'Maßnahmentabelle Standortansprüche':
          instance.measures?.map((e) => e.toJson()).toList(),
      'Flächentyp': instance.areaType?.map((e) => e.toJson()).toList(),
      'Exposition': instance.exposition?.map((e) => e.toJson()).toList(),
      'Licht': instance.light?.map((e) => e.toJson()).toList(),
      'Feuchtigkeit': instance.humidity?.map((e) => e.toJson()).toList(),
      'Topographie': instance.topography?.map((e) => e.toJson()).toList(),
      'Geometrie': instance.geometry?.map((e) => e.toJson()).toList(),
      'Wertigkeit': instance.value?.toJson(),
      'Kosten': instance.costs?.toJson(),
      'Aufwand': instance.effort?.toJson(),
      'Pflegeaufwand': instance.careEffort?.toJson(),
      'Mindesflächengröße in m²': instance.minimalAreaSize,
      'Boden': instance.ground?.map((e) => e.toJson()).toList(),
    };
