Creating an Enum with a Custom Type in Swift 4.x
The code is using Enum, but it's still using Struct.
The program may be buggy if the text value has character |. Suppose that "testFile1.txt|This is sample text" to "testFile1.txt|This is | sample text".


I have another approach with Enum in this case:

 enum Policy {
    case first
    case second
    case third

    var fileName: String {
        switch self {
        case .first: return "testFile1.txt"
        case .second: return "testFile2.txt"
        case .third: return "testFile3.txt"
        }
    }

    var text: String {
        switch self {
            case .first : return "This is sample text"
            case .second: return "This is more sample text"
            case .third: return "This is more sample text"
        }
    }
}
   print(Policy.first.text)