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 classImmutableCheckRunImage.BuilderBuilds instances of typeImmutableCheckRunImage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringalt()The alternative text for the image.static ImmutableCheckRunImage.Builderbuilder()Creates a builder forImmutableCheckRunImage.Optional<String>caption()A short image description.static ImmutableCheckRunImagecopyOf(CheckRunImage instance)Creates an immutable copy of aCheckRunImagevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunImagethat have equal attribute values.inthashCode()Computes a hash code from attributes:alt,imageUrl,caption.StringimageUrl()The full URL of the image.StringtoString()Prints the immutable valueCheckRunImagewith attribute values.ImmutableCheckRunImagewithAlt(String value)Copy the current immutable object by setting a value for thealtattribute.ImmutableCheckRunImagewithCaption(String value)Copy the current immutable object by setting a present value for the optionalcaptionattribute.ImmutableCheckRunImagewithCaption(Optional<String> optional)Copy the current immutable object by setting an optional value for thecaptionattribute.ImmutableCheckRunImagewithImageUrl(String value)Copy the current immutable object by setting a value for theimageUrlattribute.
-
-
-
Method Detail
-
alt
public String alt()
The alternative text for the image.- Specified by:
altin interfaceCheckRunImage- Returns:
- the string
-
imageUrl
public String imageUrl()
The full URL of the image.- Specified by:
imageUrlin interfaceCheckRunImage- Returns:
- the string
-
caption
public Optional<String> caption()
A short image description.- Specified by:
captionin interfaceCheckRunImage- Returns:
- the optional string
-
withAlt
public final ImmutableCheckRunImage withAlt(String value)
Copy the current immutable object by setting a value for thealtattribute. 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
thisobject
-
withImageUrl
public final ImmutableCheckRunImage withImageUrl(String value)
Copy the current immutable object by setting a value for theimageUrlattribute. 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
thisobject
-
withCaption
public final ImmutableCheckRunImage withCaption(String value)
Copy the current immutable object by setting a present value for the optionalcaptionattribute.- Parameters:
value- The value for caption- Returns:
- A modified copy of
thisobject
-
withCaption
public final ImmutableCheckRunImage withCaption(Optional<String> optional)
Copy the current immutable object by setting an optional value for thecaptionattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunImagethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:alt,imageUrl,caption.
-
toString
public String toString()
Prints the immutable valueCheckRunImagewith attribute values.
-
copyOf
public static ImmutableCheckRunImage copyOf(CheckRunImage instance)
Creates an immutable copy of aCheckRunImagevalue. 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) // requiredalt.imageUrl(String) // requiredimageUrl.caption(String) // optionalcaption.build();- Returns:
- A new ImmutableCheckRunImage builder
-
-