Class ImmutableDataSetDto

  • All Implemented Interfaces:
    DataSetDto

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableDataSetDto
    extends Object
    implements DataSetDto
    Immutable implementation of DataSetDto.

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

    • Method Detail

      • name

        public String name()
        Specified by:
        name in interface DataSetDto
        Returns:
        The value of the name attribute
      • version

        public Integer version()
        Specified by:
        version in interface DataSetDto
        Returns:
        The value of the version attribute
      • description

        public String description()
        Specified by:
        description in interface DataSetDto
        Returns:
        The value of the description attribute
      • lastUpdated

        public Instant lastUpdated()
        Specified by:
        lastUpdated in interface DataSetDto
        Returns:
        The value of the lastUpdated attribute
      • tags

        public List<String> tags()
        Specified by:
        tags in interface DataSetDto
        Returns:
        The value of the tags attribute
      • withId

        public final ImmutableDataSetDto withId​(String value)
        Copy the current immutable object by setting a present value for the optional id attribute.
        Parameters:
        value - The value for id
        Returns:
        A modified copy of this object
      • withId

        public final ImmutableDataSetDto withId​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for id
        Returns:
        A modified copy of this object
      • withName

        public final ImmutableDataSetDto withName​(String value)
        Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for name
        Returns:
        A modified copy of the this object
      • withVersion

        public final ImmutableDataSetDto withVersion​(Integer value)
        Copy the current immutable object by setting a value for the version attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for version
        Returns:
        A modified copy of the this object
      • withDescription

        public final ImmutableDataSetDto withDescription​(String value)
        Copy the current immutable object by setting a value for the description attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for description
        Returns:
        A modified copy of the this object
      • withLastUpdated

        public final ImmutableDataSetDto withLastUpdated​(Instant value)
        Copy the current immutable object by setting a value for the lastUpdated attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for lastUpdated
        Returns:
        A modified copy of the this object
      • withTags

        public final ImmutableDataSetDto withTags​(String... elements)
        Copy the current immutable object with elements that replace the content of tags.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withTags

        public final ImmutableDataSetDto withTags​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of tags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of tags elements to set
        Returns:
        A modified copy of this object
      • withConstants

        public final ImmutableDataSetDto withConstants​(KeyValue... elements)
        Copy the current immutable object with elements that replace the content of constants.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withConstants

        public final ImmutableDataSetDto withConstants​(Iterable<? extends KeyValue> elements)
        Copy the current immutable object with elements that replace the content of constants. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of constants elements to set
        Returns:
        A modified copy of this object
      • withDatatable

        @SafeVarargs
        public final ImmutableDataSetDto withDatatable​(List<KeyValue>... elements)
        Copy the current immutable object with elements that replace the content of datatable.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withDatatable

        public final ImmutableDataSetDto withDatatable​(Iterable<? extends List<KeyValue>> elements)
        Copy the current immutable object with elements that replace the content of datatable. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of datatable elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableDataSetDto 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: id, name, version, description, lastUpdated, tags, constants, datatable.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableDataSetDto copyOf​(DataSetDto instance)
        Creates an immutable copy of a DataSetDto 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 DataSetDto instance
      • builder

        public static ImmutableDataSetDto.Builder builder()
        Creates a builder for ImmutableDataSetDto.
         ImmutableDataSetDto.builder()
            .id(String) // optional id
            .name(String) // required name
            .version(Integer) // optional version
            .description(String) // optional description
            .lastUpdated(java.time.Instant) // optional lastUpdated
            .addTags|addAllTags(String) // tags elements
            .addConstants|addAllConstants(com.chutneytesting.server.core.domain.tools.ui.KeyValue) // constants elements
            .addDatatable|addAllDatatable(List&lt;com.chutneytesting.server.core.domain.tools.ui.KeyValue&gt;) // datatable elements
            .build();
         
        Returns:
        A new ImmutableDataSetDto builder