// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'funding_program.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 GetFundingProgramCollection on Isar {
  IsarCollection<int, FundingProgram> get fundingPrograms => this.collection();
}

const FundingProgramSchema = IsarGeneratedSchema(
  schema: IsarSchema(
    name: 'FundingProgram',
    idName: 'id',
    embedded: false,
    properties: [
      IsarPropertySchema(
        name: 'name',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'region',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'measureType',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'fundingValue',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'fundingCalculation',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'fundingFrequency',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'fundingFact',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'fundingFramework',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'deMinimis',
        type: IsarType.bool,
      ),
      IsarPropertySchema(
        name: 'source',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'date',
        type: IsarType.string,
      ),
    ],
    indexes: [
      IsarIndexSchema(
        name: 'name',
        properties: [
          "name",
        ],
        unique: false,
        hash: false,
      ),
    ],
  ),
  converter: IsarObjectConverter<int, FundingProgram>(
    serialize: serializeFundingProgram,
    deserialize: deserializeFundingProgram,
    deserializeProperty: deserializeFundingProgramProp,
  ),
  embeddedSchemas: [IdValueColorSchema, IdValueSchema],
);

@isarProtected
int serializeFundingProgram(IsarWriter writer, FundingProgram object) {
  {
    final value = object.name;
    if (value == null) {
      IsarCore.writeNull(writer, 1);
    } else {
      IsarCore.writeString(writer, 1, value);
    }
  }
  {
    final list = object.region;
    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.measureType;
    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);
          serializeIdValue(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final value = object.fundingValue;
    if (value == null) {
      IsarCore.writeNull(writer, 4);
    } else {
      IsarCore.writeString(writer, 4, value);
    }
  }
  {
    final value = object.fundingCalculation;
    if (value == null) {
      IsarCore.writeNull(writer, 5);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 5);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.fundingFrequency;
    if (value == null) {
      IsarCore.writeNull(writer, 6);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 6);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.fundingFact;
    if (value == null) {
      IsarCore.writeNull(writer, 7);
    } else {
      IsarCore.writeString(writer, 7, value);
    }
  }
  {
    final value = object.fundingFramework;
    if (value == null) {
      IsarCore.writeNull(writer, 8);
    } else {
      IsarCore.writeString(writer, 8, value);
    }
  }
  {
    final value = object.deMinimis;
    if (value == null) {
      IsarCore.writeNull(writer, 9);
    } else {
      IsarCore.writeBool(writer, 9, value);
    }
  }
  {
    final value = object.source;
    if (value == null) {
      IsarCore.writeNull(writer, 10);
    } else {
      IsarCore.writeString(writer, 10, value);
    }
  }
  {
    final value = object.date;
    if (value == null) {
      IsarCore.writeNull(writer, 11);
    } else {
      IsarCore.writeString(writer, 11, value);
    }
  }
  return object.id;
}

@isarProtected
FundingProgram deserializeFundingProgram(IsarReader reader) {
  final object = FundingProgram();
  object.name = IsarCore.readString(reader, 1);
  {
    final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.region = 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.region = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.measureType = 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.measureType = list;
      }
    }
  }
  object.fundingValue = IsarCore.readString(reader, 4);
  {
    final objectReader = IsarCore.readObject(reader, 5);
    if (objectReader.isNull) {
      object.fundingCalculation = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.fundingCalculation = embedded;
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 6);
    if (objectReader.isNull) {
      object.fundingFrequency = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.fundingFrequency = embedded;
    }
  }
  object.fundingFact = IsarCore.readString(reader, 7);
  object.fundingFramework = IsarCore.readString(reader, 8);
  {
    if (IsarCore.readNull(reader, 9)) {
      object.deMinimis = null;
    } else {
      object.deMinimis = IsarCore.readBool(reader, 9);
    }
  }
  object.source = IsarCore.readString(reader, 10);
  object.date = IsarCore.readString(reader, 11);
  object.id = IsarCore.readId(reader);
  return object;
}

@isarProtected
dynamic deserializeFundingProgramProp(IsarReader reader, int property) {
  switch (property) {
    case 1:
      return IsarCore.readString(reader, 1);
    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<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 4:
      return IsarCore.readString(reader, 4);
    case 5:
      {
        final objectReader = IsarCore.readObject(reader, 5);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 6:
      {
        final objectReader = IsarCore.readObject(reader, 6);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 7:
      return IsarCore.readString(reader, 7);
    case 8:
      return IsarCore.readString(reader, 8);
    case 9:
      {
        if (IsarCore.readNull(reader, 9)) {
          return null;
        } else {
          return IsarCore.readBool(reader, 9);
        }
      }
    case 10:
      return IsarCore.readString(reader, 10);
    case 11:
      return IsarCore.readString(reader, 11);
    case 0:
      return IsarCore.readId(reader);
    default:
      throw ArgumentError('Unknown property: $property');
  }
}

sealed class _FundingProgramUpdate {
  bool call({
    required int id,
    String? name,
    String? fundingValue,
    String? fundingFact,
    String? fundingFramework,
    bool? deMinimis,
    String? source,
    String? date,
  });
}

class _FundingProgramUpdateImpl implements _FundingProgramUpdate {
  const _FundingProgramUpdateImpl(this.collection);

  final IsarCollection<int, FundingProgram> collection;

  @override
  bool call({
    required int id,
    Object? name = ignore,
    Object? fundingValue = ignore,
    Object? fundingFact = ignore,
    Object? fundingFramework = ignore,
    Object? deMinimis = ignore,
    Object? source = ignore,
    Object? date = ignore,
  }) {
    return collection.updateProperties([
          id
        ], {
          if (name != ignore) 1: name as String?,
          if (fundingValue != ignore) 4: fundingValue as String?,
          if (fundingFact != ignore) 7: fundingFact as String?,
          if (fundingFramework != ignore) 8: fundingFramework as String?,
          if (deMinimis != ignore) 9: deMinimis as bool?,
          if (source != ignore) 10: source as String?,
          if (date != ignore) 11: date as String?,
        }) >
        0;
  }
}

sealed class _FundingProgramUpdateAll {
  int call({
    required List<int> id,
    String? name,
    String? fundingValue,
    String? fundingFact,
    String? fundingFramework,
    bool? deMinimis,
    String? source,
    String? date,
  });
}

class _FundingProgramUpdateAllImpl implements _FundingProgramUpdateAll {
  const _FundingProgramUpdateAllImpl(this.collection);

  final IsarCollection<int, FundingProgram> collection;

  @override
  int call({
    required List<int> id,
    Object? name = ignore,
    Object? fundingValue = ignore,
    Object? fundingFact = ignore,
    Object? fundingFramework = ignore,
    Object? deMinimis = ignore,
    Object? source = ignore,
    Object? date = ignore,
  }) {
    return collection.updateProperties(id, {
      if (name != ignore) 1: name as String?,
      if (fundingValue != ignore) 4: fundingValue as String?,
      if (fundingFact != ignore) 7: fundingFact as String?,
      if (fundingFramework != ignore) 8: fundingFramework as String?,
      if (deMinimis != ignore) 9: deMinimis as bool?,
      if (source != ignore) 10: source as String?,
      if (date != ignore) 11: date as String?,
    });
  }
}

extension FundingProgramUpdate on IsarCollection<int, FundingProgram> {
  _FundingProgramUpdate get update => _FundingProgramUpdateImpl(this);

  _FundingProgramUpdateAll get updateAll => _FundingProgramUpdateAllImpl(this);
}

sealed class _FundingProgramQueryUpdate {
  int call({
    String? name,
    String? fundingValue,
    String? fundingFact,
    String? fundingFramework,
    bool? deMinimis,
    String? source,
    String? date,
  });
}

class _FundingProgramQueryUpdateImpl implements _FundingProgramQueryUpdate {
  const _FundingProgramQueryUpdateImpl(this.query, {this.limit});

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

  @override
  int call({
    Object? name = ignore,
    Object? fundingValue = ignore,
    Object? fundingFact = ignore,
    Object? fundingFramework = ignore,
    Object? deMinimis = ignore,
    Object? source = ignore,
    Object? date = ignore,
  }) {
    return query.updateProperties(limit: limit, {
      if (name != ignore) 1: name as String?,
      if (fundingValue != ignore) 4: fundingValue as String?,
      if (fundingFact != ignore) 7: fundingFact as String?,
      if (fundingFramework != ignore) 8: fundingFramework as String?,
      if (deMinimis != ignore) 9: deMinimis as bool?,
      if (source != ignore) 10: source as String?,
      if (date != ignore) 11: date as String?,
    });
  }
}

extension FundingProgramQueryUpdate on IsarQuery<FundingProgram> {
  _FundingProgramQueryUpdate get updateFirst =>
      _FundingProgramQueryUpdateImpl(this, limit: 1);

  _FundingProgramQueryUpdate get updateAll =>
      _FundingProgramQueryUpdateImpl(this);
}

class _FundingProgramQueryBuilderUpdateImpl
    implements _FundingProgramQueryUpdate {
  const _FundingProgramQueryBuilderUpdateImpl(this.query, {this.limit});

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

  @override
  int call({
    Object? name = ignore,
    Object? fundingValue = ignore,
    Object? fundingFact = ignore,
    Object? fundingFramework = ignore,
    Object? deMinimis = ignore,
    Object? source = ignore,
    Object? date = ignore,
  }) {
    final q = query.build();
    try {
      return q.updateProperties(limit: limit, {
        if (name != ignore) 1: name as String?,
        if (fundingValue != ignore) 4: fundingValue as String?,
        if (fundingFact != ignore) 7: fundingFact as String?,
        if (fundingFramework != ignore) 8: fundingFramework as String?,
        if (deMinimis != ignore) 9: deMinimis as bool?,
        if (source != ignore) 10: source as String?,
        if (date != ignore) 11: date as String?,
      });
    } finally {
      q.close();
    }
  }
}

extension FundingProgramQueryBuilderUpdate
    on QueryBuilder<FundingProgram, FundingProgram, QOperations> {
  _FundingProgramQueryUpdate get updateFirst =>
      _FundingProgramQueryBuilderUpdateImpl(this, limit: 1);

  _FundingProgramQueryUpdate get updateAll =>
      _FundingProgramQueryBuilderUpdateImpl(this);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      regionIsEmpty() {
    return not().group(
      (q) => q.regionIsNull().or().regionIsNotEmpty(),
    );
  }

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      measureTypeIsEmpty() {
    return not().group(
      (q) => q.measureTypeIsNull().or().measureTypeIsNotEmpty(),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingValueIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 4,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingValueIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 4,
          value: '',
        ),
      );
    });
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingFactIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 7,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingFactIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 7,
          value: '',
        ),
      );
    });
  }

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingFrameworkIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 8,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingFrameworkIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 8,
          value: '',
        ),
      );
    });
  }

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      deMinimisEqualTo(
    bool? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 9,
          value: value,
        ),
      );
    });
  }

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      sourceIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 10,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      sourceIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 10,
          value: '',
        ),
      );
    });
  }

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

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

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

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

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

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

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

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

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

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

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

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      dateIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 11,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      dateIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 11,
          value: '',
        ),
      );
    });
  }

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

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

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

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

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

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

extension FundingProgramQueryObject
    on QueryBuilder<FundingProgram, FundingProgram, QFilterCondition> {
  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingCalculation(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 5);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
      fundingFrequency(FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 6);
    });
  }
}

extension FundingProgramQuerySortBy
    on QueryBuilder<FundingProgram, FundingProgram, QSortBy> {
  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        1,
        caseSensitive: caseSensitive,
      );
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByFundingValue(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        4,
        caseSensitive: caseSensitive,
      );
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByFundingFact(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        7,
        caseSensitive: caseSensitive,
      );
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
      sortByFundingFramework({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        8,
        caseSensitive: caseSensitive,
      );
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByDeMinimis() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(9);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
      sortByDeMinimisDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(9, sort: Sort.desc);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortBySource(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        10,
        caseSensitive: caseSensitive,
      );
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByDate(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        11,
        caseSensitive: caseSensitive,
      );
    });
  }

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

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

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

extension FundingProgramQuerySortThenBy
    on QueryBuilder<FundingProgram, FundingProgram, QSortThenBy> {
  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(1, caseSensitive: caseSensitive);
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByFundingValue(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(4, caseSensitive: caseSensitive);
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByFundingFact(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(7, caseSensitive: caseSensitive);
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
      thenByFundingFramework({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(8, caseSensitive: caseSensitive);
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByDeMinimis() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(9);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
      thenByDeMinimisDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(9, sort: Sort.desc);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenBySource(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(10, caseSensitive: caseSensitive);
    });
  }

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

  QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByDate(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(11, caseSensitive: caseSensitive);
    });
  }

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

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

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

extension FundingProgramQueryWhereDistinct
    on QueryBuilder<FundingProgram, FundingProgram, QDistinct> {
  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct> distinctByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(1, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
      distinctByFundingValue({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(4, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
      distinctByFundingFact({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(7, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
      distinctByFundingFramework({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(8, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
      distinctByDeMinimis() {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(9);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct> distinctBySource(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(10, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct> distinctByDate(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(11, caseSensitive: caseSensitive);
    });
  }
}

extension FundingProgramQueryProperty1
    on QueryBuilder<FundingProgram, FundingProgram, QProperty> {
  QueryBuilder<FundingProgram, String?, QAfterProperty> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

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

  QueryBuilder<FundingProgram, List<IdValue>?, QAfterProperty>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<FundingProgram, String?, QAfterProperty> fundingValueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<FundingProgram, IdValueColor?, QAfterProperty>
      fundingCalculationProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<FundingProgram, IdValueColor?, QAfterProperty>
      fundingFrequencyProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<FundingProgram, String?, QAfterProperty> fundingFactProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<FundingProgram, String?, QAfterProperty>
      fundingFrameworkProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<FundingProgram, bool?, QAfterProperty> deMinimisProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<FundingProgram, String?, QAfterProperty> sourceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<FundingProgram, String?, QAfterProperty> dateProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

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

extension FundingProgramQueryProperty2<R>
    on QueryBuilder<FundingProgram, R, QAfterProperty> {
  QueryBuilder<FundingProgram, (R, String?), QAfterProperty> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

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

  QueryBuilder<FundingProgram, (R, List<IdValue>?), QAfterProperty>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<FundingProgram, (R, String?), QAfterProperty>
      fundingValueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

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

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

  QueryBuilder<FundingProgram, (R, String?), QAfterProperty>
      fundingFactProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<FundingProgram, (R, String?), QAfterProperty>
      fundingFrameworkProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<FundingProgram, (R, bool?), QAfterProperty> deMinimisProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<FundingProgram, (R, String?), QAfterProperty> sourceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<FundingProgram, (R, String?), QAfterProperty> dateProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

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

extension FundingProgramQueryProperty3<R1, R2>
    on QueryBuilder<FundingProgram, (R1, R2), QAfterProperty> {
  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

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

  QueryBuilder<FundingProgram, (R1, R2, List<IdValue>?), QOperations>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations>
      fundingValueProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

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

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

  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations>
      fundingFactProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations>
      fundingFrameworkProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<FundingProgram, (R1, R2, bool?), QOperations>
      deMinimisProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations>
      sourceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<FundingProgram, (R1, R2, String?), QOperations> dateProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

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

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

FundingProgram _$FundingProgramFromJson(Map<String, dynamic> json) =>
    FundingProgram()
      ..id = (json['id'] as num).toInt()
      ..name = json['field_2402470'] as String?
      ..region = (json['field_2559837'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..measureType = (json['field_2402539'] as List<dynamic>?)
          ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
          .toList()
      ..fundingValue = json['field_2402788'] as String?
      ..fundingCalculation = json['field_2402790'] == null
          ? null
          : IdValueColor.fromJson(json['field_2402790'] as Map<String, dynamic>)
      ..fundingFrequency = json['field_2402791'] == null
          ? null
          : IdValueColor.fromJson(json['field_2402791'] as Map<String, dynamic>)
      ..fundingFact = json['field_2999937'] as String?
      ..fundingFramework = json['field_2999876'] as String?
      ..deMinimis = json['field_2402792'] as bool?
      ..source = json['field_2999741'] as String?
      ..date = json['field_2999839'] as String?;

Map<String, dynamic> _$FundingProgramToJson(FundingProgram instance) =>
    <String, dynamic>{
      'id': instance.id,
      'field_2402470': instance.name,
      'field_2559837': instance.region?.map((e) => e.toJson()).toList(),
      'field_2402539': instance.measureType?.map((e) => e.toJson()).toList(),
      'field_2402788': instance.fundingValue,
      'field_2402790': instance.fundingCalculation?.toJson(),
      'field_2402791': instance.fundingFrequency?.toJson(),
      'field_2999937': instance.fundingFact,
      'field_2999876': instance.fundingFramework,
      'field_2402792': instance.deMinimis,
      'field_2999741': instance.source,
      'field_2999839': instance.date,
    };
