     
     public var rawValue: String {
         switch self {
-        case ftp:
+        case .ftp:
             return String(kSecAttrProtocolFTP)
-        case ftpAccount:
+        case .ftpAccount:
             return String(kSecAttrProtocolFTPAccount)
-        case http:
+        case .http:
             return String(kSecAttrProtocolHTTP)
-        case irc:
+        case .irc:
             return String(kSecAttrProtocolIRC)
-        case nntp:
+        case .nntp:
             return String(kSecAttrProtocolNNTP)
-        case pop3:
+        case .pop3:
             return String(kSecAttrProtocolPOP3)
-        case smtp:
+        case .smtp:
             return String(kSecAttrProtocolSMTP)
-        case socks:
+        case .socks:
             return String(kSecAttrProtocolSOCKS)
-        case imap:
+        case .imap:
             return String(kSecAttrProtocolIMAP)
-        case ldap:
+        case .ldap:
             return String(kSecAttrProtocolLDAP)
-        case appleTalk:
+        case .appleTalk:
             return String(kSecAttrProtocolAppleTalk)
-        case afp:
+        case .afp:
             return String(kSecAttrProtocolAFP)
-        case telnet:
+        case .telnet:
             return String(kSecAttrProtocolTelnet)
-        case ssh:
+        case .ssh:
             return String(kSecAttrProtocolSSH)
-        case ftps:
+        case .ftps:
             return String(kSecAttrProtocolFTPS)
-        case https:
+        case .https:
             return String(kSecAttrProtocolHTTPS)
-        case httpProxy:
+        case .httpProxy:
             return String(kSecAttrProtocolHTTPProxy)
-        case httpsProxy:
+        case .httpsProxy:
             return String(kSecAttrProtocolHTTPSProxy)
-        case ftpProxy:
+        case .ftpProxy:
             return String(kSecAttrProtocolFTPProxy)
-        case smb:
+        case .smb:
             return String(kSecAttrProtocolSMB)
-        case rtsp:
+        case .rtsp:
             return String(kSecAttrProtocolRTSP)
-        case rtspProxy:
+        case .rtspProxy:
             return String(kSecAttrProtocolRTSPProxy)
-        case daap:
+        case .daap:
             return String(kSecAttrProtocolDAAP)
-        case eppc:
+        case .eppc:
             return String(kSecAttrProtocolEPPC)
-        case ipp:
+        case .ipp:
             return String(kSecAttrProtocolIPP)
-        case nntps:
+        case .nntps:
             return String(kSecAttrProtocolNNTPS)
-        case ldaps:
+        case .ldaps:
             return String(kSecAttrProtocolLDAPS)
-        case telnetS:
+        case .telnetS:
             return String(kSecAttrProtocolTelnetS)
-        case imaps:
+        case .imaps:
             return String(kSecAttrProtocolIMAPS)
-        case ircs:
+        case .ircs:
             return String(kSecAttrProtocolIRCS)
-        case pop3S:
+        case .pop3S:
             return String(kSecAttrProtocolPOP3S)
         }
     }
     
     public var description : String {
         switch self {
-        case ftp:
+        case .ftp:
             return "FTP"
-        case ftpAccount:
+        case .ftpAccount:
             return "FTPAccount"
-        case http:
+        case .http:
             return "HTTP"
-        case irc:
+        case .irc:
             return "IRC"
-        case nntp:
+        case .nntp:
             return "NNTP"
-        case pop3:
+        case .pop3:
             return "POP3"
-        case smtp:
+        case .smtp:
             return "SMTP"
-        case socks:
+        case .socks:
             return "SOCKS"
-        case imap:
+        case .imap:
             return "IMAP"
-        case ldap:
+        case .ldap:
             return "LDAP"
-        case appleTalk:
+        case .appleTalk:
             return "AppleTalk"
-        case afp:
+        case .afp:
             return "AFP"
-        case telnet:
+        case .telnet:
             return "Telnet"
-        case ssh:
+        case .ssh:
             return "SSH"
-        case ftps:
+        case .ftps:
             return "FTPS"
-        case https:
+        case .https:
             return "HTTPS"
-        case httpProxy:
+        case .httpProxy:
             return "HTTPProxy"
-        case httpsProxy:
+        case .httpsProxy:
             return "HTTPSProxy"
-        case ftpProxy:
+        case .ftpProxy:
             return "FTPProxy"
-        case smb:
+        case .smb:
             return "SMB"
-        case rtsp:
+        case .rtsp:
             return "RTSP"
-        case rtspProxy:
+        case .rtspProxy:
             return "RTSPProxy"
-        case daap:
+        case .daap:
             return "DAAP"
-        case eppc:
+        case .eppc:
             return "EPPC"
-        case ipp:
+        case .ipp:
             return "IPP"
-        case nntps:
+        case .nntps:
             return "NNTPS"
-        case ldaps:
+        case .ldaps:
             return "LDAPS"
-        case telnetS:
+        case .telnetS:
             return "TelnetS"
-        case imaps:
+        case .imaps:
             return "IMAPS"
-        case ircs:
+        case .ircs:
             return "IRCS"
-        case pop3S:
+        case .pop3S:
             return "POP3S"
         }
     }

    public init?(rawValue: String) {
        switch rawValue {
        case String(kSecAttrProtocolFTP):
            self = ftp
        case String(kSecAttrProtocolFTPAccount):
            self = ftpAccount
        case String(kSecAttrProtocolHTTP):
            self = http
        case String(kSecAttrProtocolIRC):
            self = irc
        case String(kSecAttrProtocolNNTP):
            self = nntp
        case String(kSecAttrProtocolPOP3):
            self = pop3
        case String(kSecAttrProtocolSMTP):
            self = smtp
        case String(kSecAttrProtocolSOCKS):
            self = socks
        case String(kSecAttrProtocolIMAP):
            self = imap
        case String(kSecAttrProtocolLDAP):
            self = ldap
        case String(kSecAttrProtocolAppleTalk):
            self = appleTalk
        case String(kSecAttrProtocolAFP):
            self = afp
        case String(kSecAttrProtocolTelnet):
            self = telnet
        case String(kSecAttrProtocolSSH):
            self = ssh
        case String(kSecAttrProtocolFTPS):
            self = ftps
        case String(kSecAttrProtocolHTTPS):
            self = https
        case String(kSecAttrProtocolHTTPProxy):
            self = httpProxy
        case String(kSecAttrProtocolHTTPSProxy):
            self = httpsProxy
        case String(kSecAttrProtocolFTPProxy):
            self = ftpProxy
        case String(kSecAttrProtocolSMB):
            self = smb
        case String(kSecAttrProtocolRTSP):
            self = rtsp
        case String(kSecAttrProtocolRTSPProxy):
            self = rtspProxy
        case String(kSecAttrProtocolDAAP):
            self = daap
        case String(kSecAttrProtocolEPPC):
            self = eppc
        case String(kSecAttrProtocolIPP):
            self = ipp
        case String(kSecAttrProtocolNNTPS):
            self = nntps
        case String(kSecAttrProtocolLDAPS):
            self = ldaps
        case String(kSecAttrProtocolTelnetS):
            self = telnetS
        case String(kSecAttrProtocolIMAPS):
            self = imaps
        case String(kSecAttrProtocolIRCS):
            self = ircs
        case String(kSecAttrProtocolPOP3S):
            self = pop3S
        default:
            return nil
        }

        if #available(OSX 10.10, *) {
            switch rawValue {
            case String(kSecAttrAccessibleWhenUnlocked):
                self = .whenUnlocked
            case String(kSecAttrAccessibleAfterFirstUnlock):
                self = .afterFirstUnlock
            case String(kSecAttrAccessibleAlways):
                self = .always
            case String(kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly):
                self = .whenPasscodeSetThisDeviceOnly
            case String(kSecAttrAccessibleWhenUnlockedThisDeviceOnly):
                self = .whenUnlockedThisDeviceOnly
            case String(kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly):
                self = .afterFirstUnlockThisDeviceOnly
            case String(kSecAttrAccessibleAlwaysThisDeviceOnly):
                self = .alwaysThisDeviceOnly
            default:
                return nil
            }
        } else {
            switch rawValue {
            case String(kSecAttrAccessibleWhenUnlocked):
                self = .whenUnlocked
            case String(kSecAttrAccessibleAfterFirstUnlock):
                self = .afterFirstUnlock
            case String(kSecAttrAccessibleAlways):
                self = .always
            case String(kSecAttrAccessibleWhenUnlockedThisDeviceOnly):
                self = .whenUnlockedThisDeviceOnly
            case String(kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly):
                self = .afterFirstUnlockThisDeviceOnly
            case String(kSecAttrAccessibleAlwaysThisDeviceOnly):
                self = .alwaysThisDeviceOnly
            default:
                return nil
            }
