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.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableVerification
build()
Builds a newImmutableVerification
.ImmutableVerification.Builder
from(Verification instance)
Fill a builder with attribute values from the providedVerification
instance.ImmutableVerification.Builder
payload(String payload)
Initializes the value for thepayload
attribute.ImmutableVerification.Builder
reason(String reason)
Initializes the value for thereason
attribute.ImmutableVerification.Builder
signature(String signature)
Initializes the value for thesignature
attribute.ImmutableVerification.Builder
verified(Boolean verified)
Initializes the value for theverified
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableVerification.Builder from(Verification instance)
Fill a builder with attribute values from the providedVerification
instance. 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:
this
builder for use in a chained invocation
-
verified
@CanIgnoreReturnValue public final ImmutableVerification.Builder verified(@Nullable Boolean verified)
Initializes the value for theverified
attribute.- Parameters:
verified
- The value for verified (can benull
)- Returns:
this
builder for use in a chained invocation
-
reason
@CanIgnoreReturnValue public final ImmutableVerification.Builder reason(@Nullable String reason)
Initializes the value for thereason
attribute.- Parameters:
reason
- The value for reason (can benull
)- Returns:
this
builder for use in a chained invocation
-
signature
@CanIgnoreReturnValue public final ImmutableVerification.Builder signature(@Nullable String signature)
Initializes the value for thesignature
attribute.- Parameters:
signature
- The value for signature (can benull
)- Returns:
this
builder for use in a chained invocation
-
payload
@CanIgnoreReturnValue public final ImmutableVerification.Builder payload(@Nullable String payload)
Initializes the value for thepayload
attribute.- Parameters:
payload
- The value for payload (can benull
)- Returns:
this
builder 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
-
-