com.textmagic.sdk.model.InviteSubaccountInputObject 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* InviteSubaccountInputObject
*/
public class InviteSubaccountInputObject {
@SerializedName("email")
private String email = null;
/**
* Type of account: * **A** for Administrator sub-account; * **U** for Regular User.
*/
@JsonAdapter(RoleEnum.Adapter.class)
public enum RoleEnum {
A("A"),
U("U");
private String value;
RoleEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static RoleEnum fromValue(String text) {
for (RoleEnum b : RoleEnum.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 RoleEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public RoleEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return RoleEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("role")
private RoleEnum role = null;
public InviteSubaccountInputObject email(String email) {
this.email = email;
return this;
}
/**
* The invitation email will be sent to this email address.
* @return email
**/
@ApiModelProperty(example = "[email protected]", value = "The invitation email will be sent to this email address.")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public InviteSubaccountInputObject role(RoleEnum role) {
this.role = role;
return this;
}
/**
* Type of account: * **A** for Administrator sub-account; * **U** for Regular User.
* @return role
**/
@ApiModelProperty(example = "U", value = "Type of account: * **A** for Administrator sub-account; * **U** for Regular User. ")
public RoleEnum getRole() {
return role;
}
public void setRole(RoleEnum role) {
this.role = role;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InviteSubaccountInputObject inviteSubaccountInputObject = (InviteSubaccountInputObject) o;
return Objects.equals(this.email, inviteSubaccountInputObject.email) &&
Objects.equals(this.role, inviteSubaccountInputObject.role);
}
@Override
public int hashCode() {
return Objects.hash(email, role);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InviteSubaccountInputObject {\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).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 ");
}
}