Class ImmutableRepositoryDispatch.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.requests.ImmutableRepositoryDispatch.Builder
-
- Enclosing class:
- ImmutableRepositoryDispatch
@NotThreadSafe public static final class ImmutableRepositoryDispatch.Builder extends Object
Builds instances of typeImmutableRepositoryDispatch. 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 ImmutableRepositoryDispatchbuild()Builds a newImmutableRepositoryDispatch.ImmutableRepositoryDispatch.BuilderclientPayload(com.fasterxml.jackson.databind.JsonNode clientPayload)Initializes the optional valueclientPayloadto clientPayload.ImmutableRepositoryDispatch.BuilderclientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> clientPayload)Initializes the optional valueclientPayloadto clientPayload.ImmutableRepositoryDispatch.BuildereventType(String eventType)Initializes the value for theeventTypeattribute.ImmutableRepositoryDispatch.Builderfrom(RepositoryDispatch instance)Fill a builder with attribute values from the providedRepositoryDispatchinstance.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder from(RepositoryDispatch instance)
Fill a builder with attribute values from the providedRepositoryDispatchinstance. 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
-
eventType
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder eventType(String eventType)
Initializes the value for theeventTypeattribute.- Parameters:
eventType- The value for eventType- Returns:
thisbuilder for use in a chained invocation
-
clientPayload
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder clientPayload(com.fasterxml.jackson.databind.JsonNode clientPayload)
Initializes the optional valueclientPayloadto clientPayload.- Parameters:
clientPayload- The value for clientPayload- Returns:
thisbuilder for chained invocation
-
clientPayload
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder clientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> clientPayload)
Initializes the optional valueclientPayloadto clientPayload.- Parameters:
clientPayload- The value for clientPayload- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRepositoryDispatch build()
Builds a newImmutableRepositoryDispatch.- Returns:
- An immutable instance of RepositoryDispatch
- Throws:
IllegalStateException- if any required attributes are missing
-
-