Record Class ResourcePolicyResult
java.lang.Object
java.lang.Record
codes.grow.packages.awssecretsmanager.ResourcePolicyResult
- Record Components:
arn- full ARNname- secret nameresourcePolicy- the policy JSON text, ornullwhen the secret has no policypolicy- the parsed policy object, ornullwhen there is none or it is not a JSON object
public record ResourcePolicyResult(String arn, String name, String resourcePolicy, com.fasterxml.jackson.databind.JsonNode policy)
extends Record
Result of
getResourcePolicy.-
Constructor Summary
ConstructorsConstructorDescriptionResourcePolicyResult(String arn, String name, String resourcePolicy, com.fasterxml.jackson.databind.JsonNode policy) Creates an instance of aResourcePolicyResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionarn()Returns the value of thearnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.com.fasterxml.jackson.databind.JsonNodepolicy()Returns the value of thepolicyrecord component.Optional<com.fasterxml.jackson.databind.JsonNode> Returns the parsed policy.Returns the value of theresourcePolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourcePolicyResult
public ResourcePolicyResult(String arn, String name, String resourcePolicy, com.fasterxml.jackson.databind.JsonNode policy) Creates an instance of aResourcePolicyResultrecord class.- Parameters:
arn- the value for thearnrecord componentname- the value for thenamerecord componentresourcePolicy- the value for theresourcePolicyrecord componentpolicy- the value for thepolicyrecord component
-
-
Method Details
-
policyJson
Returns the parsed policy.- Returns:
- the policy object, or empty
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
arn
Returns the value of thearnrecord component.- Returns:
- the value of the
arnrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
resourcePolicy
Returns the value of theresourcePolicyrecord component.- Returns:
- the value of the
resourcePolicyrecord component
-
policy
public com.fasterxml.jackson.databind.JsonNode policy()Returns the value of thepolicyrecord component.- Returns:
- the value of the
policyrecord component
-