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 classImmutableStatus.BuilderBuilds instances of typeImmutableStatus.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableStatus.Builderbuilder()Creates a builder forImmutableStatus.Optional<String>context()A string label to differentiate this status from the status of other systems.static ImmutableStatuscopyOf(Status instance)Creates an immutable copy of aStatusvalue.GitHubInstantcreatedAt()Created dateOptional<User>creator()Status creator user entityOptional<URI>deploymentUrl()Deployment URLOptional<String>description()A short description of the status.booleanequals(Object another)This instance is equal to all instances ofImmutableStatusthat have equal attribute values.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,state,targetUrl,description,id,url,context,creator,deploymentUrl,repositoryUrl.Longid()Status idOptional<URI>repositoryUrl()Repository URLStringstate()The state of the status.Optional<URI>targetUrl()The target URL to associate with this status.StringtoString()Prints the immutable valueStatuswith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()Status URLImmutableStatuswithContext(String value)Copy the current immutable object by setting a present value for the optionalcontextattribute.ImmutableStatuswithContext(Optional<String> optional)Copy the current immutable object by setting an optional value for thecontextattribute.ImmutableStatuswithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableStatuswithCreator(User value)Copy the current immutable object by setting a present value for the optionalcreatorattribute.ImmutableStatuswithCreator(Optional<? extends User> optional)Copy the current immutable object by setting an optional value for thecreatorattribute.ImmutableStatuswithDeploymentUrl(URI value)Copy the current immutable object by setting a present value for the optionaldeploymentUrlattribute.ImmutableStatuswithDeploymentUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for thedeploymentUrlattribute.ImmutableStatuswithDescription(String value)Copy the current immutable object by setting a present value for the optionaldescriptionattribute.ImmutableStatuswithDescription(Optional<String> optional)Copy the current immutable object by setting an optional value for thedescriptionattribute.ImmutableStatuswithId(Long value)Copy the current immutable object by setting a value for theidattribute.ImmutableStatuswithRepositoryUrl(URI value)Copy the current immutable object by setting a present value for the optionalrepositoryUrlattribute.ImmutableStatuswithRepositoryUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for therepositoryUrlattribute.ImmutableStatuswithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableStatuswithTargetUrl(URI value)Copy the current immutable object by setting a present value for the optionaltargetUrlattribute.ImmutableStatuswithTargetUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for thetargetUrlattribute.ImmutableStatuswithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableStatuswithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAtin interfaceUpdateTracking- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAtin 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:
descriptionin 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:
deploymentUrlin interfaceStatus
-
repositoryUrl
public Optional<URI> repositoryUrl()
Repository URL- Specified by:
repositoryUrlin interfaceStatus
-
withCreatedAt
public final ImmutableStatus withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAtattribute. 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
thisobject
-
withUpdatedAt
public final ImmutableStatus withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAtattribute. 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
thisobject
-
withState
public final ImmutableStatus withState(@Nullable String value)
Copy the current immutable object by setting a value for thestateattribute. 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
thisobject
-
withTargetUrl
public final ImmutableStatus withTargetUrl(URI value)
Copy the current immutable object by setting a present value for the optionaltargetUrlattribute.- Parameters:
value- The value for targetUrl- Returns:
- A modified copy of
thisobject
-
withTargetUrl
public final ImmutableStatus withTargetUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thetargetUrlattribute. 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
thisobject
-
withDescription
public final ImmutableStatus withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
public final ImmutableStatus withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescriptionattribute. 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
thisobject
-
withId
public final ImmutableStatus withId(@Nullable Long value)
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withUrl
public final ImmutableStatus withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. 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
thisobject
-
withContext
public final ImmutableStatus withContext(String value)
Copy the current immutable object by setting a present value for the optionalcontextattribute.- Parameters:
value- The value for context- Returns:
- A modified copy of
thisobject
-
withContext
public final ImmutableStatus withContext(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecontextattribute. 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
thisobject
-
withCreator
public final ImmutableStatus withCreator(User value)
Copy the current immutable object by setting a present value for the optionalcreatorattribute.- Parameters:
value- The value for creator- Returns:
- A modified copy of
thisobject
-
withCreator
public final ImmutableStatus withCreator(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for thecreatorattribute. 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
thisobject
-
withDeploymentUrl
public final ImmutableStatus withDeploymentUrl(URI value)
Copy the current immutable object by setting a present value for the optionaldeploymentUrlattribute.- Parameters:
value- The value for deploymentUrl- Returns:
- A modified copy of
thisobject
-
withDeploymentUrl
public final ImmutableStatus withDeploymentUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for thedeploymentUrlattribute. 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
thisobject
-
withRepositoryUrl
public final ImmutableStatus withRepositoryUrl(URI value)
Copy the current immutable object by setting a present value for the optionalrepositoryUrlattribute.- Parameters:
value- The value for repositoryUrl- Returns:
- A modified copy of
thisobject
-
withRepositoryUrl
public final ImmutableStatus withRepositoryUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for therepositoryUrlattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableStatusthat 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 valueStatuswith attribute values.
-
copyOf
public static ImmutableStatus copyOf(Status instance)
Creates an immutable copy of aStatusvalue. 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) // nullablecreatedAt.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
-
-