Package com.spotify.github.v3.git
Class ImmutableVerification.Builder
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableVerification.Builder
-
- Enclosing class:
- ImmutableVerification
@NotThreadSafe public static final class ImmutableVerification.Builder extends Object
Builds instances of typeImmutableVerification. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableVerificationbuild()Builds a newImmutableVerification.ImmutableVerification.Builderfrom(Verification instance)Fill a builder with attribute values from the providedVerificationinstance.ImmutableVerification.Builderpayload(String payload)Initializes the value for thepayloadattribute.ImmutableVerification.Builderreason(String reason)Initializes the value for thereasonattribute.ImmutableVerification.Buildersignature(String signature)Initializes the value for thesignatureattribute.ImmutableVerification.Builderverified(Boolean verified)Initializes the value for theverifiedattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableVerification.Builder from(Verification instance)
Fill a builder with attribute values from the providedVerificationinstance. 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
-
verified
@CanIgnoreReturnValue public final ImmutableVerification.Builder verified(@Nullable Boolean verified)
Initializes the value for theverifiedattribute.- Parameters:
verified- The value for verified (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reason
@CanIgnoreReturnValue public final ImmutableVerification.Builder reason(@Nullable String reason)
Initializes the value for thereasonattribute.- Parameters:
reason- The value for reason (can benull)- Returns:
thisbuilder for use in a chained invocation
-
signature
@CanIgnoreReturnValue public final ImmutableVerification.Builder signature(@Nullable String signature)
Initializes the value for thesignatureattribute.- Parameters:
signature- The value for signature (can benull)- Returns:
thisbuilder for use in a chained invocation
-
payload
@CanIgnoreReturnValue public final ImmutableVerification.Builder payload(@Nullable String payload)
Initializes the value for thepayloadattribute.- Parameters:
payload- The value for payload (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableVerification build()
Builds a newImmutableVerification.- Returns:
- An immutable instance of Verification
- Throws:
IllegalStateException- if any required attributes are missing
-
-