All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.unblu.webapi.model.v4.AcceptLinkData Maven / Gradle / Ivy


package com.unblu.webapi.model.v4;

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 with information about links to accept conversation invitations
 */
@ApiModel(description = "Model with information about links to accept conversation invitations")

@JsonPropertyOrder({
	AcceptLinkData.JSON_PROPERTY_$_TYPE,
	AcceptLinkData.JSON_PROPERTY_ACCOUNT_ID,
	AcceptLinkData.JSON_PROPERTY_CONVERSATION_ID,
	AcceptLinkData.JSON_PROPERTY_LINKS,
	AcceptLinkData.JSON_PROPERTY_EXPIRATION_TIMESTAMP,
})
@JsonAutoDetect(creatorVisibility = Visibility.NONE, fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class AcceptLinkData {
	/**
	 * Gets or Sets $type
	 */
	public enum TypeEnum {
		ACCEPTLINKDATA("AcceptLinkData");

		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.ACCEPTLINKDATA;
		}
	}

	public static final String JSON_PROPERTY_$_TYPE = "$_type";
	@JsonProperty(JSON_PROPERTY_$_TYPE)
	private TypeEnum $type = TypeEnum.ACCEPTLINKDATA;

	public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId";
	@JsonProperty(JSON_PROPERTY_ACCOUNT_ID)
	private String accountId;

	public static final String JSON_PROPERTY_CONVERSATION_ID = "conversationId";
	@JsonProperty(JSON_PROPERTY_CONVERSATION_ID)
	private String conversationId;

	public static final String JSON_PROPERTY_LINKS = "links";
	@JsonProperty(JSON_PROPERTY_LINKS)
	private List links = null;

	public static final String JSON_PROPERTY_EXPIRATION_TIMESTAMP = "expirationTimestamp";
	@JsonProperty(JSON_PROPERTY_EXPIRATION_TIMESTAMP)
	private Long expirationTimestamp;

	public AcceptLinkData $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 AcceptLinkData accountId(String accountId) {
		this.accountId = accountId;
		return this;
	}

	/**
	 * The account ID of the conversation
	 * 
	 * @return accountId
	 **/
	@ApiModelProperty(value = "The account ID of the conversation")
	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public AcceptLinkData conversationId(String conversationId) {
		this.conversationId = conversationId;
		return this;
	}

	/**
	 * The conversation ID
	 * 
	 * @return conversationId
	 **/
	@ApiModelProperty(value = "The conversation ID")
	public String getConversationId() {
		return conversationId;
	}

	public void setConversationId(String conversationId) {
		this.conversationId = conversationId;
	}

	public AcceptLinkData links(List links) {
		this.links = links;
		return this;
	}

	public AcceptLinkData addLinksItem(ConversationLink linksItem) {
		if (this.links == null) {
			this.links = new ArrayList<>();
		}
		this.links.add(linksItem);
		return this;
	}

	/**
	 * List of links to accept the invitation and open the corresponding conversation.<br> Only one link may be used.
	 * 
	 * @return links
	 **/
	@ApiModelProperty(value = "List of links to accept the invitation and open the corresponding conversation.
Only one link may be used.") public List getLinks() { return links; } public void setLinks(List links) { this.links = links; } public AcceptLinkData expirationTimestamp(Long expirationTimestamp) { this.expirationTimestamp = expirationTimestamp; return this; } /** * Unix timestamp after which the invitation is no longer valid * * @return expirationTimestamp **/ @ApiModelProperty(value = "Unix timestamp after which the invitation is no longer valid") public Long getExpirationTimestamp() { return expirationTimestamp; } public void setExpirationTimestamp(Long expirationTimestamp) { this.expirationTimestamp = expirationTimestamp; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AcceptLinkData acceptLinkData = (AcceptLinkData) o; return Objects.equals(this.$type, acceptLinkData.$type) && Objects.equals(this.accountId, acceptLinkData.accountId) && Objects.equals(this.conversationId, acceptLinkData.conversationId) && Objects.equals(this.links, acceptLinkData.links) && Objects.equals(this.expirationTimestamp, acceptLinkData.expirationTimestamp); } @Override public int hashCode() { return Objects.hash($type, accountId, conversationId, links, expirationTimestamp); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AcceptLinkData {\n"); sb.append(" $type: ").append(toIndentedString($type)).append("\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append(" expirationTimestamp: ").append(toIndentedString(expirationTimestamp)).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