Package com.spotify.github.v3.checks
Class ImmutableCheckRunImage
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunImage
-
- All Implemented Interfaces:
CheckRunImage
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunImage extends Object implements CheckRunImage
Immutable implementation ofCheckRunImage
.Use the builder to create immutable instances:
ImmutableCheckRunImage.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCheckRunImage.Builder
Builds instances of typeImmutableCheckRunImage
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
alt()
The alternative text for the image.static ImmutableCheckRunImage.Builder
builder()
Creates a builder forImmutableCheckRunImage
.Optional<String>
caption()
A short image description.static ImmutableCheckRunImage
copyOf(CheckRunImage instance)
Creates an immutable copy of aCheckRunImage
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckRunImage
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:alt
,imageUrl
,caption
.String
imageUrl()
The full URL of the image.String
toString()
Prints the immutable valueCheckRunImage
with attribute values.ImmutableCheckRunImage
withAlt(String value)
Copy the current immutable object by setting a value for thealt
attribute.ImmutableCheckRunImage
withCaption(String value)
Copy the current immutable object by setting a present value for the optionalcaption
attribute.ImmutableCheckRunImage
withCaption(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecaption
attribute.ImmutableCheckRunImage
withImageUrl(String value)
Copy the current immutable object by setting a value for theimageUrl
attribute.
-
-
-
Method Detail
-
alt
public String alt()
The alternative text for the image.- Specified by:
alt
in interfaceCheckRunImage
- Returns:
- the string
-
imageUrl
public String imageUrl()
The full URL of the image.- Specified by:
imageUrl
in interfaceCheckRunImage
- Returns:
- the string
-
caption
public Optional<String> caption()
A short image description.- Specified by:
caption
in interfaceCheckRunImage
- Returns:
- the optional string
-
withAlt
public final ImmutableCheckRunImage withAlt(String value)
Copy the current immutable object by setting a value for thealt
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for alt- Returns:
- A modified copy of the
this
object
-
withImageUrl
public final ImmutableCheckRunImage withImageUrl(String value)
Copy the current immutable object by setting a value for theimageUrl
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for imageUrl- Returns:
- A modified copy of the
this
object
-
withCaption
public final ImmutableCheckRunImage withCaption(String value)
Copy the current immutable object by setting a present value for the optionalcaption
attribute.- Parameters:
value
- The value for caption- Returns:
- A modified copy of
this
object
-
withCaption
public final ImmutableCheckRunImage withCaption(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecaption
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for caption- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunImage
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:alt
,imageUrl
,caption
.
-
toString
public String toString()
Prints the immutable valueCheckRunImage
with attribute values.
-
copyOf
public static ImmutableCheckRunImage copyOf(CheckRunImage instance)
Creates an immutable copy of aCheckRunImage
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 CheckRunImage instance
-
builder
public static ImmutableCheckRunImage.Builder builder()
Creates a builder forImmutableCheckRunImage
.ImmutableCheckRunImage.builder() .alt(String) // required
alt
.imageUrl(String) // requiredimageUrl
.caption(String) // optionalcaption
.build();- Returns:
- A new ImmutableCheckRunImage builder
-
-