Class ImmutableFeatureRequest.Builder
java.lang.Object
com.iland.core.web.rest.request.feature.ImmutableFeatureRequest.Builder
- Enclosing class:
- ImmutableFeatureRequest
@Generated(from="FeatureRequest",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableFeatureRequest.Builder
extends Object
Builds instances of type
ImmutableFeatureRequest.
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 TypeMethodDescriptionaddAllUsers(Iterable<String> elements) Adds elements touserslist.Adds one element touserslist.Adds elements touserslist.build()Builds a newImmutableFeatureRequest.description(String description) Initializes the optional valuedescriptionto description.description(Optional<String> description) Initializes the optional valuedescriptionto description.Initializes the value for theenabledattribute.from(FeatureRequest instance) Fill a builder with attribute values from the providedFeatureRequestinstance.Initializes the value for thenameattribute.Sets or replaces all elements foruserslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedFeatureRequestinstance. 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
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder description(Optional<String> description) Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
enabled
Initializes the value for theenabledattribute.If not set, this attribute will have a default value as returned by the initializer of
enabled.- Parameters:
enabled- The value for enabled- Returns:
thisbuilder for use in a chained invocation
-
addUsers
Adds one element touserslist.- Parameters:
element- A users element- Returns:
thisbuilder for use in a chained invocation
-
addUsers
Adds elements touserslist.- Parameters:
elements- An array of users elements- Returns:
thisbuilder for use in a chained invocation
-
users
Sets or replaces all elements foruserslist.- Parameters:
elements- An iterable of users elements- Returns:
thisbuilder for use in a chained invocation
-
addAllUsers
@CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder addAllUsers(Iterable<String> elements) Adds elements touserslist.- Parameters:
elements- An iterable of users elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFeatureRequest.- Returns:
- An immutable instance of FeatureRequest
- Throws:
IllegalStateException- if any required attributes are missing
-