Class ImmutableSortRequestParametersDto

java.lang.Object
fr.enedis.chutney.server.core.domain.tools.ImmutableSortRequestParametersDto
All Implemented Interfaces:
SortRequestParametersDto

@Generated(from="SortRequestParametersDto", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSortRequestParametersDto extends Object implements SortRequestParametersDto
Immutable implementation of SortRequestParametersDto.

Use the builder to create immutable instances: ImmutableSortRequestParametersDto.builder().

  • Method Details

    • sort

      @Nullable public String sort()
      Specified by:
      sort in interface SortRequestParametersDto
      Returns:
      The value of the sort attribute
    • desc

      @Nullable public String desc()
      Specified by:
      desc in interface SortRequestParametersDto
      Returns:
      The value of the desc attribute
    • sortParameters

      public List<String> sortParameters()
      Specified by:
      sortParameters in interface SortRequestParametersDto
      Returns:
      The computed-at-construction value of the sortParameters attribute
    • descParameters

      public List<String> descParameters()
      Specified by:
      descParameters in interface SortRequestParametersDto
      Returns:
      The computed-at-construction value of the descParameters attribute
    • withSort

      public final ImmutableSortRequestParametersDto withSort(@Nullable String value)
      Copy the current immutable object by setting a value for the sort attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sort (can be null)
      Returns:
      A modified copy or the this object
    • withDesc

      public final ImmutableSortRequestParametersDto withDesc(@Nullable String value)
      Copy the current immutable object by setting a value for the desc attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for desc (can be null)
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSortRequestParametersDto that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: sort, desc, sortParameters, descParameters.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value SortRequestParametersDto with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a SortRequestParametersDto value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable SortRequestParametersDto instance
    • builder

      Creates a builder for ImmutableSortRequestParametersDto.
       ImmutableSortRequestParametersDto.builder()
          .sort(String | null) // nullable sort
          .desc(String | null) // nullable desc
          .build();
       
      Returns:
      A new ImmutableSortRequestParametersDto builder