private static void throwIfMissingAccess(
      ProtoKeySerialization protoKeySerialization, @Nullable SecretKeyAccess access)
      throws GeneralSecurityException {
    switch (protoKeySerialization.getKeyMaterialType()) {
      case SYMMETRIC:
      case ASYMMETRIC_PRIVATE:
        SecretKeyAccess.requireAccess(access);
        break;
      default:
    }
  }
Returns the string representation. The exact details are unspecified and subject to change.
java_src/src/main/java/com/google/crypto/tink/internal/LegacyProtoKey.java