Package com.spotify.github.v3.hooks
Class ImmutableWebhookConfig
- java.lang.Object
-
- com.spotify.github.v3.hooks.ImmutableWebhookConfig
-
- All Implemented Interfaces:
WebhookConfig
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWebhookConfig extends Object implements WebhookConfig
Immutable implementation ofWebhookConfig.Use the builder to create immutable instances:
ImmutableWebhookConfig.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableWebhookConfig.BuilderBuilds instances of typeImmutableWebhookConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableWebhookConfig.Builderbuilder()Creates a builder forImmutableWebhookConfig.StringcontentType()An optional string defining the media type used to serialize the payloads.static ImmutableWebhookConfigcopyOf(WebhookConfig instance)Creates an immutable copy of aWebhookConfigvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableWebhookConfigthat have equal attribute values.inthashCode()Computes a hash code from attributes:url,contentType.StringtoString()Prints the immutable valueWebhookConfigwith attribute values.URIurl()A required string defining the URL to which the payloads will be delivered.ImmutableWebhookConfigwithContentType(String value)Copy the current immutable object by setting a value for thecontentTypeattribute.ImmutableWebhookConfigwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
url
@Nullable public URI url()
A required string defining the URL to which the payloads will be delivered.- Specified by:
urlin interfaceWebhookConfig
-
contentType
@Nullable public String contentType()
An optional string defining the media type used to serialize the payloads. Supported values include json and form. The default is form.- Specified by:
contentTypein interfaceWebhookConfig
-
withUrl
public final ImmutableWebhookConfig withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url (can benull)- Returns:
- A modified copy of the
thisobject
-
withContentType
public final ImmutableWebhookConfig withContentType(@Nullable String value)
Copy the current immutable object by setting a value for thecontentTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for contentType (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableWebhookConfigthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:url,contentType.
-
toString
public String toString()
Prints the immutable valueWebhookConfigwith attribute values.
-
copyOf
public static ImmutableWebhookConfig copyOf(WebhookConfig instance)
Creates an immutable copy of aWebhookConfigvalue. 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 WebhookConfig instance
-
builder
public static ImmutableWebhookConfig.Builder builder()
Creates a builder forImmutableWebhookConfig.ImmutableWebhookConfig.builder() .url(java.net.URI | null) // nullableurl.contentType(String | null) // nullablecontentType.build();- Returns:
- A new ImmutableWebhookConfig builder
-
-