Package fr.enedis.chutney.dataset.api
Class ImmutableDataSetDto
java.lang.Object
fr.enedis.chutney.dataset.api.ImmutableDataSetDto
- All Implemented Interfaces:
DataSetDto
@Generated(from="DataSetDto",
generator="Immutables")
@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,description,lastUpdated,tags,constants,datatable,scenarioUsage,campaignUsage,scenarioInCampaignUsage.id()name()tags()toString()Prints the immutable valueDataSetDtowith attribute values.final ImmutableDataSetDtowithCampaignUsage(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofcampaignUsage.final ImmutableDataSetDtowithCampaignUsage(String... elements) Copy the current immutable object with elements that replace the content ofcampaignUsage.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 ImmutableDataSetDtowithScenarioInCampaignUsage(Map<String, ? extends Set<String>> entries) Copy the current immutable object by replacing thescenarioInCampaignUsagemap with the specified map.final ImmutableDataSetDtowithScenarioUsage(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofscenarioUsage.final ImmutableDataSetDtowithScenarioUsage(String... elements) Copy the current immutable object with elements that replace the content ofscenarioUsage.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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface fr.enedis.chutney.dataset.api.DataSetDto
duplicatedHeaders
-
Method Details
-
id
- Specified by:
idin interfaceDataSetDto- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein interfaceDataSetDto- Returns:
- The value of the
nameattribute
-
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
-
scenarioUsage
- Specified by:
scenarioUsagein interfaceDataSetDto- Returns:
- The value of the
scenarioUsageattribute
-
campaignUsage
- Specified by:
campaignUsagein interfaceDataSetDto- Returns:
- The value of the
campaignUsageattribute
-
scenarioInCampaignUsage
- Specified by:
scenarioInCampaignUsagein interfaceDataSetDto- Returns:
- The value of the
scenarioInCampaignUsageattribute
-
withId
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy or
thisif not changed
-
withId
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for id- Returns:
- A modified copy or
thisif not changed
-
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 or 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 or 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 or 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 or
thisif not changed
-
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 or
thisif not changed
-
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 or
thisif not changed
-
withScenarioUsage
Copy the current immutable object with elements that replace the content ofscenarioUsage.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withScenarioUsage
Copy the current immutable object with elements that replace the content ofscenarioUsage. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of scenarioUsage elements to set- Returns:
- A modified copy or
thisif not changed
-
withCampaignUsage
Copy the current immutable object with elements that replace the content ofcampaignUsage.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCampaignUsage
Copy the current immutable object with elements that replace the content ofcampaignUsage. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of campaignUsage elements to set- Returns:
- A modified copy or
thisif not changed
-
withScenarioInCampaignUsage
public final ImmutableDataSetDto withScenarioInCampaignUsage(Map<String, ? extends Set<String>> entries) Copy the current immutable object by replacing thescenarioInCampaignUsagemap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to replace the scenarioInCampaignUsage map- Returns:
- A modified copy or
thisif not changed
-
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,description,lastUpdated,tags,constants,datatable,scenarioUsage,campaignUsage,scenarioInCampaignUsage. -
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(Optional<String>) // optionalid.name(String) // requiredname.description(String) // optionaldescription.lastUpdated(java.time.Instant) // optionallastUpdated.addTags|addAllTags(String) //tagselements .addConstants|addAllConstants(fr.enedis.chutney.dataset.api.KeyValue) //constantselements .addDatatable|addAllDatatable(List<fr.enedis.chutney.dataset.api.KeyValue>) //datatableelements .addScenarioUsage|addAllScenarioUsage(String) //scenarioUsageelements .addCampaignUsage|addAllCampaignUsage(String) //campaignUsageelements .putScenarioInCampaignUsage|putAllScenarioInCampaignUsage(String => Set<String>) //scenarioInCampaignUsagemappings .build();- Returns:
- A new ImmutableDataSetDto builder
-