private static ProtoParametersSerialization serializeParameters(
      LegacyKmsAeadParameters parameters) throws GeneralSecurityException {
    return ProtoParametersSerialization.create(
        KeyTemplate.newBuilder()
            .setTypeUrl(TYPE_URL)
            .setValue(
                KmsAeadKeyFormat.newBuilder().setKeyUri(parameters.keyUri()).build().toByteString())
            .setOutputPrefixType(toProtoOutputPrefixType(parameters.variant()))
            .build());
  }
Serializers and Parsers for LegacyKmsAeadProtoKey and LegacyKmsAeadProtoParameters
java_src/src/main/java/com/google/crypto/tink/aead/LegacyKmsAeadProtoSerialization.java