Class ImmutableSortRequestParametersDto.Builder
java.lang.Object
fr.enedis.chutney.server.core.domain.tools.ImmutableSortRequestParametersDto.Builder
- Enclosing class:
ImmutableSortRequestParametersDto
@Generated(from="SortRequestParametersDto",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableSortRequestParametersDto.Builder
extends Object
Builds instances of type
ImmutableSortRequestParametersDto.
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 newImmutableSortRequestParametersDto.Initializes the value for thedescattribute.from(SortRequestParametersDto instance) Fill a builder with attribute values from the providedSortRequestParametersDtoinstance.Initializes the value for thesortattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableSortRequestParametersDto.Builder from(SortRequestParametersDto instance) Fill a builder with attribute values from the providedSortRequestParametersDtoinstance. 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
-
sort
@CanIgnoreReturnValue public final ImmutableSortRequestParametersDto.Builder sort(@Nullable String sort) Initializes the value for thesortattribute.- Parameters:
sort- The value for sort (can benull)- Returns:
thisbuilder for use in a chained invocation
-
desc
@CanIgnoreReturnValue public final ImmutableSortRequestParametersDto.Builder desc(@Nullable String desc) Initializes the value for thedescattribute.- Parameters:
desc- The value for desc (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableSortRequestParametersDto.- Returns:
- An immutable instance of SortRequestParametersDto
- Throws:
IllegalStateException- if any required attributes are missing
-