java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.GrantBlock

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class GrantBlock extends Object
Capability Grant embedded summary. capabilities mirrors the grant's JSONB capabilities array. Every grant the orchestrator emits carries exactly ONE capability: a use case declaring [ENCRYPT, DECRYPT] yields TWO grants, [\"ENCRYPT\"] and [\"DECRYPT\"], not one grant carrying both. A cross-kid use case yields one grant carrying [\"REENCRYPT\"] (or [\"RESIGN\"]) over the kid pair.
  • Field Details

  • Constructor Details

    • GrantBlock

      public GrantBlock()
  • Method Details

    • capabilities

      public GrantBlock capabilities(@Nullable List<String> capabilities)
    • addCapabilitiesItem

      public GrantBlock addCapabilitiesItem(String capabilitiesItem)
    • getCapabilities

      @Nullable public List<String> getCapabilities()
      Get capabilities
      Returns:
      capabilities
    • setCapabilities

      public void setCapabilities(@Nullable List<String> capabilities)
    • grantId

      public GrantBlock grantId(@Nullable UUID grantId)
    • getGrantId

      @Nullable public UUID getGrantId()
      Get grantId
      Returns:
      grantId
    • setGrantId

      public void setGrantId(@Nullable UUID grantId)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to GrantBlock
    • validateJsonElementAsCandidate

      public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element as a candidate of a oneOf schema: the checks of validateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is not a GrantBlock
    • fromJson

      public static GrantBlock fromJson(String jsonString) throws IOException
      Create an instance of GrantBlock given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of GrantBlock
      Throws:
      IOException - if the JSON string is invalid with respect to GrantBlock
    • toJson

      public String toJson()
      Convert an instance of GrantBlock to an JSON string
      Returns:
      JSON string