Package com.spotify.github.v3.repos
Class ImmutableStatus.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableStatus.Builder
-
- Enclosing class:
- ImmutableStatus
@NotThreadSafe public static final class ImmutableStatus.Builder extends Object
Builds instances of typeImmutableStatus. 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 ImmutableStatusbuild()Builds a newImmutableStatus.ImmutableStatus.Buildercontext(String context)Initializes the optional valuecontextto context.ImmutableStatus.Buildercontext(Optional<String> context)Initializes the optional valuecontextto context.ImmutableStatus.BuildercreatedAt(GitHubInstant createdAt)Initializes the value for thecreatedAtattribute.ImmutableStatus.Buildercreator(User creator)Initializes the optional valuecreatorto creator.ImmutableStatus.Buildercreator(Optional<? extends User> creator)Initializes the optional valuecreatorto creator.ImmutableStatus.BuilderdeploymentUrl(URI deploymentUrl)Initializes the optional valuedeploymentUrlto deploymentUrl.ImmutableStatus.BuilderdeploymentUrl(Optional<? extends URI> deploymentUrl)Initializes the optional valuedeploymentUrlto deploymentUrl.ImmutableStatus.Builderdescription(String description)Initializes the optional valuedescriptionto description.ImmutableStatus.Builderdescription(Optional<String> description)Initializes the optional valuedescriptionto description.ImmutableStatus.Builderfrom(UpdateTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.ImmutableStatus.Builderfrom(Status instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.repos.Statusinstance.ImmutableStatus.Builderid(Long id)Initializes the value for theidattribute.ImmutableStatus.BuilderrepositoryUrl(URI repositoryUrl)Initializes the optional valuerepositoryUrlto repositoryUrl.ImmutableStatus.BuilderrepositoryUrl(Optional<? extends URI> repositoryUrl)Initializes the optional valuerepositoryUrlto repositoryUrl.ImmutableStatus.Builderstate(String state)Initializes the value for thestateattribute.ImmutableStatus.BuildertargetUrl(URI targetUrl)Initializes the optional valuetargetUrlto targetUrl.ImmutableStatus.BuildertargetUrl(Optional<? extends URI> targetUrl)Initializes the optional valuetargetUrlto targetUrl.ImmutableStatus.BuilderupdatedAt(GitHubInstant updatedAt)Initializes the value for theupdatedAtattribute.ImmutableStatus.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableStatus.Builder from(Status instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.repos.Statusinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableStatus.Builder from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableStatus.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableStatus.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAtattribute.- Parameters:
updatedAt- The value for updatedAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutableStatus.Builder state(@Nullable String state)
Initializes the value for thestateattribute.- Parameters:
state- The value for state (can benull)- Returns:
thisbuilder for use in a chained invocation
-
targetUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder targetUrl(URI targetUrl)
Initializes the optional valuetargetUrlto targetUrl.- Parameters:
targetUrl- The value for targetUrl- Returns:
thisbuilder for chained invocation
-
targetUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder targetUrl(Optional<? extends URI> targetUrl)
Initializes the optional valuetargetUrlto targetUrl.- Parameters:
targetUrl- The value for targetUrl- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableStatus.Builder description(String description)
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableStatus.Builder description(Optional<String> description)
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableStatus.Builder id(@Nullable Long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableStatus.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
context
@CanIgnoreReturnValue public final ImmutableStatus.Builder context(String context)
Initializes the optional valuecontextto context.- Parameters:
context- The value for context- Returns:
thisbuilder for chained invocation
-
context
@CanIgnoreReturnValue public final ImmutableStatus.Builder context(Optional<String> context)
Initializes the optional valuecontextto context.- Parameters:
context- The value for context- Returns:
thisbuilder for use in a chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableStatus.Builder creator(User creator)
Initializes the optional valuecreatorto creator.- Parameters:
creator- The value for creator- Returns:
thisbuilder for chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableStatus.Builder creator(Optional<? extends User> creator)
Initializes the optional valuecreatorto creator.- Parameters:
creator- The value for creator- Returns:
thisbuilder for use in a chained invocation
-
deploymentUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder deploymentUrl(URI deploymentUrl)
Initializes the optional valuedeploymentUrlto deploymentUrl.- Parameters:
deploymentUrl- The value for deploymentUrl- Returns:
thisbuilder for chained invocation
-
deploymentUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder deploymentUrl(Optional<? extends URI> deploymentUrl)
Initializes the optional valuedeploymentUrlto deploymentUrl.- Parameters:
deploymentUrl- The value for deploymentUrl- Returns:
thisbuilder for use in a chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder repositoryUrl(URI repositoryUrl)
Initializes the optional valuerepositoryUrlto repositoryUrl.- Parameters:
repositoryUrl- The value for repositoryUrl- Returns:
thisbuilder for chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder repositoryUrl(Optional<? extends URI> repositoryUrl)
Initializes the optional valuerepositoryUrlto repositoryUrl.- Parameters:
repositoryUrl- The value for repositoryUrl- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableStatus build()
Builds a newImmutableStatus.- Returns:
- An immutable instance of Status
- Throws:
IllegalStateException- if any required attributes are missing
-
-