     }
 }
 
-extension Operation {
-    func generateSwiftFunctionCode() -> String {
-        var code = ""
-
-        if let _ = self.outputShape { }
-        else {
-            code += "@discardableResult "
-        }
-
-        if let shape = self.inputShape {
-            code += "public func \(name.toSwiftVariableCase())(_ input: \(shape.swiftTypeName))"
-        } else {
-            code += "public func \(name.toSwiftVariableCase())()"
-        }
-
-        code += " throws"
-
-        if let shape = self.outputShape {
-            code += " -> Future<\(shape.swiftTypeName)>"
-        } else {
-            code += " -> Future<Void>"
-        }
-
-        code += " {\n"
-
-        code += "\(indt(1))return try client.send("
-
-        code += "operation: \"\(name)\", "
-        code += "path: \"\(path)\", "
-        code += "httpMethod: \"\(httpMethod)\""
-        if inputShape != nil {
-            code += ", "
-            code += "input: input"
-        }
-
-        code += ")\n"
-        code += "}"
-
-        return code
-    }
-}
-
-extension Member {
-    var variableName: String {
-        return name.toSwiftVariableCase()
-    }
-
-    var defaultValue: String {
-        if !required {
-            return "nil"
-        }
-
-        switch shape.type {
-        case .integer(_), .float(_), .double(_), .long(_):
-            return "0"
+extension Shape {
+    public var swiftTypeName: String {
+        switch self.type {
+        case .string(_):
+            return "String"
+        case .integer(_):
+            return "Int32"
+        case .structure(_):
+            return name.toSwiftClassCase()
         case .boolean:
-            return "false"
-        case .blob(_):
-            return "Data()"
+            return "Bool"
+        case .list(let shape):
+            return "[\(shape.swiftTypeName)]"
+        case .map(key: let keyShape, value: let valueShape):
+            return "[\(keyShape.swiftTypeName): \(valueShape.swiftTypeName)]"
+        case .long(_):
+            return "Int64"
+        case .double(_):
+            return "Double"
+        case .float(_):
+            return "Float"
+        case .blob:
+            return "Data"
         case .timestamp:
-            return "Date()"
-        case .list(_):
-            return "[]"
-        case .map(_):
-            return "[:]"
-        case .structure(_):
-            return "\(shape.name)()"
-        default:
-            return "\"\""
-        }
-    }
-
-    func toSwiftMutableMemberSyntax() -> String {
-        let optionalSuffix = required ? "" : "?"
-        return "var \(name.toSwiftVariableCase()): \(swiftTypeName)\(optionalSuffix) = \(defaultValue)"
-    }
-
-    func toSwiftImmutableMemberSyntax() -> String {
-        let optionalSuffix = required ? "" : "?"
-        return "let \(name.toSwiftVariableCase()): \(swiftTypeName)\(optionalSuffix)"
-    }
-
-    func toSwiftArgumentSyntax() -> String {
-        let optionalSuffix = required ? "" : "?"
-        let defaultArgument = required ? "" : " = nil"
-        return "\(name.toSwiftLabelCase()): \(swiftTypeName)\(optionalSuffix)\(defaultArgument)"
-    }
-}
-
-extension AWSShapeMember.Shape {
-    public var enumStyleDescription: String {
-        return ".\(self)"
+            return "TimeStamp"
+        case .enum(_):
+            return name.toSwiftClassCase()
+        case .unhandledType:
+            return "Any"
+        }
+    }
+}
+
+extension String {
+    func allLetterIsNumeric() -> Bool {
+        for character in self {
+            if let ascii = character.unicodeScalars.first?.value, (0x30..<0x39).contains(ascii) {
+                continue
+            } else {
+                return false
+            }
+        }
+        return true
+    }
+}
+
+extension ShapeType {
+    var memberShapeType : AWSShapeMember.Shape {
+        switch self {
+        case .structure:
+            return .structure
+        case .list:
+            return .list
+        case .map:
+            return .map
+        case .enum:
+            return .enum
+        case .boolean:
+            return .boolean
+        case .blob:
+            return .blob
+        case .double:
+            return .double
+        case .float:
+            return .float
+        case .long:
+            return .long
+        case .integer:
+            return .integer
+        case .string:
+            return .string
+        case .timestamp:
+            return .timestamp
+        case .unhandledType:
+            return .any
+        }
     }
 }
 
 extension AWSService {
+    /// Generate the context information for outputting the error enums
     func generateErrorContext() -> [String: Any] {
         var context : [String: Any] = [:]
         context["name"] = serviceName

            var context : [String: Any] = [:]
            context["comment"] = docJSON["operations"][operation.name].stringValue.tagStriped().split(separator: "\n")
            context["funcName"] = operation.name.toSwiftVariableCase()
            context["inputShape"] = operation.inputShape?.toSwiftType()
            context["outputShape"] = operation.outputShape?.toSwiftType()
            context["name"] = operation.name
            context["path"] = operation.path
            context["httpMethod"] = operation.httpMethod

        return context
    }
    
}
