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 class
ImmutableWebhookConfig.Builder
Builds instances of typeImmutableWebhookConfig
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableWebhookConfig.Builder
builder()
Creates a builder forImmutableWebhookConfig
.String
contentType()
An optional string defining the media type used to serialize the payloads.static ImmutableWebhookConfig
copyOf(WebhookConfig instance)
Creates an immutable copy of aWebhookConfig
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableWebhookConfig
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:url
,contentType
.String
toString()
Prints the immutable valueWebhookConfig
with attribute values.URI
url()
A required string defining the URL to which the payloads will be delivered.ImmutableWebhookConfig
withContentType(String value)
Copy the current immutable object by setting a value for thecontentType
attribute.ImmutableWebhookConfig
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
url
@Nullable public URI url()
A required string defining the URL to which the payloads will be delivered.- Specified by:
url
in 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:
contentType
in interfaceWebhookConfig
-
withUrl
public final ImmutableWebhookConfig withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. 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
this
object
-
withContentType
public final ImmutableWebhookConfig withContentType(@Nullable String value)
Copy the current immutable object by setting a value for thecontentType
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableWebhookConfig
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:url
,contentType
.
-
toString
public String toString()
Prints the immutable valueWebhookConfig
with attribute values.
-
copyOf
public static ImmutableWebhookConfig copyOf(WebhookConfig instance)
Creates an immutable copy of aWebhookConfig
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 WebhookConfig instance
-
builder
public static ImmutableWebhookConfig.Builder builder()
Creates a builder forImmutableWebhookConfig
.ImmutableWebhookConfig.builder() .url(java.net.URI | null) // nullable
url
.contentType(String | null) // nullablecontentType
.build();- Returns:
- A new ImmutableWebhookConfig builder
-
-