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 java.lang.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
.java.lang.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.java.lang.String
description()
A short description of the status.boolean
equals(java.lang.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
.java.lang.String
state()
The state of the status.java.net.URI
targetUrl()
The target URL to associate with this status.java.lang.String
toString()
Prints the immutable valueRepositoryCreateStatus
with attribute values.ImmutableRepositoryCreateStatus
withContext(java.lang.String value)
Copy the current immutable object by setting a value for thecontext
attribute.ImmutableRepositoryCreateStatus
withDescription(java.lang.String value)
Copy the current immutable object by setting a value for thedescription
attribute.ImmutableRepositoryCreateStatus
withState(java.lang.String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableRepositoryCreateStatus
withTargetUrl(java.net.URI value)
Copy the current immutable object by setting a value for thetargetUrl
attribute.
-
-
-
Method Detail
-
state
@Nullable public java.lang.String state()
The state of the status. Can be one of pending, success, error, or failure.- Specified by:
state
in interfaceRepositoryCreateStatus
-
targetUrl
@Nullable public java.net.URI targetUrl()
The target URL to associate with this status.- Specified by:
targetUrl
in interfaceRepositoryCreateStatus
-
description
@Nullable public java.lang.String description()
A short description of the status. Must be less than 1024 bytes.- Specified by:
description
in interfaceRepositoryCreateStatus
-
context
@Nullable public java.lang.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 java.lang.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 java.net.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 java.lang.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 java.lang.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 java.lang.Object another)
This instance is equal to all instances ofImmutableRepositoryCreateStatus
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:state
,targetUrl
,description
,context
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRepositoryCreateStatus
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
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
-
-