Class ImmutableTestCaseEditionDto.Builder
java.lang.Object
fr.enedis.chutney.design.api.editionlock.ImmutableTestCaseEditionDto.Builder
- Enclosing class:
ImmutableTestCaseEditionDto
@Generated(from="TestCaseEditionDto",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableTestCaseEditionDto.Builder
extends Object
Builds instances of type
ImmutableTestCaseEditionDto.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableTestCaseEditionDto.editionStartDate(Instant editionStartDate) Initializes the value for theeditionStartDateattribute.editionUser(String editionUser) Initializes the value for theeditionUserattribute.from(TestCaseEditionDto instance) Fill a builder with attribute values from the providedTestCaseEditionDtoinstance.testCaseId(String testCaseId) Initializes the value for thetestCaseIdattribute.testCaseVersion(Integer testCaseVersion) Initializes the value for thetestCaseVersionattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableTestCaseEditionDto.Builder from(TestCaseEditionDto instance) Fill a builder with attribute values from the providedTestCaseEditionDtoinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
testCaseId
@CanIgnoreReturnValue public final ImmutableTestCaseEditionDto.Builder testCaseId(String testCaseId) Initializes the value for thetestCaseIdattribute.- Parameters:
testCaseId- The value for testCaseId- Returns:
thisbuilder for use in a chained invocation
-
testCaseVersion
@CanIgnoreReturnValue public final ImmutableTestCaseEditionDto.Builder testCaseVersion(Integer testCaseVersion) Initializes the value for thetestCaseVersionattribute.- Parameters:
testCaseVersion- The value for testCaseVersion- Returns:
thisbuilder for use in a chained invocation
-
editionStartDate
@CanIgnoreReturnValue public final ImmutableTestCaseEditionDto.Builder editionStartDate(Instant editionStartDate) Initializes the value for theeditionStartDateattribute.- Parameters:
editionStartDate- The value for editionStartDate- Returns:
thisbuilder for use in a chained invocation
-
editionUser
@CanIgnoreReturnValue public final ImmutableTestCaseEditionDto.Builder editionUser(String editionUser) Initializes the value for theeditionUserattribute.- Parameters:
editionUser- The value for editionUser- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTestCaseEditionDto.- Returns:
- An immutable instance of TestCaseEditionDto
- Throws:
IllegalStateException- if any required attributes are missing
-