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

jp.co.freee.accounting.models.CompanyIndexResponseCompanies Maven / Gradle / Ivy

There is a newer version: 2.29.0
Show newest version
/*
 * 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;

/**
 * CompanyIndexResponseCompanies
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CompanyIndexResponseCompanies {
  public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name";
  @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
  private String displayName;

  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;

  /**
   * ユーザーの権限
   */
  @JsonAdapter(RoleEnum.Adapter.class)
  public enum RoleEnum {
    ADMIN("admin"),
    
    SIMPLE_ACCOUNTING("simple_accounting"),
    
    SELF_ONLY("self_only"),
    
    READ_ONLY("read_only"),
    
    WORKFLOW("workflow");

    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 value) {
      for (RoleEnum b : RoleEnum.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 RoleEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public RoleEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return RoleEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ROLE = "role";
  @SerializedName(SERIALIZED_NAME_ROLE)
  private RoleEnum role;

  public CompanyIndexResponseCompanies() { 
  }

  public CompanyIndexResponseCompanies displayName(String displayName) {
    
    this.displayName = displayName;
    return this;
  }

   /**
   * 事業所名
   * @return displayName
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "freee事務所", required = true, value = "事業所名")

  public String getDisplayName() {
    return displayName;
  }


  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }


  public CompanyIndexResponseCompanies 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 CompanyIndexResponseCompanies name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * 事業所名
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "freee事務所", required = true, value = "事業所名")

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public CompanyIndexResponseCompanies nameKana(String nameKana) {
    
    this.nameKana = nameKana;
    return this;
  }

   /**
   * 事業所名(カナ)
   * @return nameKana
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "フリージムショ", required = true, value = "事業所名(カナ)")

  public String getNameKana() {
    return nameKana;
  }


  public void setNameKana(String nameKana) {
    this.nameKana = nameKana;
  }


  public CompanyIndexResponseCompanies role(RoleEnum role) {
    
    this.role = role;
    return this;
  }

   /**
   * ユーザーの権限
   * @return role
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "admin", required = true, value = "ユーザーの権限")

  public RoleEnum getRole() {
    return role;
  }


  public void setRole(RoleEnum role) {
    this.role = role;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CompanyIndexResponseCompanies companyIndexResponseCompanies = (CompanyIndexResponseCompanies) o;
    return Objects.equals(this.displayName, companyIndexResponseCompanies.displayName) &&
        Objects.equals(this.id, companyIndexResponseCompanies.id) &&
        Objects.equals(this.name, companyIndexResponseCompanies.name) &&
        Objects.equals(this.nameKana, companyIndexResponseCompanies.nameKana) &&
        Objects.equals(this.role, companyIndexResponseCompanies.role);
  }

  @Override
  public int hashCode() {
    return Objects.hash(displayName, id, name, nameKana, role);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CompanyIndexResponseCompanies {\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\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("    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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy