added serialization and deserialization for metadata and produce requests and responses