Convert protocol to Swift.