// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'measure_combination.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 GetMeasureCombinationCollection on Isar {
  IsarCollection<int, MeasureCombination> get measureCombinations =>
      this.collection();
}

const MeasureCombinationSchema = IsarGeneratedSchema(
  schema: IsarSchema(
    name: 'MeasureCombination',
    idName: 'id',
    embedded: false,
    properties: [
      IsarPropertySchema(
        name: 'combinations',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'notices',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'name',
        type: IsarType.string,
      ),
    ],
    indexes: [
      IsarIndexSchema(
        name: 'name',
        properties: [
          "name",
        ],
        unique: true,
        hash: true,
      ),
    ],
  ),
  converter: IsarObjectConverter<int, MeasureCombination>(
    serialize: serializeMeasureCombination,
    deserialize: deserializeMeasureCombination,
    deserializeProperty: deserializeMeasureCombinationProp,
  ),
  embeddedSchemas: [IdValueSchema],
);

@isarProtected
int serializeMeasureCombination(IsarWriter writer, MeasureCombination object) {
  {
    final list = object.combinations;
    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 value = object.notices;
    if (value == null) {
      IsarCore.writeNull(writer, 2);
    } else {
      IsarCore.writeString(writer, 2, value);
    }
  }
  {
    final value = object.name;
    if (value == null) {
      IsarCore.writeNull(writer, 3);
    } else {
      IsarCore.writeString(writer, 3, value);
    }
  }
  return object.id;
}

@isarProtected
MeasureCombination deserializeMeasureCombination(IsarReader reader) {
  final object = MeasureCombination();
  {
    final length = IsarCore.readList(reader, 1, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.combinations = 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.combinations = list;
      }
    }
  }
  object.notices = IsarCore.readString(reader, 2);
  object.id = IsarCore.readId(reader);
  object.name = IsarCore.readString(reader, 3);
  return object;
}

@isarProtected
dynamic deserializeMeasureCombinationProp(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:
      return IsarCore.readString(reader, 2);
    case 0:
      return IsarCore.readId(reader);
    case 3:
      return IsarCore.readString(reader, 3);
    default:
      throw ArgumentError('Unknown property: $property');
  }
}

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

class _MeasureCombinationUpdateImpl implements _MeasureCombinationUpdate {
  const _MeasureCombinationUpdateImpl(this.collection);

  final IsarCollection<int, MeasureCombination> collection;

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

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

class _MeasureCombinationUpdateAllImpl implements _MeasureCombinationUpdateAll {
  const _MeasureCombinationUpdateAllImpl(this.collection);

  final IsarCollection<int, MeasureCombination> collection;

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

extension MeasureCombinationUpdate on IsarCollection<int, MeasureCombination> {
  _MeasureCombinationUpdate get update => _MeasureCombinationUpdateImpl(this);

  _MeasureCombinationUpdateAll get updateAll =>
      _MeasureCombinationUpdateAllImpl(this);
}

sealed class _MeasureCombinationQueryUpdate {
  int call({
    String? notices,
    String? name,
  });
}

class _MeasureCombinationQueryUpdateImpl
    implements _MeasureCombinationQueryUpdate {
  const _MeasureCombinationQueryUpdateImpl(this.query, {this.limit});

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

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

extension MeasureCombinationQueryUpdate on IsarQuery<MeasureCombination> {
  _MeasureCombinationQueryUpdate get updateFirst =>
      _MeasureCombinationQueryUpdateImpl(this, limit: 1);

  _MeasureCombinationQueryUpdate get updateAll =>
      _MeasureCombinationQueryUpdateImpl(this);
}

class _MeasureCombinationQueryBuilderUpdateImpl
    implements _MeasureCombinationQueryUpdate {
  const _MeasureCombinationQueryBuilderUpdateImpl(this.query, {this.limit});

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

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

extension MeasureCombinationQueryBuilderUpdate
    on QueryBuilder<MeasureCombination, MeasureCombination, QOperations> {
  _MeasureCombinationQueryUpdate get updateFirst =>
      _MeasureCombinationQueryBuilderUpdateImpl(this, limit: 1);

  _MeasureCombinationQueryUpdate get updateAll =>
      _MeasureCombinationQueryBuilderUpdateImpl(this);
}

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

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

  QueryBuilder<MeasureCombination, MeasureCombination, QAfterFilterCondition>
      combinationsIsEmpty() {
    return not().group(
      (q) => q.combinationsIsNull().or().combinationsIsNotEmpty(),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<MeasureCombination, MeasureCombination, QAfterFilterCondition>
      noticesIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 2,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureCombination, MeasureCombination, QAfterFilterCondition>
      noticesIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 2,
          value: '',
        ),
      );
    });
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

extension MeasureCombinationQueryObject
    on QueryBuilder<MeasureCombination, MeasureCombination, QFilterCondition> {}

extension MeasureCombinationQuerySortBy
    on QueryBuilder<MeasureCombination, MeasureCombination, QSortBy> {
  QueryBuilder<MeasureCombination, MeasureCombination, QAfterSortBy>
      sortByNotices({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        2,
        caseSensitive: caseSensitive,
      );
    });
  }

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

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

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

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

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

extension MeasureCombinationQuerySortThenBy
    on QueryBuilder<MeasureCombination, MeasureCombination, QSortThenBy> {
  QueryBuilder<MeasureCombination, MeasureCombination, QAfterSortBy>
      thenByNotices({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(2, caseSensitive: caseSensitive);
    });
  }

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

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

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

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

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

extension MeasureCombinationQueryWhereDistinct
    on QueryBuilder<MeasureCombination, MeasureCombination, QDistinct> {
  QueryBuilder<MeasureCombination, MeasureCombination, QAfterDistinct>
      distinctByNotices({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(2, caseSensitive: caseSensitive);
    });
  }

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

extension MeasureCombinationQueryProperty1
    on QueryBuilder<MeasureCombination, MeasureCombination, QProperty> {
  QueryBuilder<MeasureCombination, List<IdValue>?, QAfterProperty>
      combinationsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<MeasureCombination, String?, QAfterProperty> noticesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

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

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

extension MeasureCombinationQueryProperty2<R>
    on QueryBuilder<MeasureCombination, R, QAfterProperty> {
  QueryBuilder<MeasureCombination, (R, List<IdValue>?), QAfterProperty>
      combinationsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<MeasureCombination, (R, String?), QAfterProperty>
      noticesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

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

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

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

  QueryBuilder<MeasureCombination, (R1, R2, String?), QOperations>
      noticesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

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

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

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

MeasureCombination _$MeasureCombinationFromJson(Map<String, dynamic> json) =>
    MeasureCombination()
      ..id = (json['id'] as num).toInt()
      ..name = json['Name'] as String?
      ..combinations = (json['Maßnahmenkombination'] as List<dynamic>?)
          ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
          .toList()
      ..notices = json['Anmerkungen'] as String?;

Map<String, dynamic> _$MeasureCombinationToJson(MeasureCombination instance) =>
    <String, dynamic>{
      'id': instance.id,
      'Name': instance.name,
      'Maßnahmenkombination':
          instance.combinations?.map((e) => e.toJson()).toList(),
      'Anmerkungen': instance.notices,
    };
