Package com.onfido.model
Class WebhookShared
- java.lang.Object
-
- com.onfido.model.WebhookShared
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.9.0") public class WebhookShared extends Object
WebhookShared
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebhookShared.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_VERSION
-
Constructor Summary
Constructors Constructor Description WebhookShared()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhookSharedaddEnvironmentsItem(String environmentsItem)WebhookSharedaddEventsItem(WebhookEventType eventsItem)WebhookSharedenabled(Boolean enabled)WebhookSharedenvironments(List<String> environments)booleanequals(Object o)WebhookSharedevents(List<WebhookEventType> events)static WebhookSharedfromJson(String jsonString)Create an instance of WebhookShared 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.inthashCode()WebhookSharedpayloadVersion(Integer payloadVersion)WebhookSharedputAdditionalProperty(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)StringtoJson()Convert an instance of WebhookShared to an JSON stringStringtoString()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
-
-
Method Detail
-
enabled
public WebhookShared enabled(Boolean enabled)
-
getEnabled
@Nullable public Boolean getEnabled()
Determine if the webhook is active.- Returns:
- enabled
-
setEnabled
public void setEnabled(Boolean enabled)
-
events
public WebhookShared events(List<WebhookEventType> events)
-
addEventsItem
public WebhookShared 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 WebhookShared environments(List<String> environments)
-
addEnvironmentsItem
public WebhookShared 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 WebhookShared 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)
-
putAdditionalProperty
public WebhookShared 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 WebhookShared 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 WebhookShared
-
fromJson
public static WebhookShared fromJson(String jsonString) throws IOException
Create an instance of WebhookShared given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of WebhookShared
- Throws:
IOException- if the JSON string is invalid with respect to WebhookShared
-
toJson
public String toJson()
Convert an instance of WebhookShared to an JSON string- Returns:
- JSON string
-
-