All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.svix.models.EndpointIn Maven / Gradle / Ivy
/*
* Svix API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.svix.models;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* EndpointIn
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-11T19:05:15.341369Z[Etc/UTC]")
public class EndpointIn {
public static final String SERIALIZED_NAME_CHANNELS = "channels";
@SerializedName(SERIALIZED_NAME_CHANNELS)
private Set channels = null;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description = "";
public static final String SERIALIZED_NAME_DISABLED = "disabled";
@SerializedName(SERIALIZED_NAME_DISABLED)
private Boolean disabled = false;
public static final String SERIALIZED_NAME_FILTER_TYPES = "filterTypes";
@SerializedName(SERIALIZED_NAME_FILTER_TYPES)
private Set filterTypes = null;
public static final String SERIALIZED_NAME_METADATA = "metadata";
@SerializedName(SERIALIZED_NAME_METADATA)
private Map metadata = null;
public static final String SERIALIZED_NAME_RATE_LIMIT = "rateLimit";
@SerializedName(SERIALIZED_NAME_RATE_LIMIT)
private Integer rateLimit;
public static final String SERIALIZED_NAME_SECRET = "secret";
@SerializedName(SERIALIZED_NAME_SECRET)
private String secret;
public static final String SERIALIZED_NAME_UID = "uid";
@SerializedName(SERIALIZED_NAME_UID)
private String uid;
public static final String SERIALIZED_NAME_URL = "url";
@SerializedName(SERIALIZED_NAME_URL)
private URI url;
public static final String SERIALIZED_NAME_VERSION = "version";
@SerializedName(SERIALIZED_NAME_VERSION)
private Integer version = 1;
public EndpointIn channels(Set channels) {
this.channels = channels;
return this;
}
public EndpointIn addChannelsItem(String channelsItem) {
if (this.channels == null) {
this.channels = new LinkedHashSet<>();
}
this.channels.add(channelsItem);
return this;
}
/**
* List of message channels this endpoint listens to (omit for all)
* @return channels
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"project_123\",\"group_2\"]", value = "List of message channels this endpoint listens to (omit for all)")
public Set getChannels() {
return channels;
}
public void setChannels(Set channels) {
this.channels = channels;
}
public EndpointIn description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "An example endpoint name", value = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EndpointIn disabled(Boolean disabled) {
this.disabled = disabled;
return this;
}
/**
* Get disabled
* @return disabled
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "false", value = "")
public Boolean getDisabled() {
return disabled;
}
public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}
public EndpointIn filterTypes(Set filterTypes) {
this.filterTypes = filterTypes;
return this;
}
public EndpointIn addFilterTypesItem(String filterTypesItem) {
if (this.filterTypes == null) {
this.filterTypes = new LinkedHashSet<>();
}
this.filterTypes.add(filterTypesItem);
return this;
}
/**
* Get filterTypes
* @return filterTypes
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"user.signup\",\"user.deleted\"]", value = "")
public Set getFilterTypes() {
return filterTypes;
}
public void setFilterTypes(Set filterTypes) {
this.filterTypes = filterTypes;
}
public EndpointIn metadata(Map metadata) {
this.metadata = metadata;
return this;
}
public EndpointIn putMetadataItem(String key, String metadataItem) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, metadataItem);
return this;
}
/**
* Get metadata
* @return metadata
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMetadata() {
return metadata;
}
public void setMetadata(Map metadata) {
this.metadata = metadata;
}
public EndpointIn rateLimit(Integer rateLimit) {
this.rateLimit = rateLimit;
return this;
}
/**
* Get rateLimit
* minimum: 1
* @return rateLimit
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getRateLimit() {
return rateLimit;
}
public void setRateLimit(Integer rateLimit) {
this.rateLimit = rateLimit;
}
public EndpointIn secret(String secret) {
this.secret = secret;
return this;
}
/**
* The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
* @return secret
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD", value = "The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.")
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public EndpointIn uid(String uid) {
this.uid = uid;
return this;
}
/**
* Optional unique identifier for the endpoint
* @return uid
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "unique-ep-identifier", value = "Optional unique identifier for the endpoint")
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public EndpointIn url(URI url) {
this.url = url;
return this;
}
/**
* Get url
* @return url
**/
@ApiModelProperty(example = "https://example.com/webhook/", required = true, value = "")
public URI getUrl() {
return url;
}
public void setUrl(URI url) {
this.url = url;
}
public EndpointIn version(Integer version) {
this.version = version;
return this;
}
/**
* Get version
* minimum: 1
* @return version
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EndpointIn endpointIn = (EndpointIn) o;
return Objects.equals(this.channels, endpointIn.channels) &&
Objects.equals(this.description, endpointIn.description) &&
Objects.equals(this.disabled, endpointIn.disabled) &&
Objects.equals(this.filterTypes, endpointIn.filterTypes) &&
Objects.equals(this.metadata, endpointIn.metadata) &&
Objects.equals(this.rateLimit, endpointIn.rateLimit) &&
Objects.equals(this.secret, endpointIn.secret) &&
Objects.equals(this.uid, endpointIn.uid) &&
Objects.equals(this.url, endpointIn.url) &&
Objects.equals(this.version, endpointIn.version);
}
@Override
public int hashCode() {
return Objects.hash(channels, description, disabled, filterTypes, metadata, rateLimit, secret, uid, url, version);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EndpointIn {\n");
sb.append(" channels: ").append(toIndentedString(channels)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n");
sb.append(" filterTypes: ").append(toIndentedString(filterTypes)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" rateLimit: ").append(toIndentedString(rateLimit)).append("\n");
sb.append(" secret: ").append(toIndentedString(secret)).append("\n");
sb.append(" uid: ").append(toIndentedString(uid)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}