Class ImmutableRepositoryCreateStatus
- java.lang.Object
-
- com.spotify.github.v3.repos.requests.ImmutableRepositoryCreateStatus
-
- All Implemented Interfaces:
RepositoryCreateStatus
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRepositoryCreateStatus extends Object implements RepositoryCreateStatus
Immutable implementation ofRepositoryCreateStatus
.Use the builder to create immutable instances:
ImmutableRepositoryCreateStatus.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableRepositoryCreateStatus.Builder
Builds instances of typeImmutableRepositoryCreateStatus
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRepositoryCreateStatus.Builder
builder()
Creates a builder forImmutableRepositoryCreateStatus
.String
context()
A string label to differentiate this status from the status of other systems.static ImmutableRepositoryCreateStatus
copyOf(RepositoryCreateStatus instance)
Creates an immutable copy of aRepositoryCreateStatus
value.String
description()
A short description of the status.boolean
equals(Object another)
This instance is equal to all instances ofImmutableRepositoryCreateStatus
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:state
,targetUrl
,description
,context
.String
state()
The state of the status.URI
targetUrl()
The target URL to associate with this status.String
toString()
Prints the immutable valueRepositoryCreateStatus
with attribute values.ImmutableRepositoryCreateStatus
withContext(String value)
Copy the current immutable object by setting a value for thecontext
attribute.ImmutableRepositoryCreateStatus
withDescription(String value)
Copy the current immutable object by setting a value for thedescription
attribute.ImmutableRepositoryCreateStatus
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableRepositoryCreateStatus
withTargetUrl(URI value)
Copy the current immutable object by setting a value for thetargetUrl
attribute.
-
-
-
Method Detail
-
state
@Nullable public String state()
The state of the status. Can be one of pending, success, error, or failure.- Specified by:
state
in interfaceRepositoryCreateStatus
-
targetUrl
@Nullable public URI targetUrl()
The target URL to associate with this status.- Specified by:
targetUrl
in interfaceRepositoryCreateStatus
-
description
@Nullable public String description()
A short description of the status. Must be less than 1024 bytes.- Specified by:
description
in interfaceRepositoryCreateStatus
-
context
@Nullable public String context()
A string label to differentiate this status from the status of other systems. Default: "default"- Specified by:
context
in interfaceRepositoryCreateStatus
-
withState
public final ImmutableRepositoryCreateStatus 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 ImmutableRepositoryCreateStatus withTargetUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thetargetUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withDescription
public final ImmutableRepositoryCreateStatus withDescription(@Nullable String value)
Copy the current immutable object by setting a value for thedescription
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for description (can benull
)- Returns:
- A modified copy of the
this
object
-
withContext
public final ImmutableRepositoryCreateStatus withContext(@Nullable String value)
Copy the current immutable object by setting a value for thecontext
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for context (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRepositoryCreateStatus
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:state
,targetUrl
,description
,context
.
-
toString
public String toString()
Prints the immutable valueRepositoryCreateStatus
with attribute values.
-
copyOf
public static ImmutableRepositoryCreateStatus copyOf(RepositoryCreateStatus instance)
Creates an immutable copy of aRepositoryCreateStatus
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 RepositoryCreateStatus instance
-
builder
public static ImmutableRepositoryCreateStatus.Builder builder()
Creates a builder forImmutableRepositoryCreateStatus
.ImmutableRepositoryCreateStatus.builder() .state(String | null) // nullable
state
.targetUrl(java.net.URI | null) // nullabletargetUrl
.description(String | null) // nullabledescription
.context(String | null) // nullablecontext
.build();- Returns:
- A new ImmutableRepositoryCreateStatus builder
-
-