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.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 ImmutableStatus
build()
Builds a newImmutableStatus
.ImmutableStatus.Builder
context(String context)
Initializes the optional valuecontext
to context.ImmutableStatus.Builder
context(Optional<String> context)
Initializes the optional valuecontext
to context.ImmutableStatus.Builder
createdAt(GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.ImmutableStatus.Builder
creator(User creator)
Initializes the optional valuecreator
to creator.ImmutableStatus.Builder
creator(Optional<? extends User> creator)
Initializes the optional valuecreator
to creator.ImmutableStatus.Builder
deploymentUrl(URI deploymentUrl)
Initializes the optional valuedeploymentUrl
to deploymentUrl.ImmutableStatus.Builder
deploymentUrl(Optional<? extends URI> deploymentUrl)
Initializes the optional valuedeploymentUrl
to deploymentUrl.ImmutableStatus.Builder
description(String description)
Initializes the optional valuedescription
to description.ImmutableStatus.Builder
description(Optional<String> description)
Initializes the optional valuedescription
to description.ImmutableStatus.Builder
from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.ImmutableStatus.Builder
from(Status instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.repos.Status
instance.ImmutableStatus.Builder
id(Long id)
Initializes the value for theid
attribute.ImmutableStatus.Builder
repositoryUrl(URI repositoryUrl)
Initializes the optional valuerepositoryUrl
to repositoryUrl.ImmutableStatus.Builder
repositoryUrl(Optional<? extends URI> repositoryUrl)
Initializes the optional valuerepositoryUrl
to repositoryUrl.ImmutableStatus.Builder
state(String state)
Initializes the value for thestate
attribute.ImmutableStatus.Builder
targetUrl(URI targetUrl)
Initializes the optional valuetargetUrl
to targetUrl.ImmutableStatus.Builder
targetUrl(Optional<? extends URI> targetUrl)
Initializes the optional valuetargetUrl
to targetUrl.ImmutableStatus.Builder
updatedAt(GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.ImmutableStatus.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableStatus.Builder from(Status instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.repos.Status
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.UpdateTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableStatus.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.- Parameters:
createdAt
- The value for createdAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableStatus.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.- Parameters:
updatedAt
- The value for updatedAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutableStatus.Builder state(@Nullable String state)
Initializes the value for thestate
attribute.- Parameters:
state
- The value for state (can benull
)- Returns:
this
builder for use in a chained invocation
-
targetUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder targetUrl(URI targetUrl)
Initializes the optional valuetargetUrl
to targetUrl.- Parameters:
targetUrl
- The value for targetUrl- Returns:
this
builder for chained invocation
-
targetUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder targetUrl(Optional<? extends URI> targetUrl)
Initializes the optional valuetargetUrl
to targetUrl.- Parameters:
targetUrl
- The value for targetUrl- Returns:
this
builder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableStatus.Builder description(String description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableStatus.Builder description(Optional<String> description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableStatus.Builder id(@Nullable Long id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableStatus.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
context
@CanIgnoreReturnValue public final ImmutableStatus.Builder context(String context)
Initializes the optional valuecontext
to context.- Parameters:
context
- The value for context- Returns:
this
builder for chained invocation
-
context
@CanIgnoreReturnValue public final ImmutableStatus.Builder context(Optional<String> context)
Initializes the optional valuecontext
to context.- Parameters:
context
- The value for context- Returns:
this
builder for use in a chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableStatus.Builder creator(User creator)
Initializes the optional valuecreator
to creator.- Parameters:
creator
- The value for creator- Returns:
this
builder for chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableStatus.Builder creator(Optional<? extends User> creator)
Initializes the optional valuecreator
to creator.- Parameters:
creator
- The value for creator- Returns:
this
builder for use in a chained invocation
-
deploymentUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder deploymentUrl(URI deploymentUrl)
Initializes the optional valuedeploymentUrl
to deploymentUrl.- Parameters:
deploymentUrl
- The value for deploymentUrl- Returns:
this
builder for chained invocation
-
deploymentUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder deploymentUrl(Optional<? extends URI> deploymentUrl)
Initializes the optional valuedeploymentUrl
to deploymentUrl.- Parameters:
deploymentUrl
- The value for deploymentUrl- Returns:
this
builder for use in a chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder repositoryUrl(URI repositoryUrl)
Initializes the optional valuerepositoryUrl
to repositoryUrl.- Parameters:
repositoryUrl
- The value for repositoryUrl- Returns:
this
builder for chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableStatus.Builder repositoryUrl(Optional<? extends URI> repositoryUrl)
Initializes the optional valuerepositoryUrl
to repositoryUrl.- Parameters:
repositoryUrl
- The value for repositoryUrl- Returns:
this
builder 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
-
-