/*
 * 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 java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.SubCatUsageDto;

/**
 * CatUsageDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class CatUsageDto {
  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_LIST_SUB_CAT_USAGE = "listSubCatUsage";
  @SerializedName(SERIALIZED_NAME_LIST_SUB_CAT_USAGE)
  private List<SubCatUsageDto> listSubCatUsage = null;


  public CatUsageDto 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 CatUsageDto 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 CatUsageDto listSubCatUsage(List<SubCatUsageDto> listSubCatUsage) {
    
    this.listSubCatUsage = listSubCatUsage;
    return this;
  }

  public CatUsageDto addListSubCatUsageItem(SubCatUsageDto listSubCatUsageItem) {
    if (this.listSubCatUsage == null) {
      this.listSubCatUsage = new ArrayList<SubCatUsageDto>();
    }
    this.listSubCatUsage.add(listSubCatUsageItem);
    return this;
  }

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

  public List<SubCatUsageDto> getListSubCatUsage() {
    return listSubCatUsage;
  }



  public void setListSubCatUsage(List<SubCatUsageDto> listSubCatUsage) {
    this.listSubCatUsage = listSubCatUsage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CatUsageDto catUsageDto = (CatUsageDto) o;
    return Objects.equals(this.code, catUsageDto.code) &&
        Objects.equals(this.description, catUsageDto.description) &&
        Objects.equals(this.listSubCatUsage, catUsageDto.listSubCatUsage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(code, description, listSubCatUsage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CatUsageDto {\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    listSubCatUsage: ").append(toIndentedString(listSubCatUsage)).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    ");
  }

}

