Class ImmutablePermissionValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutablePermissionValue
- All Implemented Interfaces:
AuthorizationRecordValue.PermissionValue
public final class ImmutablePermissionValue
extends Object
implements AuthorizationRecordValue.PermissionValue
Immutable implementation of
AuthorizationRecordValue.PermissionValue.
Use the builder to create immutable instances:
ImmutablePermissionValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePermissionValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutablePermissionValue.static ImmutablePermissionValueCreates an immutable copy of aAuthorizationRecordValue.PermissionValuevalue.booleanThis instance is equal to all instances ofImmutablePermissionValuethat have equal attribute values.Returns the type of permission for the resourceIds in this objectReturns the resourceIds of this permissioninthashCode()Returns a lazily computed hash code from attributes:permissionType,resourceIds.toString()Prints the immutable valuePermissionValuewith attribute values.final ImmutablePermissionValuewithPermissionType(PermissionType value) Copy the current immutable object by setting a value for thepermissionTypeattribute.final ImmutablePermissionValuewithResourceIds(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofresourceIds.final ImmutablePermissionValuewithResourceIds(String... elements) Copy the current immutable object with elements that replace the content ofresourceIds.
-
Method Details
-
getPermissionType
Returns the type of permission for the resourceIds in this object- Specified by:
getPermissionTypein interfaceAuthorizationRecordValue.PermissionValue
-
getResourceIds
Returns the resourceIds of this permission- Specified by:
getResourceIdsin interfaceAuthorizationRecordValue.PermissionValue
-
withPermissionType
Copy the current immutable object by setting a value for thepermissionTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for permissionType (can benull)- Returns:
- A modified copy of the
thisobject
-
withResourceIds
Copy the current immutable object with elements that replace the content ofresourceIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withResourceIds
Copy the current immutable object with elements that replace the content ofresourceIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of resourceIds elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutablePermissionValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:permissionType,resourceIds. -
toString
Prints the immutable valuePermissionValuewith attribute values. -
copyOf
Creates an immutable copy of aAuthorizationRecordValue.PermissionValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PermissionValue instance
-
builder
Creates a builder forImmutablePermissionValue.ImmutablePermissionValue.builder() .withPermissionType(io.camunda.zeebe.protocol.record.value.PermissionType | null) // nullablepermissionType.addResourceId|addAllResourceIds(String) //resourceIdselements .build();- Returns:
- A new ImmutablePermissionValue builder
-