func NewCodec( encoder runtime.Encoder, decoder runtime.Decoder, convertor runtime.ObjectConvertor, creater runtime.ObjectCreater, typer runtime.ObjectTyper, defaulter runtime.ObjectDefaulter, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, originalSchemeName string, ) runtime.Codec
NewCodec takes objects in their internal versions and converts them to external versions before serializing them. It assumes the serializer provided to it only deals with external versions. This class is also a serializer, but is generally used with a specific version.
NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme.
DirectDecoder was moved and renamed to runtime.WithoutVersionDecoder in 1.15. TODO: remove in 1.16.
DirectEncoder was moved and renamed to runtime.WithVersionEncoder in 1.15. TODO: remove in 1.16.