Package com.spotify.github.v3.issues
Class ImmutableLabel
- java.lang.Object
-
- com.spotify.github.v3.issues.ImmutableLabel
-
- All Implemented Interfaces:
Label
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLabel extends Object implements Label
Immutable implementation ofLabel
.Use the builder to create immutable instances:
ImmutableLabel.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableLabel.Builder
Builds instances of typeImmutableLabel
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLabel.Builder
builder()
Creates a builder forImmutableLabel
.String
color()
Colorstatic ImmutableLabel
copyOf(Label instance)
Creates an immutable copy of aLabel
value.String
description()
boolean
equals(Object another)
This instance is equal to all instances ofImmutableLabel
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:id
,nodeId
,url
,name
,color
,description
,isDefault
.Long
id()
Idboolean
isDefault()
DefaultString
name()
NameString
nodeId()
String
toString()
Prints the immutable valueLabel
with attribute values.URI
url()
URLImmutableLabel
withColor(String value)
Copy the current immutable object by setting a value for thecolor
attribute.ImmutableLabel
withDescription(String value)
Copy the current immutable object by setting a value for thedescription
attribute.ImmutableLabel
withId(Long value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableLabel
withIsDefault(boolean value)
Copy the current immutable object by setting a value for theisDefault
attribute.ImmutableLabel
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableLabel
withNodeId(String value)
Copy the current immutable object by setting a value for thenodeId
attribute.ImmutableLabel
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
nodeId
@Nullable public String nodeId()
-
description
@Nullable public String description()
- Specified by:
description
in interfaceLabel
- Returns:
- The value of the
description
attribute
-
withId
public final ImmutableLabel withId(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- Returns:
- A modified copy of the
this
object
-
withNodeId
public final ImmutableLabel withNodeId(@Nullable String value)
Copy the current immutable object by setting a value for thenodeId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nodeId (can benull
)- Returns:
- A modified copy of the
this
object
-
withUrl
public final ImmutableLabel 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
-
withName
public final ImmutableLabel withName(@Nullable String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name (can benull
)- Returns:
- A modified copy of the
this
object
-
withColor
public final ImmutableLabel withColor(@Nullable String value)
Copy the current immutable object by setting a value for thecolor
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for color (can benull
)- Returns:
- A modified copy of the
this
object
-
withDescription
public final ImmutableLabel 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
-
withIsDefault
public final ImmutableLabel withIsDefault(boolean value)
Copy the current immutable object by setting a value for theisDefault
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isDefault- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableLabel
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id
,nodeId
,url
,name
,color
,description
,isDefault
.
-
toString
public String toString()
Prints the immutable valueLabel
with attribute values.
-
copyOf
public static ImmutableLabel copyOf(Label instance)
Creates an immutable copy of aLabel
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 Label instance
-
builder
public static ImmutableLabel.Builder builder()
Creates a builder forImmutableLabel
.ImmutableLabel.builder() .id(Long) // required
id
.nodeId(String | null) // nullablenodeId
.url(java.net.URI | null) // nullableurl
.name(String | null) // nullablename
.color(String | null) // nullablecolor
.description(String | null) // nullabledescription
.isDefault(boolean) // requiredisDefault
.build();- Returns:
- A new ImmutableLabel builder
-
-