Class ImmutableRepositoryDispatch
- java.lang.Object
-
- com.spotify.github.v3.repos.requests.ImmutableRepositoryDispatch
-
- All Implemented Interfaces:
RepositoryDispatch
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRepositoryDispatch extends Object implements RepositoryDispatch
Immutable implementation ofRepositoryDispatch.Use the builder to create immutable instances:
ImmutableRepositoryDispatch.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRepositoryDispatch.BuilderBuilds instances of typeImmutableRepositoryDispatch.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRepositoryDispatch.Builderbuilder()Creates a builder forImmutableRepositoryDispatch.Optional<com.fasterxml.jackson.databind.JsonNode>clientPayload()JSON payload with extra information about the webhook event that your action or workflow may use.static ImmutableRepositoryDispatchcopyOf(RepositoryDispatch instance)Creates an immutable copy of aRepositoryDispatchvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRepositoryDispatchthat have equal attribute values.StringeventType()The custom webhook event nameinthashCode()Computes a hash code from attributes:eventType,clientPayload.StringtoString()Prints the immutable valueRepositoryDispatchwith attribute values.ImmutableRepositoryDispatchwithClientPayload(com.fasterxml.jackson.databind.JsonNode value)Copy the current immutable object by setting a present value for the optionalclientPayloadattribute.ImmutableRepositoryDispatchwithClientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> optional)Copy the current immutable object by setting an optional value for theclientPayloadattribute.ImmutableRepositoryDispatchwithEventType(String value)Copy the current immutable object by setting a value for theeventTypeattribute.
-
-
-
Method Detail
-
eventType
public String eventType()
The custom webhook event name- Specified by:
eventTypein interfaceRepositoryDispatch
-
clientPayload
public Optional<com.fasterxml.jackson.databind.JsonNode> clientPayload()
JSON payload with extra information about the webhook event that your action or workflow may use.- Specified by:
clientPayloadin interfaceRepositoryDispatch
-
withEventType
public final ImmutableRepositoryDispatch withEventType(String value)
Copy the current immutable object by setting a value for theeventTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventType- Returns:
- A modified copy of the
thisobject
-
withClientPayload
public final ImmutableRepositoryDispatch withClientPayload(com.fasterxml.jackson.databind.JsonNode value)
Copy the current immutable object by setting a present value for the optionalclientPayloadattribute.- Parameters:
value- The value for clientPayload- Returns:
- A modified copy of
thisobject
-
withClientPayload
public final ImmutableRepositoryDispatch withClientPayload(Optional<? extends com.fasterxml.jackson.databind.JsonNode> optional)
Copy the current immutable object by setting an optional value for theclientPayloadattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for clientPayload- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableRepositoryDispatchthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:eventType,clientPayload.
-
toString
public String toString()
Prints the immutable valueRepositoryDispatchwith attribute values.
-
copyOf
public static ImmutableRepositoryDispatch copyOf(RepositoryDispatch instance)
Creates an immutable copy of aRepositoryDispatchvalue. 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 RepositoryDispatch instance
-
builder
public static ImmutableRepositoryDispatch.Builder builder()
Creates a builder forImmutableRepositoryDispatch.ImmutableRepositoryDispatch.builder() .eventType(String) // requiredeventType.clientPayload(com.fasterxml.jackson.databind.JsonNode) // optionalclientPayload.build();- Returns:
- A new ImmutableRepositoryDispatch builder
-
-