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 classImmutableWebhookCreate.BuilderBuilds instances of typeImmutableWebhookCreate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleanactive()Should it be activestatic ImmutableWebhookCreate.Builderbuilder()Creates a builder forImmutableWebhookCreate.WebhookConfigconfig()Webhook config.static ImmutableWebhookCreatecopyOf(WebhookCreate instance)Creates an immutable copy of aWebhookCreatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableWebhookCreatethat have equal attribute values.List<String>events()EventsinthashCode()Computes a hash code from attributes:name,active,events,config.Stringname()Webhook nameStringtoString()Prints the immutable valueWebhookCreatewith attribute values.ImmutableWebhookCreatewithActive(Boolean value)Copy the current immutable object by setting a value for theactiveattribute.ImmutableWebhookCreatewithConfig(WebhookConfig value)Copy the current immutable object by setting a value for theconfigattribute.ImmutableWebhookCreatewithEvents(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableWebhookCreatewithEvents(String... elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableWebhookCreatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
name
@Nullable public String name()
Webhook name- Specified by:
namein interfaceWebhookCreate
-
active
@Nullable public Boolean active()
Should it be active- Specified by:
activein interfaceWebhookCreate
-
events
@Nullable public List<String> events()
Events- Specified by:
eventsin interfaceWebhookCreate
-
config
@Nullable public WebhookConfig config()
Webhook config. SeeWebhookConfigfor more details.- Specified by:
configin interfaceWebhookCreate
-
withName
public final ImmutableWebhookCreate withName(@Nullable String value)
Copy the current immutable object by setting a value for thenameattribute. 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
thisobject
-
withActive
public final ImmutableWebhookCreate withActive(@Nullable Boolean value)
Copy the current immutable object by setting a value for theactiveattribute. 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
thisobject
-
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
thisobject
-
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
thisobject
-
withConfig
public final ImmutableWebhookCreate withConfig(@Nullable WebhookConfig value)
Copy the current immutable object by setting a value for theconfigattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableWebhookCreatethat 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 valueWebhookCreatewith attribute values.
-
copyOf
public static ImmutableWebhookCreate copyOf(WebhookCreate instance)
Creates an immutable copy of aWebhookCreatevalue. 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) // nullablename.active(Boolean | null) // nullableactive.events(List<String> | null) // nullableevents.config(com.spotify.github.v3.hooks.WebhookConfig | null) // nullableconfig.build();- Returns:
- A new ImmutableWebhookCreate builder
-
-