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 classImmutableRepositoryCreateStatus.BuilderBuilds instances of typeImmutableRepositoryCreateStatus.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRepositoryCreateStatus.Builderbuilder()Creates a builder forImmutableRepositoryCreateStatus.Stringcontext()A string label to differentiate this status from the status of other systems.static ImmutableRepositoryCreateStatuscopyOf(RepositoryCreateStatus instance)Creates an immutable copy of aRepositoryCreateStatusvalue.Stringdescription()A short description of the status.booleanequals(Object another)This instance is equal to all instances ofImmutableRepositoryCreateStatusthat have equal attribute values.inthashCode()Computes a hash code from attributes:state,targetUrl,description,context.Stringstate()The state of the status.URItargetUrl()The target URL to associate with this status.StringtoString()Prints the immutable valueRepositoryCreateStatuswith attribute values.ImmutableRepositoryCreateStatuswithContext(String value)Copy the current immutable object by setting a value for thecontextattribute.ImmutableRepositoryCreateStatuswithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableRepositoryCreateStatuswithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableRepositoryCreateStatuswithTargetUrl(URI value)Copy the current immutable object by setting a value for thetargetUrlattribute.
-
-
-
Method Detail
-
state
@Nullable public String state()
The state of the status. Can be one of pending, success, error, or failure.- Specified by:
statein interfaceRepositoryCreateStatus
-
targetUrl
@Nullable public URI targetUrl()
The target URL to associate with this status.- Specified by:
targetUrlin interfaceRepositoryCreateStatus
-
description
@Nullable public String description()
A short description of the status. Must be less than 1024 bytes.- Specified by:
descriptionin interfaceRepositoryCreateStatus
-
context
@Nullable public String context()
A string label to differentiate this status from the status of other systems. Default: "default"- Specified by:
contextin interfaceRepositoryCreateStatus
-
withState
public final ImmutableRepositoryCreateStatus 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 ImmutableRepositoryCreateStatus withTargetUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thetargetUrlattribute. 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
thisobject
-
withDescription
public final ImmutableRepositoryCreateStatus withDescription(@Nullable String value)
Copy the current immutable object by setting a value for thedescriptionattribute. 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
thisobject
-
withContext
public final ImmutableRepositoryCreateStatus withContext(@Nullable String value)
Copy the current immutable object by setting a value for thecontextattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableRepositoryCreateStatusthat 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 valueRepositoryCreateStatuswith attribute values.
-
copyOf
public static ImmutableRepositoryCreateStatus copyOf(RepositoryCreateStatus instance)
Creates an immutable copy of aRepositoryCreateStatusvalue. 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) // nullablestate.targetUrl(java.net.URI | null) // nullabletargetUrl.description(String | null) // nullabledescription.context(String | null) // nullablecontext.build();- Returns:
- A new ImmutableRepositoryCreateStatus builder
-
-