
com.unblu.webapi.model.v3.WebhookRegistration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of models-v3 Show documentation
Show all versions of models-v3 Show documentation
Java classes corresponding to the JSON bodies
package com.unblu.webapi.model.v3;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model of a webhook registration. Registered webhooks for certain events are stored inside this model.
*/
@ApiModel(description = "Model of a webhook registration. Registered webhooks for certain events are stored inside this model.")
@JsonPropertyOrder({
WebhookRegistration.JSON_PROPERTY_$_TYPE,
WebhookRegistration.JSON_PROPERTY_ID,
WebhookRegistration.JSON_PROPERTY_CREATION_TIMESTAMP,
WebhookRegistration.JSON_PROPERTY_MODIFICATION_TIMESTAMP,
WebhookRegistration.JSON_PROPERTY_VERSION,
WebhookRegistration.JSON_PROPERTY_ACCOUNT_ID,
WebhookRegistration.JSON_PROPERTY_NAME,
WebhookRegistration.JSON_PROPERTY_STATUS,
WebhookRegistration.JSON_PROPERTY_DESCRIPTION,
WebhookRegistration.JSON_PROPERTY_ENDPOINT,
WebhookRegistration.JSON_PROPERTY_API_VERSION,
WebhookRegistration.JSON_PROPERTY_SECRET,
WebhookRegistration.JSON_PROPERTY_EVENTS,
})
@JsonAutoDetect(creatorVisibility = Visibility.NONE, fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class WebhookRegistration {
/**
* Gets or Sets $type
*/
public enum TypeEnum {
WEBHOOKREGISTRATION("WebhookRegistration");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return TypeEnum.WEBHOOKREGISTRATION;
}
}
public static final String JSON_PROPERTY_$_TYPE = "$_type";
@JsonProperty(JSON_PROPERTY_$_TYPE)
private TypeEnum $type = TypeEnum.WEBHOOKREGISTRATION;
public static final String JSON_PROPERTY_ID = "id";
@JsonProperty(JSON_PROPERTY_ID)
private String id;
public static final String JSON_PROPERTY_CREATION_TIMESTAMP = "creationTimestamp";
@JsonProperty(JSON_PROPERTY_CREATION_TIMESTAMP)
private Long creationTimestamp;
public static final String JSON_PROPERTY_MODIFICATION_TIMESTAMP = "modificationTimestamp";
@JsonProperty(JSON_PROPERTY_MODIFICATION_TIMESTAMP)
private Long modificationTimestamp;
public static final String JSON_PROPERTY_VERSION = "version";
@JsonProperty(JSON_PROPERTY_VERSION)
private Long version;
public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId";
@JsonProperty(JSON_PROPERTY_ACCOUNT_ID)
private String accountId;
public static final String JSON_PROPERTY_NAME = "name";
@JsonProperty(JSON_PROPERTY_NAME)
private String name;
public static final String JSON_PROPERTY_STATUS = "status";
@JsonProperty(JSON_PROPERTY_STATUS)
private ERegistrationStatus status;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
private String description;
public static final String JSON_PROPERTY_ENDPOINT = "endpoint";
@JsonProperty(JSON_PROPERTY_ENDPOINT)
private String endpoint;
public static final String JSON_PROPERTY_API_VERSION = "apiVersion";
@JsonProperty(JSON_PROPERTY_API_VERSION)
private EWebApiVersion apiVersion;
public static final String JSON_PROPERTY_SECRET = "secret";
@JsonProperty(JSON_PROPERTY_SECRET)
private String secret;
public static final String JSON_PROPERTY_EVENTS = "events";
@JsonProperty(JSON_PROPERTY_EVENTS)
private List events = null;
public WebhookRegistration $type(TypeEnum $type) {
this.$type = $type;
return this;
}
/**
* Get $type
*
* @return $type
**/
@ApiModelProperty(value = "")
public TypeEnum get$Type() {
return $type;
}
public void set$Type(TypeEnum $type) {
this.$type = $type;
}
public WebhookRegistration id(String id) {
this.id = id;
return this;
}
/**
* Unique id of the entity. When creating an entity this property can be omitted as it will be generated by the server anyway.
*
* @return id
**/
@ApiModelProperty(value = "Unique id of the entity. When creating an entity this property can be omitted as it will be generated by the server anyway.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public WebhookRegistration creationTimestamp(Long creationTimestamp) {
this.creationTimestamp = creationTimestamp;
return this;
}
/**
* Creation timestamp of the entity. It is defined when the entity is stored the first time in the system. It is ignored, when sending it to the server and
* therefore can be omitted. Note: If you set this property it will return the same value but it will not be written to the storage and will not effect the data
* consistency.
*
* @return creationTimestamp
**/
@ApiModelProperty(value = "Creation timestamp of the entity. It is defined when the entity is stored the first time in the system. It is ignored, when sending it to the server and therefore can be omitted. Note: If you set this property it will return the same value but it will not be written to the storage and will not effect the data consistency.")
public Long getCreationTimestamp() {
return creationTimestamp;
}
public void setCreationTimestamp(Long creationTimestamp) {
this.creationTimestamp = creationTimestamp;
}
public WebhookRegistration modificationTimestamp(Long modificationTimestamp) {
this.modificationTimestamp = modificationTimestamp;
return this;
}
/**
* Timestamp of the last modification. This property is always optional and can be omitted, when sending data to the server. It is only of informational
* character. It is ignored, when sending it to the server and therefore can be omitted. Note: If you set this property it will return the same value but it
* will not be written to the storage and will not effect the data consistency.
*
* @return modificationTimestamp
**/
@ApiModelProperty(value = "Timestamp of the last modification. This property is always optional and can be omitted, when sending data to the server. It is only of informational character. It is ignored, when sending it to the server and therefore can be omitted. Note: If you set this property it will return the same value but it will not be written to the storage and will not effect the data consistency.")
public Long getModificationTimestamp() {
return modificationTimestamp;
}
public void setModificationTimestamp(Long modificationTimestamp) {
this.modificationTimestamp = modificationTimestamp;
}
public WebhookRegistration version(Long version) {
this.version = version;
return this;
}
/**
* Version of the entity. Will be incremented on each change. New updates must always be based on the newest version, if not updates will be rejected. When
* creating an object, the version can be omitted.
*
* @return version
**/
@ApiModelProperty(value = "Version of the entity. Will be incremented on each change. New updates must always be based on the newest version, if not updates will be rejected. When creating an object, the version can be omitted.")
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
public WebhookRegistration accountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* ID of the account the entity belongs to. When creating an entity, the account ID can be omitted. It will be filled by the server with the account ID of the
* user currently logged in. When editing an entity, you must include the account ID.
*
* @return accountId
**/
@ApiModelProperty(value = "ID of the account the entity belongs to. When creating an entity, the account ID can be omitted. It will be filled by the server with the account ID of the user currently logged in. When editing an entity, you must include the account ID.")
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public WebhookRegistration name(String name) {
this.name = name;
return this;
}
/**
* Name of the webhook registration. Maximum length of 250 characters. Can not be omitted.
*
* @return name
**/
@ApiModelProperty(value = "Name of the webhook registration. Maximum length of 250 characters. Can not be omitted.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public WebhookRegistration status(ERegistrationStatus status) {
this.status = status;
return this;
}
/**
* Get status
*
* @return status
**/
@ApiModelProperty(value = "")
public ERegistrationStatus getStatus() {
return status;
}
public void setStatus(ERegistrationStatus status) {
this.status = status;
}
public WebhookRegistration description(String description) {
this.description = description;
return this;
}
/**
* Description of the webhook registration. Maximum length of 500 characters. Can be omitted.
*
* @return description
**/
@ApiModelProperty(value = "Description of the webhook registration. Maximum length of 500 characters. Can be omitted.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public WebhookRegistration endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
/**
* The endpoint url of the webhook registration. To this url the requests for the webhook events are done. Maximum length of 4000 characters. Can be omitted,
* but should not.
*
* @return endpoint
**/
@ApiModelProperty(value = "The endpoint url of the webhook registration. To this url the requests for the webhook events are done. Maximum length of 4000 characters. Can be omitted, but should not.")
public String getEndpoint() {
return endpoint;
}
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
public WebhookRegistration apiVersion(EWebApiVersion apiVersion) {
this.apiVersion = apiVersion;
return this;
}
/**
* Get apiVersion
*
* @return apiVersion
**/
@ApiModelProperty(value = "")
public EWebApiVersion getApiVersion() {
return apiVersion;
}
public void setApiVersion(EWebApiVersion apiVersion) {
this.apiVersion = apiVersion;
}
public WebhookRegistration secret(String secret) {
this.secret = secret;
return this;
}
/**
* A secret which is send with each webhook event. Maximum length of 4000 characters. Can be omitted.
*
* @return secret
**/
@ApiModelProperty(value = "A secret which is send with each webhook event. Maximum length of 4000 characters. Can be omitted.")
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public WebhookRegistration events(List events) {
this.events = events;
return this;
}
public WebhookRegistration addEventsItem(String eventsItem) {
if (this.events == null) {
this.events = new ArrayList<>();
}
this.events.add(eventsItem);
return this;
}
/**
* Events for which the webhook endpoint is called, if they occur. Can not be omitted. Check the Webhook Events for possible values.
*
* @return events
**/
@ApiModelProperty(value = "Events for which the webhook endpoint is called, if they occur. Can not be omitted. Check the Webhook Events for possible values.")
public List getEvents() {
return events;
}
public void setEvents(List events) {
this.events = events;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WebhookRegistration webhookRegistration = (WebhookRegistration) o;
return Objects.equals(this.$type, webhookRegistration.$type) &&
Objects.equals(this.id, webhookRegistration.id) &&
Objects.equals(this.creationTimestamp, webhookRegistration.creationTimestamp) &&
Objects.equals(this.modificationTimestamp, webhookRegistration.modificationTimestamp) &&
Objects.equals(this.version, webhookRegistration.version) &&
Objects.equals(this.accountId, webhookRegistration.accountId) &&
Objects.equals(this.name, webhookRegistration.name) &&
Objects.equals(this.status, webhookRegistration.status) &&
Objects.equals(this.description, webhookRegistration.description) &&
Objects.equals(this.endpoint, webhookRegistration.endpoint) &&
Objects.equals(this.apiVersion, webhookRegistration.apiVersion) &&
Objects.equals(this.secret, webhookRegistration.secret) &&
Objects.equals(this.events, webhookRegistration.events);
}
@Override
public int hashCode() {
return Objects.hash($type, id, creationTimestamp, modificationTimestamp, version, accountId, name, status, description, endpoint, apiVersion, secret, events);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WebhookRegistration {\n");
sb.append(" $type: ").append(toIndentedString($type)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" creationTimestamp: ").append(toIndentedString(creationTimestamp)).append("\n");
sb.append(" modificationTimestamp: ").append(toIndentedString(modificationTimestamp)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n");
sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
sb.append(" secret: ").append(toIndentedString(secret)).append("\n");
sb.append(" events: ").append(toIndentedString(events)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy