patchWithProductOptionTranslation method

ProductOptionTranslation patchWithProductOptionTranslation([
  1. ProductOptionTranslationPatch? patchInput
])

Implementation

ProductOptionTranslation patchWithProductOptionTranslation([
  ProductOptionTranslationPatch? patchInput,
]) {
  final _patcher = patchInput ?? ProductOptionTranslationPatch();
  final _patchMap = _patcher.patchMap;
  return ProductOptionTranslation(
    createdAt: _patchMap.containsKey(ProductOptionTranslation$.createdAt)
        ? ((_patchMap[ProductOptionTranslation$.createdAt] is Function)
                  ? _patchMap[ProductOptionTranslation$.createdAt](
                      this.createdAt,
                    )
                  : (_patchMap[ProductOptionTranslation$.createdAt] is Patch)
                  ? _patchMap[ProductOptionTranslation$.createdAt].applyTo(
                      this.createdAt,
                    )
                  : _patchMap[ProductOptionTranslation$.createdAt])
              as DateTime
        : this.createdAt,
    id: _patchMap.containsKey(ProductOptionTranslation$.id)
        ? ((_patchMap[ProductOptionTranslation$.id] is Function)
                  ? _patchMap[ProductOptionTranslation$.id](this.id)
                  : (_patchMap[ProductOptionTranslation$.id] is Patch)
                  ? _patchMap[ProductOptionTranslation$.id].applyTo(this.id)
                  : _patchMap[ProductOptionTranslation$.id])
              as String
        : this.id,
    languageCode:
        _patchMap.containsKey(ProductOptionTranslation$.languageCode)
        ? ((_patchMap[ProductOptionTranslation$.languageCode] is Function)
                  ? _patchMap[ProductOptionTranslation$.languageCode](
                      this.languageCode,
                    )
                  : (_patchMap[ProductOptionTranslation$.languageCode]
                        is Patch)
                  ? _patchMap[ProductOptionTranslation$.languageCode].applyTo(
                      this.languageCode,
                    )
                  : _patchMap[ProductOptionTranslation$.languageCode])
              as LanguageCode
        : this.languageCode,
    name: _patchMap.containsKey(ProductOptionTranslation$.name_)
        ? ((_patchMap[ProductOptionTranslation$.name_] is Function)
                  ? _patchMap[ProductOptionTranslation$.name_](this.name)
                  : (_patchMap[ProductOptionTranslation$.name_] is Patch)
                  ? _patchMap[ProductOptionTranslation$.name_].applyTo(
                      this.name,
                    )
                  : _patchMap[ProductOptionTranslation$.name_])
              as String
        : this.name,
    updatedAt: _patchMap.containsKey(ProductOptionTranslation$.updatedAt)
        ? ((_patchMap[ProductOptionTranslation$.updatedAt] is Function)
                  ? _patchMap[ProductOptionTranslation$.updatedAt](
                      this.updatedAt,
                    )
                  : (_patchMap[ProductOptionTranslation$.updatedAt] is Patch)
                  ? _patchMap[ProductOptionTranslation$.updatedAt].applyTo(
                      this.updatedAt,
                    )
                  : _patchMap[ProductOptionTranslation$.updatedAt])
              as DateTime
        : this.updatedAt,
  );
}