Package com.onfido.model
Class WebhookBuilder
- java.lang.Object
-
- com.onfido.model.WebhookBuilder
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.9.0") public class WebhookBuilder extends Object
WebhookBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebhookBuilder.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_PAYLOAD_VERSIONstatic StringSERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description WebhookBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhookBuilderaddEnvironmentsItem(String environmentsItem)WebhookBuilderaddEventsItem(WebhookEventType eventsItem)WebhookBuilderenabled(Boolean enabled)WebhookBuilderenvironments(List<String> environments)booleanequals(Object o)WebhookBuilderevents(List<WebhookEventType> events)static WebhookBuilderfromJson(String jsonString)Create an instance of WebhookBuilder 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.IntegergetPayloadVersion()Webhook version used to control the payload object when sending webhooks.StringgetUrl()The url that will listen to notifications (must be https).inthashCode()WebhookBuilderpayloadVersion(Integer payloadVersion)WebhookBuilderputAdditionalProperty(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)voidsetPayloadVersion(Integer payloadVersion)voidsetUrl(String url)StringtoJson()Convert an instance of WebhookBuilder to an JSON stringStringtoString()WebhookBuilderurl(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_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
enabled
public WebhookBuilder enabled(Boolean enabled)
-
getEnabled
@Nullable public Boolean getEnabled()
Determine if the webhook is active.- Returns:
- enabled
-
setEnabled
public void setEnabled(Boolean enabled)
-
events
public WebhookBuilder events(List<WebhookEventType> events)
-
addEventsItem
public WebhookBuilder 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)
-
environments
public WebhookBuilder environments(List<String> environments)
-
addEnvironmentsItem
public WebhookBuilder addEnvironmentsItem(String environmentsItem)
-
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
-
payloadVersion
public WebhookBuilder payloadVersion(Integer payloadVersion)
-
getPayloadVersion
@Nullable public Integer getPayloadVersion()
Webhook version used to control the payload object when sending webhooks.- Returns:
- payloadVersion
-
setPayloadVersion
public void setPayloadVersion(Integer payloadVersion)
-
url
public WebhookBuilder url(String url)
-
getUrl
@Nonnull public String getUrl()
The url that will listen to notifications (must be https).- Returns:
- url
-
setUrl
public void setUrl(String url)
-
putAdditionalProperty
public WebhookBuilder 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 WebhookBuilder 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 WebhookBuilder
-
fromJson
public static WebhookBuilder fromJson(String jsonString) throws IOException
Create an instance of WebhookBuilder given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of WebhookBuilder
- Throws:
IOException- if the JSON string is invalid with respect to WebhookBuilder
-
toJson
public String toJson()
Convert an instance of WebhookBuilder to an JSON string- Returns:
- JSON string
-
-