Class ActionAvailability
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.ActionAvailability
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class ActionAvailability
extends Object
Per-action capability flag computed server-side. Indicates whether a lifecycle action is permitted for the current key state and caller authorities. The optional 'reason' is populated only when 'allowed' is false and is suitable for direct end-user display.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ActionAvailabilityCreate an instance of ActionAvailability given an JSON stringTrue when the corresponding action is permitted in the current key state and the caller holds the required scope.End-user-displayable rationale when 'allowed' is false.inthashCode()voidsetAllowed(Boolean allowed) voidtoJson()Convert an instance of ActionAvailability to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.
-
Field Details
-
SERIALIZED_NAME_ALLOWED
- See Also:
-
SERIALIZED_NAME_REASON
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ActionAvailability
public ActionAvailability()
-
-
Method Details
-
allowed
-
getAllowed
True when the corresponding action is permitted in the current key state and the caller holds the required scope.- Returns:
- allowed
-
setAllowed
-
reason
-
getReason
End-user-displayable rationale when 'allowed' is false. Omitted (null) when 'allowed' is true. The literal string 'Insufficient privileges' indicates the caller lacks the required scope; no scope name is leaked.- Returns:
- reason
-
setReason
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 ActionAvailability
-
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 ofvalidateJsonElement(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 ActionAvailability
-
fromJson
Create an instance of ActionAvailability given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ActionAvailability
- Throws:
IOException- if the JSON string is invalid with respect to ActionAvailability
-
toJson
Convert an instance of ActionAvailability to an JSON string- Returns:
- JSON string
-