Package com.spotify.github.v3.checks
Class ImmutableCheckRunAction
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunAction
-
- All Implemented Interfaces:
CheckRunAction
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunAction extends Object implements CheckRunAction
Immutable implementation ofCheckRunAction.Use the builder to create immutable instances:
ImmutableCheckRunAction.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCheckRunAction.BuilderBuilds instances of typeImmutableCheckRunAction.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCheckRunAction.Builderbuilder()Creates a builder forImmutableCheckRunAction.static ImmutableCheckRunActioncopyOf(CheckRunAction instance)Creates an immutable copy of aCheckRunActionvalue.Stringdescription()Description string.booleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunActionthat have equal attribute values.inthashCode()Computes a hash code from attributes:label,identifier,description.Stringidentifier()The identifier to be sent at the event When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app.Stringlabel()The label to be shown at the action button.StringtoString()Prints the immutable valueCheckRunActionwith attribute values.ImmutableCheckRunActionwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableCheckRunActionwithIdentifier(String value)Copy the current immutable object by setting a value for theidentifierattribute.ImmutableCheckRunActionwithLabel(String value)Copy the current immutable object by setting a value for thelabelattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.spotify.github.v3.checks.CheckRunAction
check
-
-
-
-
Method Detail
-
label
public String label()
The label to be shown at the action button.- Specified by:
labelin interfaceCheckRunAction- Returns:
- the string
-
identifier
public String identifier()
The identifier to be sent at the event When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. When your app receives a check_run.requested_action webhook event, it can look for the requested_action.identifier key in the webhook payload to determine which button was clicked and perform the requested task.- Specified by:
identifierin interfaceCheckRunAction- Returns:
- the string
-
description
public String description()
Description string.- Specified by:
descriptionin interfaceCheckRunAction- Returns:
- the string
-
withLabel
public final ImmutableCheckRunAction withLabel(String value)
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy of the
thisobject
-
withIdentifier
public final ImmutableCheckRunAction withIdentifier(String value)
Copy the current immutable object by setting a value for theidentifierattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for identifier- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableCheckRunAction withDescription(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- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunActionthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:label,identifier,description.
-
toString
public String toString()
Prints the immutable valueCheckRunActionwith attribute values.
-
copyOf
public static ImmutableCheckRunAction copyOf(CheckRunAction instance)
Creates an immutable copy of aCheckRunActionvalue. 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 CheckRunAction instance
-
builder
public static ImmutableCheckRunAction.Builder builder()
Creates a builder forImmutableCheckRunAction.ImmutableCheckRunAction.builder() .label(String) // requiredlabel.identifier(String) // requiredidentifier.description(String) // requireddescription.build();- Returns:
- A new ImmutableCheckRunAction builder
-
-