Class ImmutablePaginationRequestWrapperDto.Builder<W>
java.lang.Object
fr.enedis.chutney.server.core.domain.tools.ImmutablePaginationRequestWrapperDto.Builder<W>
- Enclosing class:
ImmutablePaginationRequestWrapperDto<W>
@Generated(from="PaginationRequestWrapperDto",
generator="Immutables")
@NotThreadSafe
public static final class ImmutablePaginationRequestWrapperDto.Builder<W>
extends Object
Builds instances of type
ImmutablePaginationRequestWrapperDto.
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 newImmutablePaginationRequestWrapperDto.elementPerPage(Integer elementPerPage) Initializes the value for theelementPerPageattribute.from(PaginationRequestWrapperDto<W> instance) Fill a builder with attribute values from the providedPaginationRequestWrapperDtoinstance.pageNumber(Integer pageNumber) Initializes the value for thepageNumberattribute.wrappedRequest(Optional<W> wrappedRequest) Initializes the value for thewrappedRequestattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> from(PaginationRequestWrapperDto<W> instance) Fill a builder with attribute values from the providedPaginationRequestWrapperDtoinstance. 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
-
pageNumber
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> pageNumber(Integer pageNumber) Initializes the value for thepageNumberattribute.- Parameters:
pageNumber- The value for pageNumber- Returns:
thisbuilder for use in a chained invocation
-
elementPerPage
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> elementPerPage(Integer elementPerPage) Initializes the value for theelementPerPageattribute.- Parameters:
elementPerPage- The value for elementPerPage- Returns:
thisbuilder for use in a chained invocation
-
wrappedRequest
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> wrappedRequest(Optional<W> wrappedRequest) Initializes the value for thewrappedRequestattribute.If not set, this attribute will have a default value as returned by the initializer of
wrappedRequest.- Parameters:
wrappedRequest- The value for wrappedRequest- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePaginationRequestWrapperDto.- Returns:
- An immutable instance of PaginationRequestWrapperDto
- Throws:
IllegalStateException- if any required attributes are missing
-