     public typealias BuilderClosure = (CreateIndexRequestBuilder) -> Void
     
     var name: String?
+    var settings: [String: CodableValue]?
+    var mappings: [String: MappingMetaData]?
+    var aliases: [IndexAlias]?
+    
     
     init() {}
     

        return self
    }
    
    public func build() -> CreateIndexRequest {
        return CreateIndexRequest(withBuilder: self)
    }
}

        }
    }
    
    public var queryParams: [URLQueryItem] {
        get {
            var params = [URLQueryItem]()
            if let includeTypeName = self.includeTypeName {
                params.append(URLQueryItem(name: QueryParams.includeTypeName.rawValue, value: "\(includeTypeName)"))
            }
            return params
        }
    }
    
    public func makeBody(_ serializer: Serializer) -> Result<Data, MakeBodyError> {
        guard self.aliases != nil || self.mappings != nil || self.settings != nil else {
            return .failure(.noBodyForRequest)
        }
        return serializer.encode(self).mapError {
            error -> MakeBodyError in
            return .wrapped(error)
        }
    }
    
    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encodeIfPresent(self.mappings, forKey: .mappings)
        try container.encodeIfPresent(self.settings, forKey: .settings)
        if let aliases = self.aliases {
            let dic = Dictionary(uniqueKeysWithValues: aliases.map{ ($0.name, $0.metaData)})
            try container.encode(dic, forKey: .aliases)
        }
    }
    
    enum CodingKeys: CodingKey {
        case aliases
        case mappings
        case settings
    }
}

