Class ImmutableWebhookCreate
- java.lang.Object
-
- com.spotify.github.v3.hooks.requests.ImmutableWebhookCreate
-
- All Implemented Interfaces:
WebhookCreate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWebhookCreate extends Object implements WebhookCreate
Immutable implementation ofWebhookCreate
.Use the builder to create immutable instances:
ImmutableWebhookCreate.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableWebhookCreate.Builder
Builds instances of typeImmutableWebhookCreate
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
active()
Should it be activestatic ImmutableWebhookCreate.Builder
builder()
Creates a builder forImmutableWebhookCreate
.WebhookConfig
config()
Webhook config.static ImmutableWebhookCreate
copyOf(WebhookCreate instance)
Creates an immutable copy of aWebhookCreate
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableWebhookCreate
that have equal attribute values.List<String>
events()
Eventsint
hashCode()
Computes a hash code from attributes:name
,active
,events
,config
.String
name()
Webhook nameString
toString()
Prints the immutable valueWebhookCreate
with attribute values.ImmutableWebhookCreate
withActive(Boolean value)
Copy the current immutable object by setting a value for theactive
attribute.ImmutableWebhookCreate
withConfig(WebhookConfig value)
Copy the current immutable object by setting a value for theconfig
attribute.ImmutableWebhookCreate
withEvents(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofevents
.ImmutableWebhookCreate
withEvents(String... elements)
Copy the current immutable object with elements that replace the content ofevents
.ImmutableWebhookCreate
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.
-
-
-
Method Detail
-
name
@Nullable public String name()
Webhook name- Specified by:
name
in interfaceWebhookCreate
-
active
@Nullable public Boolean active()
Should it be active- Specified by:
active
in interfaceWebhookCreate
-
events
@Nullable public List<String> events()
Events- Specified by:
events
in interfaceWebhookCreate
-
config
@Nullable public WebhookConfig config()
Webhook config. SeeWebhookConfig
for more details.- Specified by:
config
in interfaceWebhookCreate
-
withName
public final ImmutableWebhookCreate withName(@Nullable String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name (can benull
)- Returns:
- A modified copy of the
this
object
-
withActive
public final ImmutableWebhookCreate withActive(@Nullable Boolean value)
Copy the current immutable object by setting a value for theactive
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for active (can benull
)- Returns:
- A modified copy of the
this
object
-
withEvents
public final ImmutableWebhookCreate withEvents(@Nullable String... elements)
Copy the current immutable object with elements that replace the content ofevents
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withEvents
public final ImmutableWebhookCreate withEvents(@Nullable Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofevents
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of events elements to set- Returns:
- A modified copy of
this
object
-
withConfig
public final ImmutableWebhookCreate withConfig(@Nullable WebhookConfig value)
Copy the current immutable object by setting a value for theconfig
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for config (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableWebhookCreate
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name
,active
,events
,config
.
-
toString
public String toString()
Prints the immutable valueWebhookCreate
with attribute values.
-
copyOf
public static ImmutableWebhookCreate copyOf(WebhookCreate instance)
Creates an immutable copy of aWebhookCreate
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 WebhookCreate instance
-
builder
public static ImmutableWebhookCreate.Builder builder()
Creates a builder forImmutableWebhookCreate
.ImmutableWebhookCreate.builder() .name(String | null) // nullable
name
.active(Boolean | null) // nullableactive
.events(List<String> | null) // nullableevents
.config(com.spotify.github.v3.hooks.WebhookConfig | null) // nullableconfig
.build();- Returns:
- A new ImmutableWebhookCreate builder
-
-