/*
 * 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;
import org.openapitools.client.model.MeasurableQuantityDto;

/**
 * PieChartDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class PieChartDto {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

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

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_UPDATED_CODE = "updatedCode";
  @SerializedName(SERIALIZED_NAME_UPDATED_CODE)
  private String updatedCode;

  public static final String SERIALIZED_NAME_DISABLED = "disabled";
  @SerializedName(SERIALIZED_NAME_DISABLED)
  private Boolean disabled;

  public static final String SERIALIZED_NAME_MEASURABLE_QUANTITY = "measurableQuantity";
  @SerializedName(SERIALIZED_NAME_MEASURABLE_QUANTITY)
  private MeasurableQuantityDto measurableQuantity;

  public static final String SERIALIZED_NAME_WIDTH = "width";
  @SerializedName(SERIALIZED_NAME_WIDTH)
  private String width;

  public static final String SERIALIZED_NAME_HEIGHT = "height";
  @SerializedName(SERIALIZED_NAME_HEIGHT)
  private String height;

  public static final String SERIALIZED_NAME_STYLE = "style";
  @SerializedName(SERIALIZED_NAME_STYLE)
  private String style;

  public static final String SERIALIZED_NAME_STYLE_CLASS = "styleClass";
  @SerializedName(SERIALIZED_NAME_STYLE_CLASS)
  private String styleClass;

  public static final String SERIALIZED_NAME_EXTENDER = "extender";
  @SerializedName(SERIALIZED_NAME_EXTENDER)
  private String extender;

  public static final String SERIALIZED_NAME_VISIBLE = "visible";
  @SerializedName(SERIALIZED_NAME_VISIBLE)
  private Boolean visible;

  public static final String SERIALIZED_NAME_FILLED = "filled";
  @SerializedName(SERIALIZED_NAME_FILLED)
  private Boolean filled;

  /**
   * Gets or Sets legendPosition
   */
  @JsonAdapter(LegendPositionEnum.Adapter.class)
  public enum LegendPositionEnum {
    N("n"),
    
    S("s"),
    
    E("e"),
    
    W("w");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_LEGEND_POSITION = "legendPosition";
  @SerializedName(SERIALIZED_NAME_LEGEND_POSITION)
  private LegendPositionEnum legendPosition;

  public static final String SERIALIZED_NAME_SERIES_COLORS = "seriesColors";
  @SerializedName(SERIALIZED_NAME_SERIES_COLORS)
  private String seriesColors;

  public static final String SERIALIZED_NAME_DIAMETER = "diameter";
  @SerializedName(SERIALIZED_NAME_DIAMETER)
  private Integer diameter;

  public static final String SERIALIZED_NAME_SLICE_MARGIN = "sliceMargin";
  @SerializedName(SERIALIZED_NAME_SLICE_MARGIN)
  private Integer sliceMargin;

  public static final String SERIALIZED_NAME_SHADOW = "shadow";
  @SerializedName(SERIALIZED_NAME_SHADOW)
  private Boolean shadow;

  public static final String SERIALIZED_NAME_SHOW_DATA_LABELS = "showDataLabels";
  @SerializedName(SERIALIZED_NAME_SHOW_DATA_LABELS)
  private Boolean showDataLabels;

  public static final String SERIALIZED_NAME_LEGEND_COLS = "legendCols";
  @SerializedName(SERIALIZED_NAME_LEGEND_COLS)
  private Integer legendCols;

  public static final String SERIALIZED_NAME_LEGEND_ROWS = "legendRows";
  @SerializedName(SERIALIZED_NAME_LEGEND_ROWS)
  private Integer legendRows;


  public PieChartDto id(Long id) {
    
    this.id = id;
    return this;
  }

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

  public Long getId() {
    return id;
  }



  public void setId(Long id) {
    this.id = id;
  }


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

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

  public String getDescription() {
    return description;
  }



  public void setDescription(String description) {
    this.description = description;
  }


  public PieChartDto updatedCode(String updatedCode) {
    
    this.updatedCode = updatedCode;
    return this;
  }

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

  public String getUpdatedCode() {
    return updatedCode;
  }



  public void setUpdatedCode(String updatedCode) {
    this.updatedCode = updatedCode;
  }


  public PieChartDto disabled(Boolean disabled) {
    
    this.disabled = disabled;
    return this;
  }

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

  public Boolean getDisabled() {
    return disabled;
  }



  public void setDisabled(Boolean disabled) {
    this.disabled = disabled;
  }


  public PieChartDto measurableQuantity(MeasurableQuantityDto measurableQuantity) {
    
    this.measurableQuantity = measurableQuantity;
    return this;
  }

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

  public MeasurableQuantityDto getMeasurableQuantity() {
    return measurableQuantity;
  }



  public void setMeasurableQuantity(MeasurableQuantityDto measurableQuantity) {
    this.measurableQuantity = measurableQuantity;
  }


  public PieChartDto width(String width) {
    
    this.width = width;
    return this;
  }

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

  public String getWidth() {
    return width;
  }



  public void setWidth(String width) {
    this.width = width;
  }


  public PieChartDto height(String height) {
    
    this.height = height;
    return this;
  }

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

  public String getHeight() {
    return height;
  }



  public void setHeight(String height) {
    this.height = height;
  }


  public PieChartDto style(String style) {
    
    this.style = style;
    return this;
  }

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

  public String getStyle() {
    return style;
  }



  public void setStyle(String style) {
    this.style = style;
  }


  public PieChartDto styleClass(String styleClass) {
    
    this.styleClass = styleClass;
    return this;
  }

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

  public String getStyleClass() {
    return styleClass;
  }



  public void setStyleClass(String styleClass) {
    this.styleClass = styleClass;
  }


  public PieChartDto extender(String extender) {
    
    this.extender = extender;
    return this;
  }

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

  public String getExtender() {
    return extender;
  }



  public void setExtender(String extender) {
    this.extender = extender;
  }


  public PieChartDto visible(Boolean visible) {
    
    this.visible = visible;
    return this;
  }

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

  public Boolean getVisible() {
    return visible;
  }



  public void setVisible(Boolean visible) {
    this.visible = visible;
  }


  public PieChartDto filled(Boolean filled) {
    
    this.filled = filled;
    return this;
  }

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

  public Boolean getFilled() {
    return filled;
  }



  public void setFilled(Boolean filled) {
    this.filled = filled;
  }


  public PieChartDto legendPosition(LegendPositionEnum legendPosition) {
    
    this.legendPosition = legendPosition;
    return this;
  }

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

  public LegendPositionEnum getLegendPosition() {
    return legendPosition;
  }



  public void setLegendPosition(LegendPositionEnum legendPosition) {
    this.legendPosition = legendPosition;
  }


  public PieChartDto seriesColors(String seriesColors) {
    
    this.seriesColors = seriesColors;
    return this;
  }

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

  public String getSeriesColors() {
    return seriesColors;
  }



  public void setSeriesColors(String seriesColors) {
    this.seriesColors = seriesColors;
  }


  public PieChartDto diameter(Integer diameter) {
    
    this.diameter = diameter;
    return this;
  }

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

  public Integer getDiameter() {
    return diameter;
  }



  public void setDiameter(Integer diameter) {
    this.diameter = diameter;
  }


  public PieChartDto sliceMargin(Integer sliceMargin) {
    
    this.sliceMargin = sliceMargin;
    return this;
  }

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

  public Integer getSliceMargin() {
    return sliceMargin;
  }



  public void setSliceMargin(Integer sliceMargin) {
    this.sliceMargin = sliceMargin;
  }


  public PieChartDto shadow(Boolean shadow) {
    
    this.shadow = shadow;
    return this;
  }

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

  public Boolean getShadow() {
    return shadow;
  }



  public void setShadow(Boolean shadow) {
    this.shadow = shadow;
  }


  public PieChartDto showDataLabels(Boolean showDataLabels) {
    
    this.showDataLabels = showDataLabels;
    return this;
  }

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

  public Boolean getShowDataLabels() {
    return showDataLabels;
  }



  public void setShowDataLabels(Boolean showDataLabels) {
    this.showDataLabels = showDataLabels;
  }


  public PieChartDto legendCols(Integer legendCols) {
    
    this.legendCols = legendCols;
    return this;
  }

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

  public Integer getLegendCols() {
    return legendCols;
  }



  public void setLegendCols(Integer legendCols) {
    this.legendCols = legendCols;
  }


  public PieChartDto legendRows(Integer legendRows) {
    
    this.legendRows = legendRows;
    return this;
  }

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

  public Integer getLegendRows() {
    return legendRows;
  }



  public void setLegendRows(Integer legendRows) {
    this.legendRows = legendRows;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PieChartDto pieChartDto = (PieChartDto) o;
    return Objects.equals(this.id, pieChartDto.id) &&
        Objects.equals(this.code, pieChartDto.code) &&
        Objects.equals(this.description, pieChartDto.description) &&
        Objects.equals(this.updatedCode, pieChartDto.updatedCode) &&
        Objects.equals(this.disabled, pieChartDto.disabled) &&
        Objects.equals(this.measurableQuantity, pieChartDto.measurableQuantity) &&
        Objects.equals(this.width, pieChartDto.width) &&
        Objects.equals(this.height, pieChartDto.height) &&
        Objects.equals(this.style, pieChartDto.style) &&
        Objects.equals(this.styleClass, pieChartDto.styleClass) &&
        Objects.equals(this.extender, pieChartDto.extender) &&
        Objects.equals(this.visible, pieChartDto.visible) &&
        Objects.equals(this.filled, pieChartDto.filled) &&
        Objects.equals(this.legendPosition, pieChartDto.legendPosition) &&
        Objects.equals(this.seriesColors, pieChartDto.seriesColors) &&
        Objects.equals(this.diameter, pieChartDto.diameter) &&
        Objects.equals(this.sliceMargin, pieChartDto.sliceMargin) &&
        Objects.equals(this.shadow, pieChartDto.shadow) &&
        Objects.equals(this.showDataLabels, pieChartDto.showDataLabels) &&
        Objects.equals(this.legendCols, pieChartDto.legendCols) &&
        Objects.equals(this.legendRows, pieChartDto.legendRows);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, measurableQuantity, width, height, style, styleClass, extender, visible, filled, legendPosition, seriesColors, diameter, sliceMargin, shadow, showDataLabels, legendCols, legendRows);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PieChartDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    updatedCode: ").append(toIndentedString(updatedCode)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    measurableQuantity: ").append(toIndentedString(measurableQuantity)).append("\n");
    sb.append("    width: ").append(toIndentedString(width)).append("\n");
    sb.append("    height: ").append(toIndentedString(height)).append("\n");
    sb.append("    style: ").append(toIndentedString(style)).append("\n");
    sb.append("    styleClass: ").append(toIndentedString(styleClass)).append("\n");
    sb.append("    extender: ").append(toIndentedString(extender)).append("\n");
    sb.append("    visible: ").append(toIndentedString(visible)).append("\n");
    sb.append("    filled: ").append(toIndentedString(filled)).append("\n");
    sb.append("    legendPosition: ").append(toIndentedString(legendPosition)).append("\n");
    sb.append("    seriesColors: ").append(toIndentedString(seriesColors)).append("\n");
    sb.append("    diameter: ").append(toIndentedString(diameter)).append("\n");
    sb.append("    sliceMargin: ").append(toIndentedString(sliceMargin)).append("\n");
    sb.append("    shadow: ").append(toIndentedString(shadow)).append("\n");
    sb.append("    showDataLabels: ").append(toIndentedString(showDataLabels)).append("\n");
    sb.append("    legendCols: ").append(toIndentedString(legendCols)).append("\n");
    sb.append("    legendRows: ").append(toIndentedString(legendRows)).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    ");
  }

}

