/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.CustomFieldValue;
import org.openapitools.client.model.DatePeriod;

/**
 * CustomFieldValues
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class CustomFieldValues {
  public static final String SERIALIZED_NAME_VALUES_BY_CODE = "valuesByCode";
  @SerializedName(SERIALIZED_NAME_VALUES_BY_CODE)
  private Map<String, List<CustomFieldValue>> valuesByCode = null;

  public static final String SERIALIZED_NAME_ENCRYPTED = "encrypted";
  @SerializedName(SERIALIZED_NAME_ENCRYPTED)
  private Boolean encrypted;

  public static final String SERIALIZED_NAME_VALUES = "values";
  @SerializedName(SERIALIZED_NAME_VALUES)
  private Map<String, Object> values = null;

  public static final String SERIALIZED_NAME_NEW_VERSIONED_C_F_VALUE_PERIODS = "newVersionedCFValuePeriods";
  @SerializedName(SERIALIZED_NAME_NEW_VERSIONED_C_F_VALUE_PERIODS)
  private Map<String, List<DatePeriod>> newVersionedCFValuePeriods = null;


  public CustomFieldValues valuesByCode(Map<String, List<CustomFieldValue>> valuesByCode) {
    
    this.valuesByCode = valuesByCode;
    return this;
  }

  public CustomFieldValues putValuesByCodeItem(String key, List<CustomFieldValue> valuesByCodeItem) {
    if (this.valuesByCode == null) {
      this.valuesByCode = new HashMap<String, List<CustomFieldValue>>();
    }
    this.valuesByCode.put(key, valuesByCodeItem);
    return this;
  }

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

  public Map<String, List<CustomFieldValue>> getValuesByCode() {
    return valuesByCode;
  }



  public void setValuesByCode(Map<String, List<CustomFieldValue>> valuesByCode) {
    this.valuesByCode = valuesByCode;
  }


  public CustomFieldValues encrypted(Boolean encrypted) {
    
    this.encrypted = encrypted;
    return this;
  }

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

  public Boolean getEncrypted() {
    return encrypted;
  }



  public void setEncrypted(Boolean encrypted) {
    this.encrypted = encrypted;
  }


  public CustomFieldValues values(Map<String, Object> values) {
    
    this.values = values;
    return this;
  }

  public CustomFieldValues putValuesItem(String key, Object valuesItem) {
    if (this.values == null) {
      this.values = new HashMap<String, Object>();
    }
    this.values.put(key, valuesItem);
    return this;
  }

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

  public Map<String, Object> getValues() {
    return values;
  }



  public void setValues(Map<String, Object> values) {
    this.values = values;
  }


  public CustomFieldValues newVersionedCFValuePeriods(Map<String, List<DatePeriod>> newVersionedCFValuePeriods) {
    
    this.newVersionedCFValuePeriods = newVersionedCFValuePeriods;
    return this;
  }

  public CustomFieldValues putNewVersionedCFValuePeriodsItem(String key, List<DatePeriod> newVersionedCFValuePeriodsItem) {
    if (this.newVersionedCFValuePeriods == null) {
      this.newVersionedCFValuePeriods = new HashMap<String, List<DatePeriod>>();
    }
    this.newVersionedCFValuePeriods.put(key, newVersionedCFValuePeriodsItem);
    return this;
  }

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

  public Map<String, List<DatePeriod>> getNewVersionedCFValuePeriods() {
    return newVersionedCFValuePeriods;
  }



  public void setNewVersionedCFValuePeriods(Map<String, List<DatePeriod>> newVersionedCFValuePeriods) {
    this.newVersionedCFValuePeriods = newVersionedCFValuePeriods;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CustomFieldValues customFieldValues = (CustomFieldValues) o;
    return Objects.equals(this.valuesByCode, customFieldValues.valuesByCode) &&
        Objects.equals(this.encrypted, customFieldValues.encrypted) &&
        Objects.equals(this.values, customFieldValues.values) &&
        Objects.equals(this.newVersionedCFValuePeriods, customFieldValues.newVersionedCFValuePeriods);
  }

  @Override
  public int hashCode() {
    return Objects.hash(valuesByCode, encrypted, values, newVersionedCFValuePeriods);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CustomFieldValues {\n");
    sb.append("    valuesByCode: ").append(toIndentedString(valuesByCode)).append("\n");
    sb.append("    encrypted: ").append(toIndentedString(encrypted)).append("\n");
    sb.append("    values: ").append(toIndentedString(values)).append("\n");
    sb.append("    newVersionedCFValuePeriods: ").append(toIndentedString(newVersionedCFValuePeriods)).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    ");
  }

}

