def as_config_dict(self) -> "AnyDict":
if not self.config:
return {}
data = dict(self.config)
for key, enum in (
("compression.codec", CompressionCodec),
("compression.type", CompressionType),
("client.dns.lookup", ClientDNSLookup),
("offset.store.method", OffsetStoreMethod),
("isolation.level", IsolationLevel),
("sasl.oauthbearer.method", SASLOAUTHBearerMethod),
("security.protocol", SecurityProtocol),
("broker.address.family", BrokerAddressFamily),
("builtin.features", BuiltinFeatures),
("debug", Debug),
("group.protocol", GroupProtocol),
):
if key in data:
data[key] = enum(data[key]).value
return data