Class ImmutableAuthorizationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableAuthorizationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,AuthorizationRecordValue
public final class ImmutableAuthorizationRecordValue
extends Object
implements AuthorizationRecordValue
Immutable implementation of
AuthorizationRecordValue.
Use the builder to create immutable instances:
ImmutableAuthorizationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAuthorizationRecordValue.Nested classes/interfaces inherited from interface io.camunda.zeebe.protocol.record.value.AuthorizationRecordValue
AuthorizationRecordValue.PermissionValue -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAuthorizationRecordValue.copyOf(AuthorizationRecordValue instance) Creates an immutable copy of aAuthorizationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableAuthorizationRecordValuethat have equal attribute values.inthashCode()Returns a lazily computed hash code from attributes:action,ownerKey,ownerType,resourceType,permissions.toString()Prints the immutable valueAuthorizationRecordValuewith attribute values.withAction(PermissionAction value) Copy the current immutable object by setting a value for theactionattribute.withOwnerKey(Long value) Copy the current immutable object by setting a value for theownerKeyattribute.Copy the current immutable object by setting a value for theownerTypeattribute.withPermissions(AuthorizationRecordValue.PermissionValue... elements) Copy the current immutable object with elements that replace the content ofpermissions.withPermissions(Iterable<? extends AuthorizationRecordValue.PermissionValue> elements) Copy the current immutable object with elements that replace the content ofpermissions.Copy the current immutable object by setting a value for theresourceTypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getAction
- Specified by:
getActionin interfaceAuthorizationRecordValue- Returns:
- The value of the
actionattribute
-
getOwnerKey
- Specified by:
getOwnerKeyin interfaceAuthorizationRecordValue- Returns:
- The value of the
ownerKeyattribute
-
getOwnerType
- Specified by:
getOwnerTypein interfaceAuthorizationRecordValue- Returns:
- The value of the
ownerTypeattribute
-
getResourceType
- Specified by:
getResourceTypein interfaceAuthorizationRecordValue- Returns:
- The value of the
resourceTypeattribute
-
getPermissions
- Specified by:
getPermissionsin interfaceAuthorizationRecordValue- Returns:
- The value of the
permissionsattribute
-
withAction
Copy the current immutable object by setting a value for theactionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for action (can benull)- Returns:
- A modified copy of the
thisobject
-
withOwnerKey
Copy the current immutable object by setting a value for theownerKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ownerKey (can benull)- Returns:
- A modified copy of the
thisobject
-
withOwnerType
Copy the current immutable object by setting a value for theownerTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ownerType (can benull)- Returns:
- A modified copy of the
thisobject
-
withResourceType
Copy the current immutable object by setting a value for theresourceTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for resourceType (can benull)- Returns:
- A modified copy of the
thisobject
-
withPermissions
public final ImmutableAuthorizationRecordValue withPermissions(AuthorizationRecordValue.PermissionValue... elements) Copy the current immutable object with elements that replace the content ofpermissions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPermissions
public final ImmutableAuthorizationRecordValue withPermissions(Iterable<? extends AuthorizationRecordValue.PermissionValue> elements) Copy the current immutable object with elements that replace the content ofpermissions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of permissions elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableAuthorizationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:action,ownerKey,ownerType,resourceType,permissions. -
toString
Prints the immutable valueAuthorizationRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aAuthorizationRecordValuevalue. 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 AuthorizationRecordValue instance
-
builder
Creates a builder forImmutableAuthorizationRecordValue.ImmutableAuthorizationRecordValue.builder() .withAction(io.camunda.zeebe.protocol.record.value.PermissionAction | null) // nullableaction.withOwnerKey(Long | null) // nullableownerKey.withOwnerType(io.camunda.zeebe.protocol.record.value.AuthorizationOwnerType | null) // nullableownerType.withResourceType(io.camunda.zeebe.protocol.record.value.AuthorizationResourceType | null) // nullableresourceType.addPermission|addAllPermissions(io.camunda.zeebe.protocol.record.value.AuthorizationRecordValue.PermissionValue) //permissionselements .build();- Returns:
- A new ImmutableAuthorizationRecordValue builder
-