jp.co.freee.accounting.models.Bank Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freee-accounting-sdk Show documentation
Show all versions of freee-accounting-sdk Show documentation
freee accounting client SDK for Java
/*
* freee API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package jp.co.freee.accounting.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 org.openapitools.jackson.nullable.JsonNullable;
/**
* Bank
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Bank {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_NAME_KANA = "name_kana";
@SerializedName(SERIALIZED_NAME_NAME_KANA)
private String nameKana;
/**
* 連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
BANK_ACCOUNT("bank_account"),
CREDIT_CARD("credit_card"),
WALLET("wallet");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
public Bank() {
}
public Bank id(Integer id) {
this.id = id;
return this;
}
/**
* 連携サービスID
* minimum: 1
* maximum: 2147483647
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "連携サービスID")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Bank name(String name) {
this.name = name;
return this;
}
/**
* 連携サービス名
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "フリー銀行", value = "連携サービス名")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Bank nameKana(String nameKana) {
this.nameKana = nameKana;
return this;
}
/**
* 連携サービス名(カナ)
* @return nameKana
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "フリーギンコウ", value = "連携サービス名(カナ)")
public String getNameKana() {
return nameKana;
}
public void setNameKana(String nameKana) {
this.nameKana = nameKana;
}
public Bank type(TypeEnum type) {
this.type = type;
return this;
}
/**
* 連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "bank_account", value = "連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Bank bank = (Bank) o;
return Objects.equals(this.id, bank.id) &&
Objects.equals(this.name, bank.name) &&
Objects.equals(this.nameKana, bank.nameKana) &&
Objects.equals(this.type, bank.type);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(id, name, nameKana, type);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Bank {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" nameKana: ").append(toIndentedString(nameKana)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}
}