Class ImmutableExecutionHistory.ExecutionSummary
java.lang.Object
fr.enedis.chutney.server.core.domain.execution.history.ImmutableExecutionHistory.ExecutionSummary
- All Implemented Interfaces:
ExecutionHistory.Attached,ExecutionHistory.ExecutionProperties,ExecutionHistory.ExecutionSummary,ExecutionHistory.WithScenario
- Enclosing class:
ImmutableExecutionHistory
@Generated(from="ExecutionHistory.ExecutionSummary",
generator="Immutables")
@Immutable
@CheckReturnValue
public static final class ImmutableExecutionHistory.ExecutionSummary
extends Object
implements ExecutionHistory.ExecutionSummary
Immutable implementation of
ExecutionHistory.ExecutionSummary.
Use the builder to create immutable instances:
ImmutableExecutionHistory.ExecutionSummary.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forExecutionSummary.copyOf(ExecutionHistory.ExecutionSummary instance) Creates an immutable copy of aExecutionHistory.ExecutionSummaryvalue.dataset()longduration()booleanThis instance is equal to all instances ofExecutionSummarythat have equal attribute values.error()inthashCode()Computes a hash code from attributes:time,duration,status,info,error,testCaseTitle,environment,dataset,user,campaignReport,tags,executionId,scenarioId.info()status()tags()time()toString()Prints the immutable valueExecutionSummarywith attribute values.user()Copy the current immutable object by setting a present value for the optionalcampaignReportattribute.withCampaignReport(Optional<? extends CampaignExecution> optional) Copy the current immutable object by setting an optional value for thecampaignReportattribute.withDataset(DataSet value) Copy the current immutable object by setting a present value for the optionaldatasetattribute.withDataset(Optional<? extends DataSet> optional) Copy the current immutable object by setting an optional value for thedatasetattribute.withDuration(long value) Copy the current immutable object by setting a value for thedurationattribute.withEnvironment(String value) Copy the current immutable object by setting a value for theenvironmentattribute.Copy the current immutable object by setting a present value for the optionalerrorattribute.Copy the current immutable object by setting an optional value for theerrorattribute.withExecutionId(Long value) Copy the current immutable object by setting a value for theexecutionIdattribute.Copy the current immutable object by setting a present value for the optionalinfoattribute.Copy the current immutable object by setting an optional value for theinfoattribute.withScenarioId(String value) Copy the current immutable object by setting a value for thescenarioIdattribute.withStatus(ServerReportStatus value) Copy the current immutable object by setting a value for thestatusattribute.Copy the current immutable object by setting an optional value for thetagsattribute.Copy the current immutable object by setting a present value for the optionaltagsattribute.withTestCaseTitle(String value) Copy the current immutable object by setting a value for thetestCaseTitleattribute.withTime(LocalDateTime value) Copy the current immutable object by setting a value for thetimeattribute.Copy the current immutable object by setting a value for theuserattribute.
-
Method Details
-
time
- Specified by:
timein interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
timeattribute
-
duration
public long duration()- Specified by:
durationin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
durationattribute
-
status
- Specified by:
statusin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
statusattribute
-
info
- Specified by:
infoin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
infoattribute
-
error
- Specified by:
errorin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
errorattribute
-
testCaseTitle
- Specified by:
testCaseTitlein interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
testCaseTitleattribute
-
environment
- Specified by:
environmentin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
environmentattribute
-
dataset
- Specified by:
datasetin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
datasetattribute
-
user
- Specified by:
userin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
userattribute
-
campaignReport
- Specified by:
campaignReportin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
campaignReportattribute
-
tags
- Specified by:
tagsin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
tagsattribute
-
executionId
- Specified by:
executionIdin interfaceExecutionHistory.Attached- Returns:
- The value of the
executionIdattribute
-
scenarioId
- Specified by:
scenarioIdin interfaceExecutionHistory.WithScenario- Returns:
- The value of the
scenarioIdattribute
-
withTime
Copy the current immutable object by setting a value for thetimeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for time- Returns:
- A modified copy or the
thisobject
-
withDuration
Copy the current immutable object by setting a value for thedurationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for duration- Returns:
- A modified copy or the
thisobject
-
withStatus
Copy the current immutable object by setting a value for thestatusattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status- Returns:
- A modified copy or the
thisobject
-
withInfo
Copy the current immutable object by setting a present value for the optionalinfoattribute.- Parameters:
value- The value for info- Returns:
- A modified copy or
thisif not changed
-
withInfo
Copy the current immutable object by setting an optional value for theinfoattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for info- Returns:
- A modified copy or
thisif not changed
-
withError
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error- Returns:
- A modified copy or
thisif not changed
-
withError
Copy the current immutable object by setting an optional value for theerrorattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for error- Returns:
- A modified copy or
thisif not changed
-
withTestCaseTitle
Copy the current immutable object by setting a value for thetestCaseTitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for testCaseTitle- Returns:
- A modified copy or the
thisobject
-
withEnvironment
Copy the current immutable object by setting a value for theenvironmentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for environment- Returns:
- A modified copy or the
thisobject
-
withDataset
Copy the current immutable object by setting a present value for the optionaldatasetattribute.- Parameters:
value- The value for dataset- Returns:
- A modified copy or
thisif not changed
-
withDataset
public final ImmutableExecutionHistory.ExecutionSummary withDataset(Optional<? extends DataSet> optional) Copy the current immutable object by setting an optional value for thedatasetattribute. A shallow reference equality check on the inner value is used to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for dataset- Returns:
- A modified copy or
thisif not changed
-
withUser
Copy the current immutable object by setting a value for theuserattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user- Returns:
- A modified copy or the
thisobject
-
withCampaignReport
Copy the current immutable object by setting a present value for the optionalcampaignReportattribute.- Parameters:
value- The value for campaignReport- Returns:
- A modified copy or
thisif not changed
-
withCampaignReport
public final ImmutableExecutionHistory.ExecutionSummary withCampaignReport(Optional<? extends CampaignExecution> optional) Copy the current immutable object by setting an optional value for thecampaignReportattribute. A shallow reference equality check on the inner value is used to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for campaignReport- Returns:
- A modified copy or
thisif not changed
-
withTags
Copy the current immutable object by setting a present value for the optionaltagsattribute.- Parameters:
value- The value for tags- Returns:
- A modified copy or
thisif not changed
-
withTags
public final ImmutableExecutionHistory.ExecutionSummary withTags(Optional<? extends Set<String>> optional) Copy the current immutable object by setting an optional value for thetagsattribute. A shallow reference equality check on the inner value is used to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for tags- Returns:
- A modified copy or
thisif not changed
-
withExecutionId
Copy the current immutable object by setting a value for theexecutionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for executionId- Returns:
- A modified copy or the
thisobject
-
withScenarioId
Copy the current immutable object by setting a value for thescenarioIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scenarioId- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofExecutionSummarythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:time,duration,status,info,error,testCaseTitle,environment,dataset,user,campaignReport,tags,executionId,scenarioId. -
toString
Prints the immutable valueExecutionSummarywith attribute values. -
copyOf
public static ImmutableExecutionHistory.ExecutionSummary copyOf(ExecutionHistory.ExecutionSummary instance) Creates an immutable copy of aExecutionHistory.ExecutionSummaryvalue. 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 ExecutionSummary instance
-
builder
Creates a builder forExecutionSummary.ImmutableExecutionHistory.ExecutionSummary.builder() .time(java.time.LocalDateTime) // requiredtime.duration(long) // requiredduration.status(fr.enedis.chutney.server.core.domain.execution.report.ServerReportStatus) // requiredstatus.info(Optional<String>) // optionalinfo.error(Optional<String>) // optionalerror.testCaseTitle(String) // requiredtestCaseTitle.environment(String) // requiredenvironment.dataset(Optional<fr.enedis.chutney.server.core.domain.dataset.DataSet>) // optionaldataset.user(String) // requireduser.campaignReport(Optional<fr.enedis.chutney.server.core.domain.scenario.campaign.CampaignExecution>) // optionalcampaignReport.tags(Optional<Set<String>>) // optionaltags.executionId(Long) // requiredexecutionId.scenarioId(String) // requiredscenarioId.build();- Returns:
- A new ExecutionSummary builder
-