Package com.spotify.github.v3.repos
Class ImmutableStatus
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableStatus
-
- All Implemented Interfaces:
UpdateTracking
,Status
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStatus extends Object implements Status
Immutable implementation ofStatus
.Use the builder to create immutable instances:
ImmutableStatus.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableStatus.Builder
Builds instances of typeImmutableStatus
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableStatus.Builder
builder()
Creates a builder forImmutableStatus
.Optional<String>
context()
A string label to differentiate this status from the status of other systems.static ImmutableStatus
copyOf(Status instance)
Creates an immutable copy of aStatus
value.GitHubInstant
createdAt()
Created dateOptional<User>
creator()
Status creator user entityOptional<URI>
deploymentUrl()
Deployment URLOptional<String>
description()
A short description of the status.boolean
equals(Object another)
This instance is equal to all instances ofImmutableStatus
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,state
,targetUrl
,description
,id
,url
,context
,creator
,deploymentUrl
,repositoryUrl
.Long
id()
Status idOptional<URI>
repositoryUrl()
Repository URLString
state()
The state of the status.Optional<URI>
targetUrl()
The target URL to associate with this status.String
toString()
Prints the immutable valueStatus
with attribute values.GitHubInstant
updatedAt()
Updated dateURI
url()
Status URLImmutableStatus
withContext(String value)
Copy the current immutable object by setting a present value for the optionalcontext
attribute.ImmutableStatus
withContext(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecontext
attribute.ImmutableStatus
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableStatus
withCreator(User value)
Copy the current immutable object by setting a present value for the optionalcreator
attribute.ImmutableStatus
withCreator(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for thecreator
attribute.ImmutableStatus
withDeploymentUrl(URI value)
Copy the current immutable object by setting a present value for the optionaldeploymentUrl
attribute.ImmutableStatus
withDeploymentUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thedeploymentUrl
attribute.ImmutableStatus
withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.ImmutableStatus
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute.ImmutableStatus
withId(Long value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableStatus
withRepositoryUrl(URI value)
Copy the current immutable object by setting a present value for the optionalrepositoryUrl
attribute.ImmutableStatus
withRepositoryUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for therepositoryUrl
attribute.ImmutableStatus
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableStatus
withTargetUrl(URI value)
Copy the current immutable object by setting a present value for the optionaltargetUrl
attribute.ImmutableStatus
withTargetUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thetargetUrl
attribute.ImmutableStatus
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutableStatus
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was updated
-
state
@Nullable public String state()
The state of the status. Can be one of pending, success, error, or failure.
-
targetUrl
public Optional<URI> targetUrl()
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the 'source' of the Status.
-
description
public Optional<String> description()
A short description of the status.- Specified by:
description
in interfaceStatus
-
context
public Optional<String> context()
A string label to differentiate this status from the status of other systems. Default: "default"
-
deploymentUrl
public Optional<URI> deploymentUrl()
Deployment URL- Specified by:
deploymentUrl
in interfaceStatus
-
repositoryUrl
public Optional<URI> repositoryUrl()
Repository URL- Specified by:
repositoryUrl
in interfaceStatus
-
withCreatedAt
public final ImmutableStatus withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for createdAt (can benull
)- Returns:
- A modified copy of the
this
object
-
withUpdatedAt
public final ImmutableStatus withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for updatedAt (can benull
)- Returns:
- A modified copy of the
this
object
-
withState
public final ImmutableStatus withState(@Nullable String value)
Copy the current immutable object by setting a value for thestate
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for state (can benull
)- Returns:
- A modified copy of the
this
object
-
withTargetUrl
public final ImmutableStatus withTargetUrl(URI value)
Copy the current immutable object by setting a present value for the optionaltargetUrl
attribute.- Parameters:
value
- The value for targetUrl- Returns:
- A modified copy of
this
object
-
withTargetUrl
public final ImmutableStatus withTargetUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thetargetUrl
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for targetUrl- Returns:
- A modified copy of
this
object
-
withDescription
public final ImmutableStatus withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.- Parameters:
value
- The value for description- Returns:
- A modified copy of
this
object
-
withDescription
public final ImmutableStatus withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for description- Returns:
- A modified copy of
this
object
-
withId
public final ImmutableStatus withId(@Nullable Long value)
Copy the current immutable object by setting a value for theid
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id (can benull
)- Returns:
- A modified copy of the
this
object
-
withUrl
public final ImmutableStatus withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for url (can benull
)- Returns:
- A modified copy of the
this
object
-
withContext
public final ImmutableStatus withContext(String value)
Copy the current immutable object by setting a present value for the optionalcontext
attribute.- Parameters:
value
- The value for context- Returns:
- A modified copy of
this
object
-
withContext
public final ImmutableStatus withContext(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecontext
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for context- Returns:
- A modified copy of
this
object
-
withCreator
public final ImmutableStatus withCreator(User value)
Copy the current immutable object by setting a present value for the optionalcreator
attribute.- Parameters:
value
- The value for creator- Returns:
- A modified copy of
this
object
-
withCreator
public final ImmutableStatus withCreator(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for thecreator
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for creator- Returns:
- A modified copy of
this
object
-
withDeploymentUrl
public final ImmutableStatus withDeploymentUrl(URI value)
Copy the current immutable object by setting a present value for the optionaldeploymentUrl
attribute.- Parameters:
value
- The value for deploymentUrl- Returns:
- A modified copy of
this
object
-
withDeploymentUrl
public final ImmutableStatus withDeploymentUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thedeploymentUrl
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for deploymentUrl- Returns:
- A modified copy of
this
object
-
withRepositoryUrl
public final ImmutableStatus withRepositoryUrl(URI value)
Copy the current immutable object by setting a present value for the optionalrepositoryUrl
attribute.- Parameters:
value
- The value for repositoryUrl- Returns:
- A modified copy of
this
object
-
withRepositoryUrl
public final ImmutableStatus withRepositoryUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for therepositoryUrl
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for repositoryUrl- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableStatus
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,state
,targetUrl
,description
,id
,url
,context
,creator
,deploymentUrl
,repositoryUrl
.
-
toString
public String toString()
Prints the immutable valueStatus
with attribute values.
-
copyOf
public static ImmutableStatus copyOf(Status instance)
Creates an immutable copy of aStatus
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable Status instance
-
builder
public static ImmutableStatus.Builder builder()
Creates a builder forImmutableStatus
.ImmutableStatus.builder() .createdAt(com.spotify.github.GitHubInstant | null) // nullable
createdAt
.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt
.state(String | null) // nullablestate
.targetUrl(java.net.URI) // optionaltargetUrl
.description(String) // optionaldescription
.id(Long | null) // nullableid
.url(java.net.URI | null) // nullableurl
.context(String) // optionalcontext
.creator(com.spotify.github.v3.User) // optionalcreator
.deploymentUrl(java.net.URI) // optionaldeploymentUrl
.repositoryUrl(java.net.URI) // optionalrepositoryUrl
.build();- Returns:
- A new ImmutableStatus builder
-
-