From 15df8a709f99303636656dc4d8bccbf7e5e8d9cd Mon Sep 17 00:00:00 2001 From: antoniotarricone Date: Fri, 12 Jul 2024 16:47:57 +0200 Subject: [PATCH] Attributes renamed and resorted! --- .../keyvault/keys/bean/DeletedKeyBundle.java | 55 +++++++++++++++++-- ...ureKeyVaultKeysExtReactiveServiceTest.java | 1 - 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/main/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/bean/DeletedKeyBundle.java b/src/main/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/bean/DeletedKeyBundle.java index 3599458..d8e7eba 100644 --- a/src/main/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/bean/DeletedKeyBundle.java +++ b/src/main/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/bean/DeletedKeyBundle.java @@ -5,6 +5,8 @@ */ package it.pagopa.swclient.mil.azureservices.keyvault.keys.bean; +import java.util.Map; + import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; @@ -29,33 +31,74 @@ @RegisterForReflection @Getter @Setter -@Accessors(chain = true) +@Accessors(chain = true, prefix = "del") @ToString @JsonInclude(value = Include.NON_NULL) -public class DeletedKeyBundle extends KeyBundle { +public class DeletedKeyBundle { + /** + *

+ * The key management attributes. + *

+ */ + @JsonProperty("attributes") + private KeyAttributes delAttributes; + /** *

* The time when the key was deleted, in UTC. *

*/ @JsonProperty("deletedDate") - private Long deletedDate; + private Long delDeletedDate; + + /** + *

+ * The Json web key. + *

+ */ + @JsonProperty("key") + private JsonWebKey delKey; + /** + *

+ * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then + * managed will be true. + *

+ */ + @JsonProperty("managed") + private Boolean delManaged; + /** *

* The url of the recovery object, used to identify and recover the deleted key. *

*/ @JsonProperty("recoveryId") - private String recoveryId; + private String delRecoveryId; + /** + *

+ * The policy rules under which the key can be exported. + *

+ */ + @JsonProperty("release_policy") + private KeyReleasePolicy delReleasePolicy; + /** *

* The time when the key is scheduled to be purged, in UTC. *

*/ @JsonProperty("scheduledPurgeDate") - private Long scheduledPurgeDate; + private Long delScheduledPurgeDate; + + /** + *

+ * Application specific metadata in the form of key-value pairs. + *

+ */ + @JsonProperty("tags") + private Map delTags; /** *

@@ -63,6 +106,6 @@ public class DeletedKeyBundle extends KeyBundle { *

*/ public DeletedKeyBundle() { - super(); + // Default constructor. } } diff --git a/src/test/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/service/AzureKeyVaultKeysExtReactiveServiceTest.java b/src/test/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/service/AzureKeyVaultKeysExtReactiveServiceTest.java index 4007ebd..c1fbc53 100644 --- a/src/test/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/service/AzureKeyVaultKeysExtReactiveServiceTest.java +++ b/src/test/java/it/pagopa/swclient/mil/azureservices/keyvault/keys/service/AzureKeyVaultKeysExtReactiveServiceTest.java @@ -26,7 +26,6 @@ import io.quarkus.test.InjectMock; import io.quarkus.test.junit.QuarkusTest; -import io.quarkus.test.junit.mockito.InjectSpy; import io.smallrye.mutiny.Uni; import io.smallrye.mutiny.helpers.test.UniAssertSubscriber; import it.pagopa.swclient.mil.azureservices.keyvault.keys.bean.DeletedKeyBundle;