             expectation2.fulfill()
         }
         waitForExpectations()
-        
+
         let description3 = "Continue a conversation with non-empty intents and entities."
         let expectation3 = expectation(description: description3)
-        
-        let text3 = "Rock music."
-        let request3 = MessageRequest(text: text3, context: context, entities: entities, intents: intents, output: output)
-        conversation.message(withWorkspace: workspaceID, request: request3, failure: failWithError) {
+
+        let input3 = InputData(text: "Rock music.")
+        let request3 = MessageRequest(input: input3, context: context, entities: entities, intents: intents, output: output)
+        conversation.message(workspaceID: workspaceID, request: request3, failure: failWithError) {
             response in
-            
+
             // verify objects are non-nil
             XCTAssertNotNil(entities)
             XCTAssertNotNil(intents)
             XCTAssertNotNil(output)
-            
+
             // verify intents are equal
             for i in 0..<response.intents.count {
                 let intent1 = intents![i]

            XCTAssertNil(workspace.intents)
            XCTAssertNil(workspace.entities)
            XCTAssertNil(workspace.counterexamples)
            //XCTAssertNil(workspace.dialogNodes)
            expectation.fulfill()
        }
        waitForExpectations()
    }
    
    func testCreateUpdateAndDeleteWorkspace() {
        var newWorkspace: String?
        
        let description1 = "Create a workspace."
        let expectation1 = expectation(description: description1)
        
        let workspaceName = "swift-sdk-test-workspace"
        let workspaceDescription = "temporary workspace for the swift sdk unit tests"
        let workspaceLanguage = "en"
        let createWorkspaceBody = CreateWorkspace(name: workspaceName, description: workspaceDescription, language: workspaceLanguage)
        conversation.createWorkspace(body: createWorkspaceBody, failure: failWithError) { workspace in
            XCTAssertEqual(workspace.name, workspaceName)
            XCTAssertEqual(workspace.description, workspaceDescription)
            XCTAssertEqual(workspace.language, workspaceLanguage)
            XCTAssertNotNil(workspace.created)
            XCTAssertNotNil(workspace.updated)
            XCTAssertNotNil(workspace.workspaceID)
            
            newWorkspace = workspace.workspaceID
            expectation1.fulfill()
        }
        waitForExpectations()
        
        guard let newWorkspaceID = newWorkspace else {
            XCTFail("Failed to get the ID of the newly created workspace.")
            return
        }
        let description2 = "Update the newly created workspace."
        let expectation2 = expectation(description: description2)
        
        let newWorkspaceName = "swift-sdk-test-workspace-2"
        let newWorkspaceDescription = "new description for the temporary workspace"
        
        let updateWorkspaceBody = UpdateWorkspace(name: newWorkspaceName, description: newWorkspaceDescription)
        conversation.updateWorkspace(workspaceID: newWorkspaceID, body: updateWorkspaceBody, failure: failWithError) { workspace in
            XCTAssertEqual(workspace.name, newWorkspaceName)
            XCTAssertEqual(workspace.description, newWorkspaceDescription)
            XCTAssertEqual(workspace.language, workspaceLanguage)

        conversation.listEntities(workspaceID: workspaceID, failure: failWithError) {entityCollection in
            XCTAssert(entityCollection.entities.count > 0)
            let entity = entityCollection.entities[0]
            self.conversation.getEntity(workspaceID: self.workspaceID, entity: entity.entityName, export: true, failure: self.failWithError) { entityExport in
                XCTAssertEqual(entityExport.entityName, entity.entityName)
                XCTAssertEqual(entityExport.description, entity.description)
                XCTAssertNotNil(entityExport.created)
                XCTAssertNotNil(entityExport.updated)
