Class ImmutablePaginationRequestParametersDto.Builder
java.lang.Object
fr.enedis.chutney.server.core.domain.tools.ImmutablePaginationRequestParametersDto.Builder
- Enclosing class:
ImmutablePaginationRequestParametersDto
@Generated(from="PaginationRequestParametersDto",
generator="Immutables")
@NotThreadSafe
public static final class ImmutablePaginationRequestParametersDto.Builder
extends Object
Builds instances of type
ImmutablePaginationRequestParametersDto.
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 TypeMethodDescriptionbuild()Builds a newImmutablePaginationRequestParametersDto.from(PaginationRequestParametersDto instance) Fill a builder with attribute values from the providedPaginationRequestParametersDtoinstance.Initializes the value for thelimitattribute.Initializes the value for thestartattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePaginationRequestParametersDto.Builder from(PaginationRequestParametersDto instance) Fill a builder with attribute values from the providedPaginationRequestParametersDtoinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
start
@CanIgnoreReturnValue public final ImmutablePaginationRequestParametersDto.Builder start(Long start) Initializes the value for thestartattribute.If not set, this attribute will have a default value as returned by the initializer of
start.- Parameters:
start- The value for start- Returns:
thisbuilder for use in a chained invocation
-
limit
@CanIgnoreReturnValue public final ImmutablePaginationRequestParametersDto.Builder limit(Long limit) Initializes the value for thelimitattribute.If not set, this attribute will have a default value as returned by the initializer of
limit.- Parameters:
limit- The value for limit- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePaginationRequestParametersDto.- Returns:
- An immutable instance of PaginationRequestParametersDto
- Throws:
IllegalStateException- if any required attributes are missing
-