com.textmagic.sdk.model.SubaccountWithToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of textmagic-java-sdk Show documentation
Show all versions of textmagic-java-sdk Show documentation
Java wrapper library for Textmagic services
/*
* TextMagic API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.textmagic.sdk.model;
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 com.textmagic.sdk.model.Country;
import com.textmagic.sdk.model.Currency;
import com.textmagic.sdk.model.Timezone;
import com.textmagic.sdk.model.UserImage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* SubaccountWithToken
*/
public class SubaccountWithToken {
@SerializedName("id")
private Integer id = null;
@SerializedName("username")
private String username = null;
@SerializedName("firstName")
private String firstName = null;
@SerializedName("lastName")
private String lastName = null;
@SerializedName("email")
private String email = null;
/**
* Current account status: * **A** for Active; * **T** for Trial.
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
A("A"),
T("T");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("status")
private StatusEnum status = null;
@SerializedName("balance")
private Double balance = null;
@SerializedName("phone")
private String phone = null;
@SerializedName("company")
private String company = null;
@SerializedName("currency")
private Currency currency = null;
@SerializedName("country")
private Country country = null;
@SerializedName("timezone")
private Timezone timezone = null;
/**
* Type of account: * **A** for Administrator sub-account; * **U** for Regular User.
*/
@JsonAdapter(SubaccountTypeEnum.Adapter.class)
public enum SubaccountTypeEnum {
A("A"),
U("U");
private String value;
SubaccountTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static SubaccountTypeEnum fromValue(String text) {
for (SubaccountTypeEnum b : SubaccountTypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final SubaccountTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public SubaccountTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return SubaccountTypeEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("subaccountType")
private SubaccountTypeEnum subaccountType = null;
@SerializedName("emailAccepted")
private Boolean emailAccepted = null;
@SerializedName("phoneAccepted")
private Boolean phoneAccepted = null;
@SerializedName("avatar")
private UserImage avatar = null;
@SerializedName("token")
private String token = null;
public SubaccountWithToken id(Integer id) {
this.id = id;
return this;
}
/**
* Sub-account ID.
* @return id
**/
@ApiModelProperty(example = "1", required = true, value = "Sub-account ID.")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public SubaccountWithToken username(String username) {
this.username = username;
return this;
}
/**
* Username.
* @return username
**/
@ApiModelProperty(example = "charles.conway", required = true, value = "Username.")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public SubaccountWithToken firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Account first name.
* @return firstName
**/
@ApiModelProperty(example = "Charles", required = true, value = "Account first name.")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public SubaccountWithToken lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Account last name.
* @return lastName
**/
@ApiModelProperty(example = "Conway", required = true, value = "Account last name.")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public SubaccountWithToken email(String email) {
this.email = email;
return this;
}
/**
* Account Email address.
* @return email
**/
@ApiModelProperty(example = "[email protected]", required = true, value = "Account Email address.")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public SubaccountWithToken status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Current account status: * **A** for Active; * **T** for Trial.
* @return status
**/
@ApiModelProperty(required = true, value = "Current account status: * **A** for Active; * **T** for Trial. ")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public SubaccountWithToken balance(Double balance) {
this.balance = balance;
return this;
}
/**
* Account balance (in account currency).
* @return balance
**/
@ApiModelProperty(example = "208.64", required = true, value = "Account balance (in account currency).")
public Double getBalance() {
return balance;
}
public void setBalance(Double balance) {
this.balance = balance;
}
public SubaccountWithToken phone(String phone) {
this.phone = phone;
return this;
}
/**
* Contact phone number.
* @return phone
**/
@ApiModelProperty(example = "447860021130", required = true, value = "Contact phone number.")
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public SubaccountWithToken company(String company) {
this.company = company;
return this;
}
/**
* Account company name.
* @return company
**/
@ApiModelProperty(example = "Example Ltd.", required = true, value = "Account company name.")
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public SubaccountWithToken currency(Currency currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
**/
@ApiModelProperty(required = true, value = "")
public Currency getCurrency() {
return currency;
}
public void setCurrency(Currency currency) {
this.currency = currency;
}
public SubaccountWithToken country(Country country) {
this.country = country;
return this;
}
/**
* Get country
* @return country
**/
@ApiModelProperty(required = true, value = "")
public Country getCountry() {
return country;
}
public void setCountry(Country country) {
this.country = country;
}
public SubaccountWithToken timezone(Timezone timezone) {
this.timezone = timezone;
return this;
}
/**
* Get timezone
* @return timezone
**/
@ApiModelProperty(required = true, value = "")
public Timezone getTimezone() {
return timezone;
}
public void setTimezone(Timezone timezone) {
this.timezone = timezone;
}
public SubaccountWithToken subaccountType(SubaccountTypeEnum subaccountType) {
this.subaccountType = subaccountType;
return this;
}
/**
* Type of account: * **A** for Administrator sub-account; * **U** for Regular User.
* @return subaccountType
**/
@ApiModelProperty(example = "U", required = true, value = "Type of account: * **A** for Administrator sub-account; * **U** for Regular User. ")
public SubaccountTypeEnum getSubaccountType() {
return subaccountType;
}
public void setSubaccountType(SubaccountTypeEnum subaccountType) {
this.subaccountType = subaccountType;
}
public SubaccountWithToken emailAccepted(Boolean emailAccepted) {
this.emailAccepted = emailAccepted;
return this;
}
/**
* Does the account have a confirmed Email?.
* @return emailAccepted
**/
@ApiModelProperty(example = "true", required = true, value = "Does the account have a confirmed Email?.")
public Boolean isEmailAccepted() {
return emailAccepted;
}
public void setEmailAccepted(Boolean emailAccepted) {
this.emailAccepted = emailAccepted;
}
public SubaccountWithToken phoneAccepted(Boolean phoneAccepted) {
this.phoneAccepted = phoneAccepted;
return this;
}
/**
* Does the account have a confirmed Phone Number?.
* @return phoneAccepted
**/
@ApiModelProperty(example = "true", required = true, value = "Does the account have a confirmed Phone Number?.")
public Boolean isPhoneAccepted() {
return phoneAccepted;
}
public void setPhoneAccepted(Boolean phoneAccepted) {
this.phoneAccepted = phoneAccepted;
}
public SubaccountWithToken avatar(UserImage avatar) {
this.avatar = avatar;
return this;
}
/**
* Get avatar
* @return avatar
**/
@ApiModelProperty(required = true, value = "")
public UserImage getAvatar() {
return avatar;
}
public void setAvatar(UserImage avatar) {
this.avatar = avatar;
}
public SubaccountWithToken token(String token) {
this.token = token;
return this;
}
/**
* Access token of account.
* @return token
**/
@ApiModelProperty(example = "RANDOM_TOKEN", required = true, value = "Access token of account.")
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubaccountWithToken subaccountWithToken = (SubaccountWithToken) o;
return Objects.equals(this.id, subaccountWithToken.id) &&
Objects.equals(this.username, subaccountWithToken.username) &&
Objects.equals(this.firstName, subaccountWithToken.firstName) &&
Objects.equals(this.lastName, subaccountWithToken.lastName) &&
Objects.equals(this.email, subaccountWithToken.email) &&
Objects.equals(this.status, subaccountWithToken.status) &&
Objects.equals(this.balance, subaccountWithToken.balance) &&
Objects.equals(this.phone, subaccountWithToken.phone) &&
Objects.equals(this.company, subaccountWithToken.company) &&
Objects.equals(this.currency, subaccountWithToken.currency) &&
Objects.equals(this.country, subaccountWithToken.country) &&
Objects.equals(this.timezone, subaccountWithToken.timezone) &&
Objects.equals(this.subaccountType, subaccountWithToken.subaccountType) &&
Objects.equals(this.emailAccepted, subaccountWithToken.emailAccepted) &&
Objects.equals(this.phoneAccepted, subaccountWithToken.phoneAccepted) &&
Objects.equals(this.avatar, subaccountWithToken.avatar) &&
Objects.equals(this.token, subaccountWithToken.token);
}
@Override
public int hashCode() {
return Objects.hash(id, username, firstName, lastName, email, status, balance, phone, company, currency, country, timezone, subaccountType, emailAccepted, phoneAccepted, avatar, token);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubaccountWithToken {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
sb.append(" company: ").append(toIndentedString(company)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
sb.append(" subaccountType: ").append(toIndentedString(subaccountType)).append("\n");
sb.append(" emailAccepted: ").append(toIndentedString(emailAccepted)).append("\n");
sb.append(" phoneAccepted: ").append(toIndentedString(phoneAccepted)).append("\n");
sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n");
sb.append(" token: ").append(toIndentedString(token)).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 ");
}
}