private static ProtoParametersSerialization serializeParameters(AesCmacPrfParameters parameters) {
    return ProtoParametersSerialization.create(
        KeyTemplate.newBuilder()
            .setTypeUrl(TYPE_URL)
            .setValue(
                com.google.crypto.tink.proto.AesCmacPrfKeyFormat.newBuilder()
                    .setKeySize(parameters.getKeySizeBytes())
                    .build()
                    .toByteString())
            .setOutputPrefixType(OutputPrefixType.RAW)
            .build());
  }
Methods to serialize and parse {@link AesCmacPrfKey} objects and {@link AesCmacPrfParameters}
objects.
java_src/src/main/java/com/google/crypto/tink/prf/internal/AesCmacPrfProtoSerialization.java