/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.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;

/**
 * CustomFieldMatrixColumnDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class CustomFieldMatrixColumnDto {
  /**
   * Gets or Sets columnUse
   */
  @JsonAdapter(ColumnUseEnum.Adapter.class)
  public enum ColumnUseEnum {
    KEY("USE_KEY"),
    
    VALUE("USE_VALUE");

    private String value;

    ColumnUseEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ColumnUseEnum fromValue(String value) {
      for (ColumnUseEnum b : ColumnUseEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<ColumnUseEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final ColumnUseEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_COLUMN_USE = "columnUse";
  @SerializedName(SERIALIZED_NAME_COLUMN_USE)
  private ColumnUseEnum columnUse;

  public static final String SERIALIZED_NAME_POSITION = "position";
  @SerializedName(SERIALIZED_NAME_POSITION)
  private Integer position;

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private String code;

  public static final String SERIALIZED_NAME_LABEL = "label";
  @SerializedName(SERIALIZED_NAME_LABEL)
  private String label;

  /**
   * Gets or Sets keyType
   */
  @JsonAdapter(KeyTypeEnum.Adapter.class)
  public enum KeyTypeEnum {
    STRING("STRING"),
    
    LONG("LONG"),
    
    DOUBLE("DOUBLE"),
    
    RON("RON");

    private String value;

    KeyTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static KeyTypeEnum fromValue(String value) {
      for (KeyTypeEnum b : KeyTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<KeyTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final KeyTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_KEY_TYPE = "keyType";
  @SerializedName(SERIALIZED_NAME_KEY_TYPE)
  private KeyTypeEnum keyType;


  public CustomFieldMatrixColumnDto columnUse(ColumnUseEnum columnUse) {
    
    this.columnUse = columnUse;
    return this;
  }

   /**
   * Get columnUse
   * @return columnUse
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ColumnUseEnum getColumnUse() {
    return columnUse;
  }



  public void setColumnUse(ColumnUseEnum columnUse) {
    this.columnUse = columnUse;
  }


  public CustomFieldMatrixColumnDto position(Integer position) {
    
    this.position = position;
    return this;
  }

   /**
   * Get position
   * @return position
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Integer getPosition() {
    return position;
  }



  public void setPosition(Integer position) {
    this.position = position;
  }


  public CustomFieldMatrixColumnDto code(String code) {
    
    this.code = code;
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getCode() {
    return code;
  }



  public void setCode(String code) {
    this.code = code;
  }


  public CustomFieldMatrixColumnDto label(String label) {
    
    this.label = label;
    return this;
  }

   /**
   * Get label
   * @return label
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getLabel() {
    return label;
  }



  public void setLabel(String label) {
    this.label = label;
  }


  public CustomFieldMatrixColumnDto keyType(KeyTypeEnum keyType) {
    
    this.keyType = keyType;
    return this;
  }

   /**
   * Get keyType
   * @return keyType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public KeyTypeEnum getKeyType() {
    return keyType;
  }



  public void setKeyType(KeyTypeEnum keyType) {
    this.keyType = keyType;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CustomFieldMatrixColumnDto customFieldMatrixColumnDto = (CustomFieldMatrixColumnDto) o;
    return Objects.equals(this.columnUse, customFieldMatrixColumnDto.columnUse) &&
        Objects.equals(this.position, customFieldMatrixColumnDto.position) &&
        Objects.equals(this.code, customFieldMatrixColumnDto.code) &&
        Objects.equals(this.label, customFieldMatrixColumnDto.label) &&
        Objects.equals(this.keyType, customFieldMatrixColumnDto.keyType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(columnUse, position, code, label, keyType);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CustomFieldMatrixColumnDto {\n");
    sb.append("    columnUse: ").append(toIndentedString(columnUse)).append("\n");
    sb.append("    position: ").append(toIndentedString(position)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    label: ").append(toIndentedString(label)).append("\n");
    sb.append("    keyType: ").append(toIndentedString(keyType)).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    ");
  }

}

