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

com.unblu.webapi.model.v3.Account Maven / Gradle / Ivy

The newest version!

package com.unblu.webapi.model.v3;

import java.util.HashMap;
import java.util.Map;
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 an account. The contact and the billing address can be directly resolved when using the expand feature.
 */
@ApiModel(description = "Model of an account. The contact and the billing address can be directly resolved when using the expand feature.")

@JsonPropertyOrder({
	Account.JSON_PROPERTY_$_TYPE,
	Account.JSON_PROPERTY_ID,
	Account.JSON_PROPERTY_CREATION_TIMESTAMP,
	Account.JSON_PROPERTY_MODIFICATION_TIMESTAMP,
	Account.JSON_PROPERTY_VERSION,
	Account.JSON_PROPERTY_NAME,
	Account.JSON_PROPERTY_BILLING_ADDRESS,
	Account.JSON_PROPERTY_CONTACT_ADDRESS,
	Account.JSON_PROPERTY_AVATAR,
	Account.JSON_PROPERTY_TRANSLATIONS,
	Account.JSON_PROPERTY_CONFIGURATION,
	Account.JSON_PROPERTY_METADATA,
	Account.JSON_PROPERTY_TEXT,
})
@JsonAutoDetect(creatorVisibility = Visibility.NONE, fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class Account {
	/**
	 * Gets or Sets $type
	 */
	public enum TypeEnum {
		ACCOUNT("Account");

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

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

	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_NAME = "name";
	@JsonProperty(JSON_PROPERTY_NAME)
	private String name;

	public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress";
	@JsonProperty(JSON_PROPERTY_BILLING_ADDRESS)
	private ExpandableField
billingAddress = null; public static final String JSON_PROPERTY_CONTACT_ADDRESS = "contactAddress"; @JsonProperty(JSON_PROPERTY_CONTACT_ADDRESS) private ExpandableField
contactAddress = null; public static final String JSON_PROPERTY_AVATAR = "avatar"; @JsonProperty(JSON_PROPERTY_AVATAR) private ExpandableField avatar = null; public static final String JSON_PROPERTY_TRANSLATIONS = "translations"; @JsonProperty(JSON_PROPERTY_TRANSLATIONS) private Map translations = null; public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @JsonProperty(JSON_PROPERTY_CONFIGURATION) private Map _configuration = null; public static final String JSON_PROPERTY_METADATA = "metadata"; @JsonProperty(JSON_PROPERTY_METADATA) private Map metadata = null; public static final String JSON_PROPERTY_TEXT = "text"; @JsonProperty(JSON_PROPERTY_TEXT) private Map> text = null; public Account $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 Account 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 Account 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 Account 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 Account 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 Account name(String name) { this.name = name; return this; } /** * The name of the account. Maximum length of 250 characters and can not be empty. * * @return name **/ @ApiModelProperty(value = "The name of the account. Maximum length of 250 characters and can not be empty.") public String getName() { return name; } public void setName(String name) { this.name = name; } public Account billingAddress(ExpandableField
billingAddress) { this.billingAddress = billingAddress; return this; } /** * The id to an address which is used for billing, if the contact address should not be used. Should be null, if only contact address should be used.<br> * When creating the Account object, this property can be omitted as there are not addresses for this account anyway. If it is desired to directly define a * billing address for the account while creating it, the expand feature should be used. * * @return billingAddress **/ @ApiModelProperty(value = "The id to an address which is used for billing, if the contact address should not be used. Should be null, if only contact address should be used.
When creating the Account object, this property can be omitted as there are not addresses for this account anyway. If it is desired to directly define a billing address for the account while creating it, the expand feature should be used.") public ExpandableField
getBillingAddress() { return billingAddress; } public void setBillingAddress(ExpandableField
billingAddress) { this.billingAddress = billingAddress; } public Account contactAddress(ExpandableField
contactAddress) { this.contactAddress = contactAddress; return this; } /** * The id of the contact address for the account. Is also used for billing if no extra billing address is defined.<br> When creating the Account object, * this property can be omitted as there are not addresses for this account anyway. If it is desired to directly define a contact address for the account while * creating it, the expand feature should be used. * * @return contactAddress **/ @ApiModelProperty(value = "The id of the contact address for the account. Is also used for billing if no extra billing address is defined.
When creating the Account object, this property can be omitted as there are not addresses for this account anyway. If it is desired to directly define a contact address for the account while creating it, the expand feature should be used.") public ExpandableField
getContactAddress() { return contactAddress; } public void setContactAddress(ExpandableField
contactAddress) { this.contactAddress = contactAddress; } public Account avatar(ExpandableField avatar) { this.avatar = avatar; return this; } /** * Avatar of the entity: id that can be expanded. * * @return avatar **/ @ApiModelProperty(value = "Avatar of the entity: id that can be expanded.") public ExpandableField getAvatar() { return avatar; } public void setAvatar(ExpandableField avatar) { this.avatar = avatar; } public Account translations(Map translations) { this.translations = translations; return this; } public Account putTranslationsItem(String key, AccountTranslation translationsItem) { if (this.translations == null) { this.translations = new HashMap<>(); } this.translations.put(key, translationsItem); return this; } /** * A map of localized versions of the name of this entity * * @return translations **/ @ApiModelProperty(value = "A map of localized versions of the name of this entity") public Map getTranslations() { return translations; } public void setTranslations(Map translations) { this.translations = translations; } public Account _configuration(Map _configuration) { this._configuration = _configuration; return this; } public Account putConfigurationItem(String key, String _configurationItem) { if (this._configuration == null) { this._configuration = new HashMap<>(); } this._configuration.put(key, _configurationItem); return this; } /** * The entity's configuration properties. Only contains values when the 'expand' query parameter is used with the value 'configuration'. Not * filled in webhook events. * * @return _configuration **/ @ApiModelProperty(value = "The entity's configuration properties. Only contains values when the 'expand' query parameter is used with the value 'configuration'. Not filled in webhook events.") public Map getConfiguration() { return _configuration; } public void setConfiguration(Map _configuration) { this._configuration = _configuration; } public Account metadata(Map metadata) { this.metadata = metadata; return this; } public Account putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { this.metadata = new HashMap<>(); } this.metadata.put(key, metadataItem); return this; } /** * The entity's metadata properties. Only contains values when the 'expand' query parameter is used with the value 'metadata'. Not filled in * webhook events. * * @return metadata **/ @ApiModelProperty(value = "The entity's metadata properties. Only contains values when the 'expand' query parameter is used with the value 'metadata'. Not filled in webhook events.") public Map getMetadata() { return metadata; } public void setMetadata(Map metadata) { this.metadata = metadata; } public Account text(Map> text) { this.text = text; return this; } public Account putTextItem(String key, Map textItem) { if (this.text == null) { this.text = new HashMap<>(); } this.text.put(key, textItem); return this; } /** * The entity's text properties. Only contains values when the 'expand' query parameter is used with the value 'text'. Not filled in webhook * events. * * @return text **/ @ApiModelProperty(value = "The entity's text properties. Only contains values when the 'expand' query parameter is used with the value 'text'. Not filled in webhook events.") public Map> getText() { return text; } public void setText(Map> text) { this.text = text; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Account account = (Account) o; return Objects.equals(this.$type, account.$type) && Objects.equals(this.id, account.id) && Objects.equals(this.creationTimestamp, account.creationTimestamp) && Objects.equals(this.modificationTimestamp, account.modificationTimestamp) && Objects.equals(this.version, account.version) && Objects.equals(this.name, account.name) && Objects.equals(this.billingAddress, account.billingAddress) && Objects.equals(this.contactAddress, account.contactAddress) && Objects.equals(this.avatar, account.avatar) && Objects.equals(this.translations, account.translations) && Objects.equals(this._configuration, account._configuration) && Objects.equals(this.metadata, account.metadata) && Objects.equals(this.text, account.text); } @Override public int hashCode() { return Objects.hash($type, id, creationTimestamp, modificationTimestamp, version, name, billingAddress, contactAddress, avatar, translations, _configuration, metadata, text); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Account {\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(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); sb.append(" contactAddress: ").append(toIndentedString(contactAddress)).append("\n"); sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n"); sb.append(" translations: ").append(toIndentedString(translations)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" text: ").append(toIndentedString(text)).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 - 2024 Weber Informatics LLC | Privacy Policy