Package com.chutneytesting.dataset.api
Class ImmutableDataSetDto
java.lang.Object
com.chutneytesting.dataset.api.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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDataSetDto. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDataSetDto.Builderbuilder()Creates a builder forImmutableDataSetDto.static ImmutableDataSetDtocopyOf(DataSetDto instance) Creates an immutable copy of aDataSetDtovalue.booleanThis instance is equal to all instances ofImmutableDataSetDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name,version,description,lastUpdated,tags,constants,datatable.id()name()tags()toString()Prints the immutable valueDataSetDtowith attribute values.version()final ImmutableDataSetDtowithConstants(KeyValue... elements) Copy the current immutable object with elements that replace the content ofconstants.final ImmutableDataSetDtowithConstants(Iterable<? extends KeyValue> elements) Copy the current immutable object with elements that replace the content ofconstants.final ImmutableDataSetDtowithDatatable(Iterable<? extends List<KeyValue>> elements) Copy the current immutable object with elements that replace the content ofdatatable.final ImmutableDataSetDtowithDatatable(List<KeyValue>... elements) Copy the current immutable object with elements that replace the content ofdatatable.final ImmutableDataSetDtowithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableDataSetDtoCopy the current immutable object by setting a present value for the optionalidattribute.final ImmutableDataSetDtoCopy the current immutable object by setting an optional value for theidattribute.final ImmutableDataSetDtowithLastUpdated(Instant value) Copy the current immutable object by setting a value for thelastUpdatedattribute.final ImmutableDataSetDtoCopy the current immutable object by setting a value for thenameattribute.final ImmutableDataSetDtoCopy the current immutable object with elements that replace the content oftags.final ImmutableDataSetDtoCopy the current immutable object with elements that replace the content oftags.final ImmutableDataSetDtowithVersion(Integer value) Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
id
- Specified by:
idin interfaceDataSetDto- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein interfaceDataSetDto- Returns:
- The value of the
nameattribute
-
version
- Specified by:
versionin interfaceDataSetDto- Returns:
- The value of the
versionattribute
-
description
- Specified by:
descriptionin interfaceDataSetDto- Returns:
- The value of the
descriptionattribute
-
lastUpdated
- Specified by:
lastUpdatedin interfaceDataSetDto- Returns:
- The value of the
lastUpdatedattribute
-
tags
- Specified by:
tagsin interfaceDataSetDto- Returns:
- The value of the
tagsattribute
-
constants
- Specified by:
constantsin interfaceDataSetDto- Returns:
- The value of the
constantsattribute
-
datatable
- Specified by:
datatablein interfaceDataSetDto- Returns:
- The value of the
datatableattribute
-
withId
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy of
thisobject
-
withId
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for id- Returns:
- A modified copy of
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withLastUpdated
Copy the current immutable object by setting a value for thelastUpdatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lastUpdated- Returns:
- A modified copy of the
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy of
thisobject
-
withConstants
Copy the current immutable object with elements that replace the content ofconstants.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withConstants
Copy the current immutable object with elements that replace the content ofconstants. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of constants elements to set- Returns:
- A modified copy of
thisobject
-
withDatatable
Copy the current immutable object with elements that replace the content ofdatatable.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDatatable
Copy the current immutable object with elements that replace the content ofdatatable. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of datatable elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDataSetDtothat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,version,description,lastUpdated,tags,constants,datatable. -
toString
Prints the immutable valueDataSetDtowith attribute values. -
copyOf
Creates an immutable copy of aDataSetDtovalue. 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
Creates a builder forImmutableDataSetDto.ImmutableDataSetDto.builder() .id(String) // optionalid.name(String) // requiredname.version(Integer) // optionalversion.description(String) // optionaldescription.lastUpdated(java.time.Instant) // optionallastUpdated.addTags|addAllTags(String) //tagselements .addConstants|addAllConstants(com.chutneytesting.server.core.domain.tools.ui.KeyValue) //constantselements .addDatatable|addAllDatatable(List<com.chutneytesting.server.core.domain.tools.ui.KeyValue>) //datatableelements .build();- Returns:
- A new ImmutableDataSetDto builder
-