/*
 * OpenAPI Petstore
 * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
 *
 * The version of the OpenAPI document: 1.0.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 org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.dataformat.xml.annotation.*;
import javax.xml.bind.annotation.*;

/**
 * TypeHolderDefault
 */
@JsonPropertyOrder({
  TypeHolderDefault.JSON_PROPERTY_STRING_ITEM,
  TypeHolderDefault.JSON_PROPERTY_NUMBER_ITEM,
  TypeHolderDefault.JSON_PROPERTY_INTEGER_ITEM,
  TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM,
  TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM
})
@JsonTypeName("TypeHolderDefault")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@XmlRootElement(name = "TypeHolderDefault")
@XmlAccessorType(XmlAccessType.FIELD)
@JacksonXmlRootElement(localName = "TypeHolderDefault")
public class TypeHolderDefault {
  public static final String JSON_PROPERTY_STRING_ITEM = "string_item";
  @XmlElement(name = "string_item")
  private String stringItem = "what";

  public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item";
  @XmlElement(name = "number_item")
  private BigDecimal numberItem;

  public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item";
  @XmlElement(name = "integer_item")
  private Integer integerItem;

  public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item";
  @XmlElement(name = "bool_item")
  private Boolean boolItem = true;

  public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item";
  // Is a container wrapped=false
  // items.name=arrayItem items.baseName=arrayItem items.xmlName= items.xmlNamespace=
  // items.example= items.type=Integer
  @XmlElement(name = "arrayItem")
  private List<Integer> arrayItem = new ArrayList<>();


  public TypeHolderDefault stringItem(String stringItem) {
    
    this.stringItem = stringItem;
    return this;
  }

   /**
   * Get stringItem
   * @return stringItem
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_STRING_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "string_item")

  public String getStringItem() {
    return stringItem;
  }


  @JsonProperty(JSON_PROPERTY_STRING_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "string_item")
  public void setStringItem(String stringItem) {
    this.stringItem = stringItem;
  }


  public TypeHolderDefault numberItem(BigDecimal numberItem) {
    
    this.numberItem = numberItem;
    return this;
  }

   /**
   * Get numberItem
   * @return numberItem
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_NUMBER_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "number_item")

  public BigDecimal getNumberItem() {
    return numberItem;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "number_item")
  public void setNumberItem(BigDecimal numberItem) {
    this.numberItem = numberItem;
  }


  public TypeHolderDefault integerItem(Integer integerItem) {
    
    this.integerItem = integerItem;
    return this;
  }

   /**
   * Get integerItem
   * @return integerItem
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_INTEGER_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "integer_item")

  public Integer getIntegerItem() {
    return integerItem;
  }


  @JsonProperty(JSON_PROPERTY_INTEGER_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "integer_item")
  public void setIntegerItem(Integer integerItem) {
    this.integerItem = integerItem;
  }


  public TypeHolderDefault boolItem(Boolean boolItem) {
    
    this.boolItem = boolItem;
    return this;
  }

   /**
   * Get boolItem
   * @return boolItem
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_BOOL_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "bool_item")

  public Boolean getBoolItem() {
    return boolItem;
  }


  @JsonProperty(JSON_PROPERTY_BOOL_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  @JacksonXmlProperty(localName = "bool_item")
  public void setBoolItem(Boolean boolItem) {
    this.boolItem = boolItem;
  }


  public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
    
    this.arrayItem = arrayItem;
    return this;
  }

  public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
    this.arrayItem.add(arrayItemItem);
    return this;
  }

   /**
   * Get arrayItem
   * @return arrayItem
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")
  @JsonProperty(JSON_PROPERTY_ARRAY_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<Integer> getArrayItem() {
    return arrayItem;
  }


  @JsonProperty(JSON_PROPERTY_ARRAY_ITEM)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setArrayItem(List<Integer> arrayItem) {
    this.arrayItem = arrayItem;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o;
    return Objects.equals(this.stringItem, typeHolderDefault.stringItem) &&
        Objects.equals(this.numberItem, typeHolderDefault.numberItem) &&
        Objects.equals(this.integerItem, typeHolderDefault.integerItem) &&
        Objects.equals(this.boolItem, typeHolderDefault.boolItem) &&
        Objects.equals(this.arrayItem, typeHolderDefault.arrayItem);
  }

  @Override
  public int hashCode() {
    return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TypeHolderDefault {\n");
    sb.append("    stringItem: ").append(toIndentedString(stringItem)).append("\n");
    sb.append("    numberItem: ").append(toIndentedString(numberItem)).append("\n");
    sb.append("    integerItem: ").append(toIndentedString(integerItem)).append("\n");
    sb.append("    boolItem: ").append(toIndentedString(boolItem)).append("\n");
    sb.append("    arrayItem: ").append(toIndentedString(arrayItem)).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    ");
  }

}

