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 class
ImmutableCheckRunAction.Builder
Builds instances of typeImmutableCheckRunAction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCheckRunAction.Builder
builder()
Creates a builder forImmutableCheckRunAction
.static ImmutableCheckRunAction
copyOf(CheckRunAction instance)
Creates an immutable copy of aCheckRunAction
value.String
description()
Description string.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckRunAction
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:label
,identifier
,description
.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.String
label()
The label to be shown at the action button.String
toString()
Prints the immutable valueCheckRunAction
with attribute values.ImmutableCheckRunAction
withDescription(String value)
Copy the current immutable object by setting a value for thedescription
attribute.ImmutableCheckRunAction
withIdentifier(String value)
Copy the current immutable object by setting a value for theidentifier
attribute.ImmutableCheckRunAction
withLabel(String value)
Copy the current immutable object by setting a value for thelabel
attribute.-
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:
label
in 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:
identifier
in interfaceCheckRunAction
- Returns:
- the string
-
description
public String description()
Description string.- Specified by:
description
in interfaceCheckRunAction
- Returns:
- the string
-
withLabel
public final ImmutableCheckRunAction withLabel(String value)
Copy the current immutable object by setting a value for thelabel
attribute. 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
this
object
-
withIdentifier
public final ImmutableCheckRunAction withIdentifier(String value)
Copy the current immutable object by setting a value for theidentifier
attribute. 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
this
object
-
withDescription
public final ImmutableCheckRunAction withDescription(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- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunAction
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:label
,identifier
,description
.
-
toString
public String toString()
Prints the immutable valueCheckRunAction
with attribute values.
-
copyOf
public static ImmutableCheckRunAction copyOf(CheckRunAction instance)
Creates an immutable copy of aCheckRunAction
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 CheckRunAction instance
-
builder
public static ImmutableCheckRunAction.Builder builder()
Creates a builder forImmutableCheckRunAction
.ImmutableCheckRunAction.builder() .label(String) // required
label
.identifier(String) // requiredidentifier
.description(String) // requireddescription
.build();- Returns:
- A new ImmutableCheckRunAction builder
-
-