Class ImmutableSequenceForm.Builder
java.lang.Object
io.jenkins.plugins.trunk.model.event.ImmutableSequenceForm.Builder
- Enclosing class:
ImmutableSequenceForm
Builds instances of type
ImmutableSequenceForm.
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 newImmutableSequenceForm.from(SequenceForm instance) Fill a builder with attribute values from the providedSequenceForminstance.Initializes the value for thekeyattribute.Initializes the value for thekindattribute.Initializes the value for thenameattribute.payload(SequencePayloadForm payload) Initializes the value for thepayloadattribute.Initializes the value for theplatformattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSequenceForminstance. 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
-
platform
Initializes the value for theplatformattribute.- Parameters:
platform- The value for platform- Returns:
thisbuilder for use in a chained invocation
-
kind
Initializes the value for thekindattribute.- Parameters:
kind- The value for kind- Returns:
thisbuilder for use in a chained invocation
-
key
Initializes the value for thekeyattribute.- Parameters:
key- The value for key- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
payload
Initializes the value for thepayloadattribute.- Parameters:
payload- The value for payload- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableSequenceForm.- Returns:
- An immutable instance of SequenceForm
- Throws:
IllegalStateException- if any required attributes are missing
-