diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0023a53
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+/.build
+/Packages
+xcuserdata/
+DerivedData/
+.swiftpm/configuration/registries.json
+.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
+.netrc
diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Package.swift b/Package.swift
new file mode 100644
index 0000000..3207fe1
--- /dev/null
+++ b/Package.swift
@@ -0,0 +1,24 @@
+// swift-tools-version: 5.9
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "ProgrammaticCoreData",
+ platforms: [
+ .macOS(.v14),
+ .iOS(.v17)
+ ],
+ products: [
+ .library(
+ name: "ProgrammaticCoreData",
+ targets: ["ProgrammaticCoreData"]),
+ ],
+ targets: [
+ .target(
+ name: "ProgrammaticCoreData"),
+ .testTarget(
+ name: "ProgrammaticCoreDataTests",
+ dependencies: ["ProgrammaticCoreData"]),
+ ]
+)
diff --git a/Sources/ProgrammaticCoreData/CoreDataCreationError.swift b/Sources/ProgrammaticCoreData/CoreDataCreationError.swift
new file mode 100644
index 0000000..10c32a9
--- /dev/null
+++ b/Sources/ProgrammaticCoreData/CoreDataCreationError.swift
@@ -0,0 +1,8 @@
+// Created by Axel Ancona Esselmann on 2/24/24.
+//
+
+import Foundation
+
+public enum CoreDataCreationError: Error {
+ case storeDescriptionMissing
+}
diff --git a/Sources/ProgrammaticCoreData/EntityDescriptionAttribute.swift b/Sources/ProgrammaticCoreData/EntityDescriptionAttribute.swift
new file mode 100644
index 0000000..5ed1c55
--- /dev/null
+++ b/Sources/ProgrammaticCoreData/EntityDescriptionAttribute.swift
@@ -0,0 +1,91 @@
+// Created by Axel Ancona Esselmann on 2/24/24.
+//
+
+import CoreData
+
+public enum EntityDescriptionAttribute {
+ case undefined(KeyPath)
+ case integer16(KeyPath)
+ case integer32(KeyPath)
+ case integer64(KeyPath)
+ case decimal(KeyPath)
+ case double(KeyPath)
+ case float(KeyPath)
+ case string(KeyPath)
+ case boolean(KeyPath)
+ case date(KeyPath)
+ case binaryData(KeyPath)
+ case uuid(KeyPath)
+ case uri(KeyPath)
+ case transformable(KeyPath)
+ case objectID(KeyPath)
+ case composite(KeyPath)
+
+ public var attributeType: NSAttributeType {
+ switch self {
+ case .undefined:
+ return .undefinedAttributeType
+ case .integer16:
+ return .integer16AttributeType
+ case .integer32:
+ return .integer32AttributeType
+ case .integer64:
+ return .integer64AttributeType
+ case .decimal:
+ return .decimalAttributeType
+ case .double:
+ return .doubleAttributeType
+ case .float:
+ return .floatAttributeType
+ case .string:
+ return .stringAttributeType
+ case .boolean:
+ return .booleanAttributeType
+ case .date:
+ return .dateAttributeType
+ case .binaryData:
+ return .binaryDataAttributeType
+ case .uuid:
+ return .UUIDAttributeType
+ case .uri:
+ return .URIAttributeType
+ case .transformable:
+ return .transformableAttributeType
+ case .objectID:
+ return .objectIDAttributeType
+ case .composite:
+ return .compositeAttributeType
+ }
+ }
+
+ public var keyPath: KeyPath {
+ switch self {
+ case
+ .undefined(let keyPath),
+ .integer16(let keyPath),
+ .integer32(let keyPath),
+ .integer64(let keyPath),
+ .decimal(let keyPath),
+ .double(let keyPath),
+ .float(let keyPath),
+ .string(let keyPath),
+ .boolean(let keyPath),
+ .date(let keyPath),
+ .binaryData(let keyPath),
+ .uuid(let keyPath),
+ .uri(let keyPath),
+ .transformable(let keyPath),
+ .objectID(let keyPath),
+ .composite(let keyPath):
+ return keyPath
+ }
+ }
+
+ public var nsAttributeType: NSAttributeDescription {
+ NSAttributeDescription(
+ name: NSExpression(forKeyPath: keyPath).keyPath,
+ type: attributeType,
+ defaultValue: nil
+ )
+ }
+}
diff --git a/Sources/ProgrammaticCoreData/NSAttributeDescription+Extensions.swift b/Sources/ProgrammaticCoreData/NSAttributeDescription+Extensions.swift
new file mode 100644
index 0000000..aa45166
--- /dev/null
+++ b/Sources/ProgrammaticCoreData/NSAttributeDescription+Extensions.swift
@@ -0,0 +1,13 @@
+// Created by Axel Ancona Esselmann on 2/24/24.
+//
+
+import CoreData
+
+public extension NSAttributeDescription {
+ convenience init(name: String, type: NSAttributeType, defaultValue: Any? = nil) {
+ self.init()
+ self.name = name
+ self.attributeType = type
+ self.defaultValue = defaultValue
+ }
+}
diff --git a/Sources/ProgrammaticCoreData/NSEntityDescription+Extensions.swift b/Sources/ProgrammaticCoreData/NSEntityDescription+Extensions.swift
new file mode 100644
index 0000000..10abcea
--- /dev/null
+++ b/Sources/ProgrammaticCoreData/NSEntityDescription+Extensions.swift
@@ -0,0 +1,999 @@
+// Created by Axel Ancona Esselmann on 2/24/24.
+//
+
+import CoreData
+
+public extension NSEntityDescription {
+
+ convenience init(_ type: EntityType.Type)
+ where EntityType: AnyObject
+ {
+ self.init()
+ let name = NSStringFromClass(type)
+ self.name = name
+ self.managedObjectClassName = name
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(type, properties: [a0.nsAttributeType])
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute,
+ _ a15: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType,
+ a15.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute,
+ _ a15: EntityDescriptionAttribute,
+ _ a16: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType,
+ a15.nsAttributeType,
+ a16.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute,
+ _ a15: EntityDescriptionAttribute,
+ _ a16: EntityDescriptionAttribute,
+ _ a17: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType,
+ a15.nsAttributeType,
+ a16.nsAttributeType,
+ a17.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute,
+ _ a15: EntityDescriptionAttribute,
+ _ a16: EntityDescriptionAttribute,
+ _ a17: EntityDescriptionAttribute,
+ _ a18: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType,
+ a15.nsAttributeType,
+ a16.nsAttributeType,
+ a17.nsAttributeType,
+ a18.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute,
+ _ a5: EntityDescriptionAttribute,
+ _ a6: EntityDescriptionAttribute,
+ _ a7: EntityDescriptionAttribute,
+ _ a8: EntityDescriptionAttribute,
+ _ a9: EntityDescriptionAttribute,
+ _ a10: EntityDescriptionAttribute,
+ _ a11: EntityDescriptionAttribute,
+ _ a12: EntityDescriptionAttribute,
+ _ a13: EntityDescriptionAttribute,
+ _ a14: EntityDescriptionAttribute,
+ _ a15: EntityDescriptionAttribute,
+ _ a16: EntityDescriptionAttribute,
+ _ a17: EntityDescriptionAttribute,
+ _ a18: EntityDescriptionAttribute,
+ _ a19: EntityDescriptionAttribute
+ )
+ where EntityType: AnyObject
+ {
+ self.init(
+ type,
+ properties: [
+ a0.nsAttributeType,
+ a1.nsAttributeType,
+ a2.nsAttributeType,
+ a3.nsAttributeType,
+ a4.nsAttributeType,
+ a5.nsAttributeType,
+ a6.nsAttributeType,
+ a7.nsAttributeType,
+ a8.nsAttributeType,
+ a9.nsAttributeType,
+ a10.nsAttributeType,
+ a11.nsAttributeType,
+ a12.nsAttributeType,
+ a13.nsAttributeType,
+ a14.nsAttributeType,
+ a15.nsAttributeType,
+ a16.nsAttributeType,
+ a17.nsAttributeType,
+ a18.nsAttributeType,
+ a19.nsAttributeType
+ ]
+ )
+ }
+
+ convenience init(
+ _ type: EntityType.Type,
+ properties
+ a0: EntityDescriptionAttribute,
+ _ a1: EntityDescriptionAttribute,
+ _ a2: EntityDescriptionAttribute,
+ _ a3: EntityDescriptionAttribute,
+ _ a4: EntityDescriptionAttribute