Class ImmutablePermissionValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutablePermissionValue.Builder
- Enclosing class:
ImmutablePermissionValue
Builds instances of type
ImmutablePermissionValue.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllResourceIds(Iterable<String> elements) Adds elements toresourceIdslist.addResourceId(String element) Adds one element toresourceIdslist.addResourceIds(String... elements) Adds elements toresourceIdslist.build()Builds a newImmutablePermissionValue.clear()Clear the builder to the initial state.from(AuthorizationRecordValue.PermissionValue instance) Fill a builder with attribute values from the providedPermissionValueinstance.withPermissionType(PermissionType permissionType) Initializes the value for thepermissionTypeattribute.withResourceIds(Iterable<String> elements) Sets or replaces all elements forresourceIdslist.
-
Method Details
-
from
public final ImmutablePermissionValue.Builder from(AuthorizationRecordValue.PermissionValue instance) Fill a builder with attribute values from the providedPermissionValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withPermissionType
Initializes the value for thepermissionTypeattribute.- Parameters:
permissionType- The value for permissionType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addResourceId
Adds one element toresourceIdslist.- Parameters:
element- A resourceIds element- Returns:
thisbuilder for use in a chained invocation
-
addResourceIds
Adds elements toresourceIdslist.- Parameters:
elements- An array of resourceIds elements- Returns:
thisbuilder for use in a chained invocation
-
withResourceIds
Sets or replaces all elements forresourceIdslist.- Parameters:
elements- An iterable of resourceIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllResourceIds
Adds elements toresourceIdslist.- Parameters:
elements- An iterable of resourceIds elements- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePermissionValue.- Returns:
- An immutable instance of PermissionValue
- Throws:
IllegalStateException- if any required attributes are missing
-