Light, fluffy, and always free - The AWS Local Emulator alternative
fix: register persisted enums for native-image reflection (#1695)
Hector Ventura04fd34fd2241
diff --git a/src/main/java/io/github/hectorvent/floci/services/cognito/verification/VerificationCode.java b/src/main/java/io/github/hectorvent/floci/services/cognito/verification/VerificationCode.javaindex 6353e3a9b0..4e4a8134f0 100644--- a/src/main/java/io/github/hectorvent/floci/services/cognito/verification/VerificationCode.java+++ b/src/main/java/io/github/hectorvent/floci/services/cognito/verification/VerificationCode.java@@ -2,6 +2,7 @@ package io.github.hectorvent.floci.services.cognito.verification;import com.fasterxml.jackson.annotation.JsonCreator;import com.fasterxml.jackson.annotation.JsonProperty;+import io.quarkus.runtime.annotations.RegisterForReflection;import java.time.Instant;@@ -10,8 +11,10 @@ import java.time.Instant;* password reset, MFA SMS, attribute verification). The actual code is hashed* with a per-code salt so dumps and storage snapshots cannot reveal valid codes.*/+@RegisterForReflectionpublic final class VerificationCode {+ @RegisterForReflectionpublic enum Purpose {SIGNUP_CONFIRMATION,PASSWORD_RESET,diff --git a/src/main/java/io/github/hectorvent/floci/services/eks/model/ClusterStatus.java b/src/main/java/io/github/hectorvent/floci/services/eks/model/ClusterStatus.javaindex 027f9c7a9c..653c22b9e0 100644--- a/src/main/java/io/github/hectorvent/floci/services/eks/model/ClusterStatus.java+++ b/src/main/java/io/github/hectorvent/floci/services/eks/model/ClusterStatus.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.eks.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum ClusterStatus {CREATING, ACTIVE, DELETING, FAILED, UPDATING, DEGRADED}diff --git a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/AuthMode.java b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/AuthMode.javaindex 332c0082d9..f7bb0f657a 100644--- a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/AuthMode.java+++ b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/AuthMode.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.elasticache.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum AuthMode {IAM, PASSWORD, NO_AUTH}diff --git a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/CacheClusterStatus.java b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/CacheClusterStatus.javaindex b417ac75d5..80db4647eb 100644--- a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/CacheClusterStatus.java+++ b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/CacheClusterStatus.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.elasticache.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum CacheClusterStatus {AVAILABLE, CREATING, DELETING}diff --git a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/ReplicationGroupStatus.java b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/ReplicationGroupStatus.javaindex da9491aea3..bd59857129 100644--- a/src/main/java/io/github/hectorvent/floci/services/elasticache/model/ReplicationGroupStatus.java+++ b/src/main/java/io/github/hectorvent/floci/services/elasticache/model/ReplicationGroupStatus.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.elasticache.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum ReplicationGroupStatus {CREATING, AVAILABLE, DELETING}diff --git a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ArchiveState.java b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ArchiveState.javaindex 367c921abe..a74e3c4545 100644--- a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ArchiveState.java+++ b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ArchiveState.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.eventbridge.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum ArchiveState {ENABLED, DISABLED, CREATING, UPDATING, DELETING}diff --git a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ReplayState.java b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ReplayState.javaindex e7ad579d4e..499ed7a55a 100644--- a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ReplayState.java+++ b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/ReplayState.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.eventbridge.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum ReplayState {STARTING, RUNNING, CANCELLING, COMPLETED, CANCELLED, FAILED}diff --git a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/RuleState.java b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/RuleState.javaindex cc57a4c0fc..a5d71d07dd 100644--- a/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/RuleState.java+++ b/src/main/java/io/github/hectorvent/floci/services/eventbridge/model/RuleState.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.eventbridge.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum RuleState {ENABLED,DISABLEDdiff --git a/src/main/java/io/github/hectorvent/floci/services/memorydb/model/AuthMode.java b/src/main/java/io/github/hectorvent/floci/services/memorydb/model/AuthMode.javaindex 1d8e47e0c3..e74933c19e 100644--- a/src/main/java/io/github/hectorvent/floci/services/memorydb/model/AuthMode.java+++ b/src/main/java/io/github/hectorvent/floci/services/memorydb/model/AuthMode.java@@ -1,5 +1,7 @@package io.github.hectorvent.floci.services.memorydb.model;+import io.quarkus.runtime.annotations.RegisterForReflection;+/*** Authentication type of a MemoryDB {@link User}. Mirrors the {@code Type} field of the* real API's {@code AuthenticationMode}/{@code Authentication} structures, whose wire@@ -8,6 +10,7 @@ package io.github.hectorvent.floci.services.memorydb.model;* <p>A cluster does not carry an auth mode of its own — it references an ACL, and the* effective authentication is determined by the auth modes of the users in that ACL.*/+@RegisterForReflectionpublic enum AuthMode {PASSWORD("password"),IAM("iam"),diff --git a/src/main/java/io/github/hectorvent/floci/services/memorydb/model/ClusterStatus.java b/src/main/java/io/github/hectorvent/floci/services/memorydb/model/ClusterStatus.javaindex 0c5f1e0d49..376b7a6eb6 100644--- a/src/main/java/io/github/hectorvent/floci/services/memorydb/model/ClusterStatus.java+++ b/src/main/java/io/github/hectorvent/floci/services/memorydb/model/ClusterStatus.java@@ -1,9 +1,12 @@package io.github.hectorvent.floci.services.memorydb.model;+import io.quarkus.runtime.annotations.RegisterForReflection;+/*** MemoryDB cluster lifecycle states. The wire value is lowercase* (e.g. {@code available}) to match the real AWS MemoryDB API.*/+@RegisterForReflectionpublic enum ClusterStatus {CREATING("creating"),AVAILABLE("available"),diff --git a/src/main/java/io/github/hectorvent/floci/services/pipes/model/DesiredState.java b/src/main/java/io/github/hectorvent/floci/services/pipes/model/DesiredState.javaindex ed731e00a4..129effdc3a 100644--- a/src/main/java/io/github/hectorvent/floci/services/pipes/model/DesiredState.java+++ b/src/main/java/io/github/hectorvent/floci/services/pipes/model/DesiredState.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.pipes.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum DesiredState {RUNNING,STOPPEDdiff --git a/src/main/java/io/github/hectorvent/floci/services/pipes/model/PipeState.java b/src/main/java/io/github/hectorvent/floci/services/pipes/model/PipeState.javaindex 42cf7e5d7b..cadfce12a3 100644--- a/src/main/java/io/github/hectorvent/floci/services/pipes/model/PipeState.java+++ b/src/main/java/io/github/hectorvent/floci/services/pipes/model/PipeState.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.pipes.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum PipeState {RUNNING,STOPPED,diff --git a/src/main/java/io/github/hectorvent/floci/services/rds/model/DatabaseEngine.java b/src/main/java/io/github/hectorvent/floci/services/rds/model/DatabaseEngine.javaindex 161d729279..20244d264a 100644--- a/src/main/java/io/github/hectorvent/floci/services/rds/model/DatabaseEngine.java+++ b/src/main/java/io/github/hectorvent/floci/services/rds/model/DatabaseEngine.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.rds.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum DatabaseEngine {POSTGRES, MYSQL, MARIADB;diff --git a/src/main/java/io/github/hectorvent/floci/services/rds/model/DbInstanceStatus.java b/src/main/java/io/github/hectorvent/floci/services/rds/model/DbInstanceStatus.javaindex 131eb8978b..597804b462 100644--- a/src/main/java/io/github/hectorvent/floci/services/rds/model/DbInstanceStatus.java+++ b/src/main/java/io/github/hectorvent/floci/services/rds/model/DbInstanceStatus.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.rds.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic enum DbInstanceStatus {CREATING, AVAILABLE, DELETING, REBOOTING, MODIFYING}