Package com.onfido.model
Class Webhook
- java.lang.Object
-
- com.onfido.model.Webhook
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.9.0") public class Webhook extends Object
Webhook
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebhook.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ENABLEDstatic StringSERIALIZED_NAME_ENVIRONMENTSstatic StringSERIALIZED_NAME_EVENTSstatic StringSERIALIZED_NAME_HREFstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_PAYLOAD_VERSIONstatic StringSERIALIZED_NAME_TOKENstatic StringSERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description Webhook()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhookaddEnvironmentsItem(String environmentsItem)WebhookaddEventsItem(WebhookEventType eventsItem)Webhookenabled(Boolean enabled)Webhookenvironments(List<String> environments)booleanequals(Object o)Webhookevents(List<WebhookEventType> events)static WebhookfromJson(String jsonString)Create an instance of Webhook given an JSON stringMap<String,Object>getAdditionalProperties()Return the additional (undeclared) property.ObjectgetAdditionalProperty(String key)Return the additional (undeclared) property with the specified name.BooleangetEnabled()Determine if the webhook is active.List<String>getEnvironments()The environments from which the webhook will receive events.List<WebhookEventType>getEvents()The events that will be published to the webhook.StringgetHref()The API endpoint to retrieve the webhook.UUIDgetId()The unique identifier of the webhook.IntegergetPayloadVersion()Webhook version used to control the payload object when sending webhooks.StringgetToken()Webhook secret token used to sign the webhook's payload.StringgetUrl()The url that will listen to notifications (must be https).inthashCode()Webhookhref(String href)Webhookid(UUID id)WebhookpayloadVersion(Integer payloadVersion)WebhookputAdditionalProperty(String key, Object value)Set the additional (undeclared) property with the specified name and value.voidsetEnabled(Boolean enabled)voidsetEnvironments(List<String> environments)voidsetEvents(List<WebhookEventType> events)voidsetHref(String href)voidsetId(UUID id)voidsetPayloadVersion(Integer payloadVersion)voidsetToken(String token)voidsetUrl(String url)StringtoJson()Convert an instance of Webhook to an JSON stringWebhooktoken(String token)StringtoString()Webhookurl(String url)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ENABLED
public static final String SERIALIZED_NAME_ENABLED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EVENTS
public static final String SERIALIZED_NAME_EVENTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENVIRONMENTS
public static final String SERIALIZED_NAME_ENVIRONMENTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PAYLOAD_VERSION
public static final String SERIALIZED_NAME_PAYLOAD_VERSION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TOKEN
public static final String SERIALIZED_NAME_TOKEN
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HREF
public static final String SERIALIZED_NAME_HREF
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEnabled
@Nullable public Boolean getEnabled()
Determine if the webhook is active.- Returns:
- enabled
-
setEnabled
public void setEnabled(Boolean enabled)
-
events
public Webhook events(List<WebhookEventType> events)
-
addEventsItem
public Webhook addEventsItem(WebhookEventType eventsItem)
-
getEvents
@Nullable public List<WebhookEventType> getEvents()
The events that will be published to the webhook. If the events parameter is omitted all the events will be subscribed.- Returns:
- events
-
setEvents
public void setEvents(List<WebhookEventType> events)
-
getEnvironments
@Nullable public List<String> getEnvironments()
The environments from which the webhook will receive events. Allowed values are “sandbox” and “live”. If the environments parameter is omitted the webhook will receive events from both environments.- Returns:
- environments
-
getPayloadVersion
@Nullable public Integer getPayloadVersion()
Webhook version used to control the payload object when sending webhooks.- Returns:
- payloadVersion
-
setPayloadVersion
public void setPayloadVersion(Integer payloadVersion)
-
setId
public void setId(UUID id)
-
getUrl
@Nullable public String getUrl()
The url that will listen to notifications (must be https).- Returns:
- url
-
setUrl
public void setUrl(String url)
-
getToken
@Nullable public String getToken()
Webhook secret token used to sign the webhook's payload.- Returns:
- token
-
setToken
public void setToken(String token)
-
setHref
public void setHref(String href)
-
putAdditionalProperty
public Webhook putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the Webhook instance itself
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public Object getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to Webhook
-
fromJson
public static Webhook fromJson(String jsonString) throws IOException
Create an instance of Webhook given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Webhook
- Throws:
IOException- if the JSON string is invalid with respect to Webhook
-
toJson
public String toJson()
Convert an instance of Webhook to an JSON string- Returns:
- JSON string
-
-