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.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 ImmutableRepositoryDispatch
build()
Builds a newImmutableRepositoryDispatch
.ImmutableRepositoryDispatch.Builder
clientPayload(com.fasterxml.jackson.databind.JsonNode clientPayload)
Initializes the optional valueclientPayload
to clientPayload.ImmutableRepositoryDispatch.Builder
clientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> clientPayload)
Initializes the optional valueclientPayload
to clientPayload.ImmutableRepositoryDispatch.Builder
eventType(String eventType)
Initializes the value for theeventType
attribute.ImmutableRepositoryDispatch.Builder
from(RepositoryDispatch instance)
Fill a builder with attribute values from the providedRepositoryDispatch
instance.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder from(RepositoryDispatch instance)
Fill a builder with attribute values from the providedRepositoryDispatch
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
-
eventType
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder eventType(String eventType)
Initializes the value for theeventType
attribute.- Parameters:
eventType
- The value for eventType- Returns:
this
builder for use in a chained invocation
-
clientPayload
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder clientPayload(com.fasterxml.jackson.databind.JsonNode clientPayload)
Initializes the optional valueclientPayload
to clientPayload.- Parameters:
clientPayload
- The value for clientPayload- Returns:
this
builder for chained invocation
-
clientPayload
@CanIgnoreReturnValue public final ImmutableRepositoryDispatch.Builder clientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> clientPayload)
Initializes the optional valueclientPayload
to clientPayload.- Parameters:
clientPayload
- The value for clientPayload- Returns:
this
builder 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
-
-