public class WebhookCreateSpec extends Object implements AuditSpec<WebhookCreateRequest>
Webhook
entity.Constructor and Description |
---|
WebhookCreateSpec() |
Modifier and Type | Method and Description |
---|---|
WebhookCreateRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
WebhookCreateSpec |
setAvatar(Image avatar)
Sets the image of the created
Webhook . |
WebhookCreateSpec |
setName(String name)
Sets the name of the created
Webhook . |
WebhookCreateSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
public WebhookCreateSpec setName(String name)
Webhook
.name
- The webhook name.public WebhookCreateSpec setAvatar(@Nullable Image avatar)
Webhook
.avatar
- The webhook image.public WebhookCreateSpec setReason(@Nullable String reason)
AuditSpec
setReason
in interface AuditSpec<WebhookCreateRequest>
reason
- The audit log reason.@Nullable public String getReason()
AuditSpec
getReason
in interface AuditSpec<WebhookCreateRequest>
public WebhookCreateRequest asRequest()
asRequest
in interface Spec<WebhookCreateRequest>