/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BusinessAccountModel;
import org.openapitools.client.model.BusinessEntity;
import org.openapitools.client.model.BusinessProductModel;
import org.openapitools.client.model.Calendar;
import org.openapitools.client.model.Channel;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.CustomerCategory;
import org.openapitools.client.model.DatePeriod;
import org.openapitools.client.model.DigitalResource;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.OfferTemplateCategory;
import org.openapitools.client.model.ProductChargeTemplate;
import org.openapitools.client.model.ScriptInstance;
import org.openapitools.client.model.Seller;
import org.openapitools.client.model.WalletTemplate;

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

  public static final String SERIALIZED_NAME_VERSION = "version";
  @SerializedName(SERIALIZED_NAME_VERSION)
  private Integer version;

  public static final String SERIALIZED_NAME_AUDITABLE = "auditable";
  @SerializedName(SERIALIZED_NAME_AUDITABLE)
  private Auditable auditable;

  public static final String SERIALIZED_NAME_HISTORIZED = "historized";
  @SerializedName(SERIALIZED_NAME_HISTORIZED)
  private Boolean historized;

  public static final String SERIALIZED_NAME_NOTIFIED = "notified";
  @SerializedName(SERIALIZED_NAME_NOTIFIED)
  private Boolean notified;

  public static final String SERIALIZED_NAME_AUDITABLE_FIELDS = "auditableFields";
  @SerializedName(SERIALIZED_NAME_AUDITABLE_FIELDS)
  private List<AuditableFieldHistory> auditableFields = null;

  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_APPEND_GENERATED_CODE = "appendGeneratedCode";
  @SerializedName(SERIALIZED_NAME_APPEND_GENERATED_CODE)
  private Boolean appendGeneratedCode;

  public static final String SERIALIZED_NAME_UUID = "uuid";
  @SerializedName(SERIALIZED_NAME_UUID)
  private String uuid;

  public static final String SERIALIZED_NAME_CF_VALUES = "cfValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES)
  private CustomFieldValues cfValues;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES = "cfAccumulatedValues";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES)
  private CustomFieldValues cfAccumulatedValues;

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

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_OFFER_TEMPLATE_CATEGORIES = "offerTemplateCategories";
  @SerializedName(SERIALIZED_NAME_OFFER_TEMPLATE_CATEGORIES)
  private List<OfferTemplateCategory> offerTemplateCategories = null;

  public static final String SERIALIZED_NAME_VALIDITY = "validity";
  @SerializedName(SERIALIZED_NAME_VALIDITY)
  private DatePeriod validity;

  public static final String SERIALIZED_NAME_IMAGE_PATH = "imagePath";
  @SerializedName(SERIALIZED_NAME_IMAGE_PATH)
  private String imagePath;

  public static final String SERIALIZED_NAME_ATTACHMENTS = "attachments";
  @SerializedName(SERIALIZED_NAME_ATTACHMENTS)
  private List<DigitalResource> attachments = null;

  /**
   * Gets or Sets lifeCycleStatus
   */
  @JsonAdapter(LifeCycleStatusEnum.Adapter.class)
  public enum LifeCycleStatusEnum {
    IN_STUDY("IN_STUDY"),
    
    IN_DESIGN("IN_DESIGN"),
    
    IN_TEST("IN_TEST"),
    
    ACTIVE("ACTIVE"),
    
    LAUNCHED("LAUNCHED"),
    
    RETIRED("RETIRED"),
    
    OBSOLETE("OBSOLETE"),
    
    REJECTED("REJECTED");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_LIFE_CYCLE_STATUS = "lifeCycleStatus";
  @SerializedName(SERIALIZED_NAME_LIFE_CYCLE_STATUS)
  private LifeCycleStatusEnum lifeCycleStatus;

  public static final String SERIALIZED_NAME_BUSINESS_ACCOUNT_MODELS = "businessAccountModels";
  @SerializedName(SERIALIZED_NAME_BUSINESS_ACCOUNT_MODELS)
  private List<BusinessAccountModel> businessAccountModels = null;

  public static final String SERIALIZED_NAME_CHANNELS = "channels";
  @SerializedName(SERIALIZED_NAME_CHANNELS)
  private List<Channel> channels = null;

  public static final String SERIALIZED_NAME_DESCRIPTION_I18N = "descriptionI18n";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_I18N)
  private Map<String, String> descriptionI18n = null;

  public static final String SERIALIZED_NAME_LONG_DESCRIPTION = "longDescription";
  @SerializedName(SERIALIZED_NAME_LONG_DESCRIPTION)
  private String longDescription;

  public static final String SERIALIZED_NAME_LONG_DESCRIPTION_I18N = "longDescriptionI18n";
  @SerializedName(SERIALIZED_NAME_LONG_DESCRIPTION_I18N)
  private Map<String, String> longDescriptionI18n = null;

  public static final String SERIALIZED_NAME_GLOBAL_RATING_SCRIPT_INSTANCE = "globalRatingScriptInstance";
  @SerializedName(SERIALIZED_NAME_GLOBAL_RATING_SCRIPT_INSTANCE)
  private ScriptInstance globalRatingScriptInstance;

  public static final String SERIALIZED_NAME_SELLERS = "sellers";
  @SerializedName(SERIALIZED_NAME_SELLERS)
  private List<Seller> sellers = null;

  public static final String SERIALIZED_NAME_CUSTOMER_CATEGORIES = "customerCategories";
  @SerializedName(SERIALIZED_NAME_CUSTOMER_CATEGORIES)
  private List<CustomerCategory> customerCategories = null;

  public static final String SERIALIZED_NAME_PRODUCT_CHARGE_TEMPLATES = "productChargeTemplates";
  @SerializedName(SERIALIZED_NAME_PRODUCT_CHARGE_TEMPLATES)
  private List<ProductChargeTemplate> productChargeTemplates = null;

  public static final String SERIALIZED_NAME_BUSINESS_PRODUCT_MODEL = "businessProductModel";
  @SerializedName(SERIALIZED_NAME_BUSINESS_PRODUCT_MODEL)
  private BusinessProductModel businessProductModel;

  public static final String SERIALIZED_NAME_INVOICING_CALENDAR = "invoicingCalendar";
  @SerializedName(SERIALIZED_NAME_INVOICING_CALENDAR)
  private Calendar invoicingCalendar;

  public static final String SERIALIZED_NAME_WALLET_TEMPLATES = "walletTemplates";
  @SerializedName(SERIALIZED_NAME_WALLET_TEMPLATES)
  private List<WalletTemplate> walletTemplates = null;

  public static final String SERIALIZED_NAME_PARENT_C_F_ENTITIES = "parentCFEntities";
  @SerializedName(SERIALIZED_NAME_PARENT_C_F_ENTITIES)
  private List<ICustomFieldEntity> parentCFEntities = null;

  public static final String SERIALIZED_NAME_DESCRIPTION_I18N_NULL_SAFE = "descriptionI18nNullSafe";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_I18N_NULL_SAFE)
  private Map<String, String> descriptionI18nNullSafe = null;

  public static final String SERIALIZED_NAME_NAME_OR_CODE = "nameOrCode";
  @SerializedName(SERIALIZED_NAME_NAME_OR_CODE)
  private String nameOrCode;

  public static final String SERIALIZED_NAME_LONG_DESCRIPTION_I18N_NULL_SAFE = "longDescriptionI18nNullSafe";
  @SerializedName(SERIALIZED_NAME_LONG_DESCRIPTION_I18N_NULL_SAFE)
  private Map<String, String> longDescriptionI18nNullSafe = null;

  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_CF_VALUES_NULL_SAFE = "cfValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_NULL_SAFE)
  private CustomFieldValues cfValuesNullSafe;

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

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE = "cfAccumulatedValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE)
  private CustomFieldValues cfAccumulatedValuesNullSafe;

  public static final String SERIALIZED_NAME_DESCRIPTION_OR_CODE = "descriptionOrCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_OR_CODE)
  private String descriptionOrCode;

  public static final String SERIALIZED_NAME_DESCRIPTION_AND_CODE = "descriptionAndCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_AND_CODE)
  private String descriptionAndCode;

  public static final String SERIALIZED_NAME_REFERENCE_CODE = "referenceCode";
  @SerializedName(SERIALIZED_NAME_REFERENCE_CODE)
  private String referenceCode;

  public static final String SERIALIZED_NAME_REFERENCE_DESCRIPTION = "referenceDescription";
  @SerializedName(SERIALIZED_NAME_REFERENCE_DESCRIPTION)
  private String referenceDescription;

  public static final String SERIALIZED_NAME_CODE_CHANGED = "codeChanged";
  @SerializedName(SERIALIZED_NAME_CODE_CHANGED)
  private Boolean codeChanged;

  public static final String SERIALIZED_NAME_PARENT_ENTITY = "parentEntity";
  @SerializedName(SERIALIZED_NAME_PARENT_ENTITY)
  private BusinessEntity parentEntity;

  public static final String SERIALIZED_NAME_TRANSIENT = "transient";
  @SerializedName(SERIALIZED_NAME_TRANSIENT)
  private Boolean _transient;


  public ProductTemplate 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 ProductTemplate version(Integer version) {
    
    this.version = version;
    return this;
  }

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

  public Integer getVersion() {
    return version;
  }



  public void setVersion(Integer version) {
    this.version = version;
  }


  public ProductTemplate auditable(Auditable auditable) {
    
    this.auditable = auditable;
    return this;
  }

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

  public Auditable getAuditable() {
    return auditable;
  }



  public void setAuditable(Auditable auditable) {
    this.auditable = auditable;
  }


  public ProductTemplate historized(Boolean historized) {
    
    this.historized = historized;
    return this;
  }

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

  public Boolean getHistorized() {
    return historized;
  }



  public void setHistorized(Boolean historized) {
    this.historized = historized;
  }


  public ProductTemplate notified(Boolean notified) {
    
    this.notified = notified;
    return this;
  }

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

  public Boolean getNotified() {
    return notified;
  }



  public void setNotified(Boolean notified) {
    this.notified = notified;
  }


  public ProductTemplate auditableFields(List<AuditableFieldHistory> auditableFields) {
    
    this.auditableFields = auditableFields;
    return this;
  }

  public ProductTemplate addAuditableFieldsItem(AuditableFieldHistory auditableFieldsItem) {
    if (this.auditableFields == null) {
      this.auditableFields = new ArrayList<AuditableFieldHistory>();
    }
    this.auditableFields.add(auditableFieldsItem);
    return this;
  }

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

  public List<AuditableFieldHistory> getAuditableFields() {
    return auditableFields;
  }



  public void setAuditableFields(List<AuditableFieldHistory> auditableFields) {
    this.auditableFields = auditableFields;
  }


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

   /**
   * Get code
   * @return code
  **/
  @ApiModelProperty(required = true, value = "")

  public String getCode() {
    return code;
  }



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


  public ProductTemplate 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 ProductTemplate appendGeneratedCode(Boolean appendGeneratedCode) {
    
    this.appendGeneratedCode = appendGeneratedCode;
    return this;
  }

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

  public Boolean getAppendGeneratedCode() {
    return appendGeneratedCode;
  }



  public void setAppendGeneratedCode(Boolean appendGeneratedCode) {
    this.appendGeneratedCode = appendGeneratedCode;
  }


  public ProductTemplate uuid(String uuid) {
    
    this.uuid = uuid;
    return this;
  }

   /**
   * Get uuid
   * @return uuid
  **/
  @ApiModelProperty(required = true, value = "")

  public String getUuid() {
    return uuid;
  }



  public void setUuid(String uuid) {
    this.uuid = uuid;
  }


  public ProductTemplate cfValues(CustomFieldValues cfValues) {
    
    this.cfValues = cfValues;
    return this;
  }

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

  public CustomFieldValues getCfValues() {
    return cfValues;
  }



  public void setCfValues(CustomFieldValues cfValues) {
    this.cfValues = cfValues;
  }


  public ProductTemplate cfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    
    this.cfAccumulatedValues = cfAccumulatedValues;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValues() {
    return cfAccumulatedValues;
  }



  public void setCfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    this.cfAccumulatedValues = cfAccumulatedValues;
  }


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

   /**
   * Get disabled
   * @return disabled
  **/
  @ApiModelProperty(required = true, value = "")

  public Boolean getDisabled() {
    return disabled;
  }



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


  public ProductTemplate name(String name) {
    
    this.name = name;
    return this;
  }

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

  public String getName() {
    return name;
  }



  public void setName(String name) {
    this.name = name;
  }


  public ProductTemplate offerTemplateCategories(List<OfferTemplateCategory> offerTemplateCategories) {
    
    this.offerTemplateCategories = offerTemplateCategories;
    return this;
  }

  public ProductTemplate addOfferTemplateCategoriesItem(OfferTemplateCategory offerTemplateCategoriesItem) {
    if (this.offerTemplateCategories == null) {
      this.offerTemplateCategories = new ArrayList<OfferTemplateCategory>();
    }
    this.offerTemplateCategories.add(offerTemplateCategoriesItem);
    return this;
  }

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

  public List<OfferTemplateCategory> getOfferTemplateCategories() {
    return offerTemplateCategories;
  }



  public void setOfferTemplateCategories(List<OfferTemplateCategory> offerTemplateCategories) {
    this.offerTemplateCategories = offerTemplateCategories;
  }


  public ProductTemplate validity(DatePeriod validity) {
    
    this.validity = validity;
    return this;
  }

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

  public DatePeriod getValidity() {
    return validity;
  }



  public void setValidity(DatePeriod validity) {
    this.validity = validity;
  }


  public ProductTemplate imagePath(String imagePath) {
    
    this.imagePath = imagePath;
    return this;
  }

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

  public String getImagePath() {
    return imagePath;
  }



  public void setImagePath(String imagePath) {
    this.imagePath = imagePath;
  }


  public ProductTemplate attachments(List<DigitalResource> attachments) {
    
    this.attachments = attachments;
    return this;
  }

  public ProductTemplate addAttachmentsItem(DigitalResource attachmentsItem) {
    if (this.attachments == null) {
      this.attachments = new ArrayList<DigitalResource>();
    }
    this.attachments.add(attachmentsItem);
    return this;
  }

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

  public List<DigitalResource> getAttachments() {
    return attachments;
  }



  public void setAttachments(List<DigitalResource> attachments) {
    this.attachments = attachments;
  }


  public ProductTemplate lifeCycleStatus(LifeCycleStatusEnum lifeCycleStatus) {
    
    this.lifeCycleStatus = lifeCycleStatus;
    return this;
  }

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

  public LifeCycleStatusEnum getLifeCycleStatus() {
    return lifeCycleStatus;
  }



  public void setLifeCycleStatus(LifeCycleStatusEnum lifeCycleStatus) {
    this.lifeCycleStatus = lifeCycleStatus;
  }


  public ProductTemplate businessAccountModels(List<BusinessAccountModel> businessAccountModels) {
    
    this.businessAccountModels = businessAccountModels;
    return this;
  }

  public ProductTemplate addBusinessAccountModelsItem(BusinessAccountModel businessAccountModelsItem) {
    if (this.businessAccountModels == null) {
      this.businessAccountModels = new ArrayList<BusinessAccountModel>();
    }
    this.businessAccountModels.add(businessAccountModelsItem);
    return this;
  }

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

  public List<BusinessAccountModel> getBusinessAccountModels() {
    return businessAccountModels;
  }



  public void setBusinessAccountModels(List<BusinessAccountModel> businessAccountModels) {
    this.businessAccountModels = businessAccountModels;
  }


  public ProductTemplate channels(List<Channel> channels) {
    
    this.channels = channels;
    return this;
  }

  public ProductTemplate addChannelsItem(Channel channelsItem) {
    if (this.channels == null) {
      this.channels = new ArrayList<Channel>();
    }
    this.channels.add(channelsItem);
    return this;
  }

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

  public List<Channel> getChannels() {
    return channels;
  }



  public void setChannels(List<Channel> channels) {
    this.channels = channels;
  }


  public ProductTemplate descriptionI18n(Map<String, String> descriptionI18n) {
    
    this.descriptionI18n = descriptionI18n;
    return this;
  }

  public ProductTemplate putDescriptionI18nItem(String key, String descriptionI18nItem) {
    if (this.descriptionI18n == null) {
      this.descriptionI18n = new HashMap<String, String>();
    }
    this.descriptionI18n.put(key, descriptionI18nItem);
    return this;
  }

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

  public Map<String, String> getDescriptionI18n() {
    return descriptionI18n;
  }



  public void setDescriptionI18n(Map<String, String> descriptionI18n) {
    this.descriptionI18n = descriptionI18n;
  }


  public ProductTemplate longDescription(String longDescription) {
    
    this.longDescription = longDescription;
    return this;
  }

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

  public String getLongDescription() {
    return longDescription;
  }



  public void setLongDescription(String longDescription) {
    this.longDescription = longDescription;
  }


  public ProductTemplate longDescriptionI18n(Map<String, String> longDescriptionI18n) {
    
    this.longDescriptionI18n = longDescriptionI18n;
    return this;
  }

  public ProductTemplate putLongDescriptionI18nItem(String key, String longDescriptionI18nItem) {
    if (this.longDescriptionI18n == null) {
      this.longDescriptionI18n = new HashMap<String, String>();
    }
    this.longDescriptionI18n.put(key, longDescriptionI18nItem);
    return this;
  }

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

  public Map<String, String> getLongDescriptionI18n() {
    return longDescriptionI18n;
  }



  public void setLongDescriptionI18n(Map<String, String> longDescriptionI18n) {
    this.longDescriptionI18n = longDescriptionI18n;
  }


  public ProductTemplate globalRatingScriptInstance(ScriptInstance globalRatingScriptInstance) {
    
    this.globalRatingScriptInstance = globalRatingScriptInstance;
    return this;
  }

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

  public ScriptInstance getGlobalRatingScriptInstance() {
    return globalRatingScriptInstance;
  }



  public void setGlobalRatingScriptInstance(ScriptInstance globalRatingScriptInstance) {
    this.globalRatingScriptInstance = globalRatingScriptInstance;
  }


  public ProductTemplate sellers(List<Seller> sellers) {
    
    this.sellers = sellers;
    return this;
  }

  public ProductTemplate addSellersItem(Seller sellersItem) {
    if (this.sellers == null) {
      this.sellers = new ArrayList<Seller>();
    }
    this.sellers.add(sellersItem);
    return this;
  }

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

  public List<Seller> getSellers() {
    return sellers;
  }



  public void setSellers(List<Seller> sellers) {
    this.sellers = sellers;
  }


  public ProductTemplate customerCategories(List<CustomerCategory> customerCategories) {
    
    this.customerCategories = customerCategories;
    return this;
  }

  public ProductTemplate addCustomerCategoriesItem(CustomerCategory customerCategoriesItem) {
    if (this.customerCategories == null) {
      this.customerCategories = new ArrayList<CustomerCategory>();
    }
    this.customerCategories.add(customerCategoriesItem);
    return this;
  }

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

  public List<CustomerCategory> getCustomerCategories() {
    return customerCategories;
  }



  public void setCustomerCategories(List<CustomerCategory> customerCategories) {
    this.customerCategories = customerCategories;
  }


  public ProductTemplate productChargeTemplates(List<ProductChargeTemplate> productChargeTemplates) {
    
    this.productChargeTemplates = productChargeTemplates;
    return this;
  }

  public ProductTemplate addProductChargeTemplatesItem(ProductChargeTemplate productChargeTemplatesItem) {
    if (this.productChargeTemplates == null) {
      this.productChargeTemplates = new ArrayList<ProductChargeTemplate>();
    }
    this.productChargeTemplates.add(productChargeTemplatesItem);
    return this;
  }

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

  public List<ProductChargeTemplate> getProductChargeTemplates() {
    return productChargeTemplates;
  }



  public void setProductChargeTemplates(List<ProductChargeTemplate> productChargeTemplates) {
    this.productChargeTemplates = productChargeTemplates;
  }


  public ProductTemplate businessProductModel(BusinessProductModel businessProductModel) {
    
    this.businessProductModel = businessProductModel;
    return this;
  }

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

  public BusinessProductModel getBusinessProductModel() {
    return businessProductModel;
  }



  public void setBusinessProductModel(BusinessProductModel businessProductModel) {
    this.businessProductModel = businessProductModel;
  }


  public ProductTemplate invoicingCalendar(Calendar invoicingCalendar) {
    
    this.invoicingCalendar = invoicingCalendar;
    return this;
  }

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

  public Calendar getInvoicingCalendar() {
    return invoicingCalendar;
  }



  public void setInvoicingCalendar(Calendar invoicingCalendar) {
    this.invoicingCalendar = invoicingCalendar;
  }


  public ProductTemplate walletTemplates(List<WalletTemplate> walletTemplates) {
    
    this.walletTemplates = walletTemplates;
    return this;
  }

  public ProductTemplate addWalletTemplatesItem(WalletTemplate walletTemplatesItem) {
    if (this.walletTemplates == null) {
      this.walletTemplates = new ArrayList<WalletTemplate>();
    }
    this.walletTemplates.add(walletTemplatesItem);
    return this;
  }

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

  public List<WalletTemplate> getWalletTemplates() {
    return walletTemplates;
  }



  public void setWalletTemplates(List<WalletTemplate> walletTemplates) {
    this.walletTemplates = walletTemplates;
  }


  public ProductTemplate parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public ProductTemplate addParentCFEntitiesItem(ICustomFieldEntity parentCFEntitiesItem) {
    if (this.parentCFEntities == null) {
      this.parentCFEntities = new ArrayList<ICustomFieldEntity>();
    }
    this.parentCFEntities.add(parentCFEntitiesItem);
    return this;
  }

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

  public List<ICustomFieldEntity> getParentCFEntities() {
    return parentCFEntities;
  }



  public void setParentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    this.parentCFEntities = parentCFEntities;
  }


  public ProductTemplate descriptionI18nNullSafe(Map<String, String> descriptionI18nNullSafe) {
    
    this.descriptionI18nNullSafe = descriptionI18nNullSafe;
    return this;
  }

  public ProductTemplate putDescriptionI18nNullSafeItem(String key, String descriptionI18nNullSafeItem) {
    if (this.descriptionI18nNullSafe == null) {
      this.descriptionI18nNullSafe = new HashMap<String, String>();
    }
    this.descriptionI18nNullSafe.put(key, descriptionI18nNullSafeItem);
    return this;
  }

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

  public Map<String, String> getDescriptionI18nNullSafe() {
    return descriptionI18nNullSafe;
  }



  public void setDescriptionI18nNullSafe(Map<String, String> descriptionI18nNullSafe) {
    this.descriptionI18nNullSafe = descriptionI18nNullSafe;
  }


  public ProductTemplate nameOrCode(String nameOrCode) {
    
    this.nameOrCode = nameOrCode;
    return this;
  }

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

  public String getNameOrCode() {
    return nameOrCode;
  }



  public void setNameOrCode(String nameOrCode) {
    this.nameOrCode = nameOrCode;
  }


  public ProductTemplate longDescriptionI18nNullSafe(Map<String, String> longDescriptionI18nNullSafe) {
    
    this.longDescriptionI18nNullSafe = longDescriptionI18nNullSafe;
    return this;
  }

  public ProductTemplate putLongDescriptionI18nNullSafeItem(String key, String longDescriptionI18nNullSafeItem) {
    if (this.longDescriptionI18nNullSafe == null) {
      this.longDescriptionI18nNullSafe = new HashMap<String, String>();
    }
    this.longDescriptionI18nNullSafe.put(key, longDescriptionI18nNullSafeItem);
    return this;
  }

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

  public Map<String, String> getLongDescriptionI18nNullSafe() {
    return longDescriptionI18nNullSafe;
  }



  public void setLongDescriptionI18nNullSafe(Map<String, String> longDescriptionI18nNullSafe) {
    this.longDescriptionI18nNullSafe = longDescriptionI18nNullSafe;
  }


  public ProductTemplate active(Boolean active) {
    
    this.active = active;
    return this;
  }

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

  public Boolean getActive() {
    return active;
  }



  public void setActive(Boolean active) {
    this.active = active;
  }


  public ProductTemplate cfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    
    this.cfValuesNullSafe = cfValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfValuesNullSafe() {
    return cfValuesNullSafe;
  }



  public void setCfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    this.cfValuesNullSafe = cfValuesNullSafe;
  }


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

  public ProductTemplate putCfValuesAsValuesItem(String key, Object cfValuesAsValuesItem) {
    if (this.cfValuesAsValues == null) {
      this.cfValuesAsValues = new HashMap<String, Object>();
    }
    this.cfValuesAsValues.put(key, cfValuesAsValuesItem);
    return this;
  }

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

  public Map<String, Object> getCfValuesAsValues() {
    return cfValuesAsValues;
  }



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


  public ProductTemplate cfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValuesNullSafe() {
    return cfAccumulatedValuesNullSafe;
  }



  public void setCfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
  }


  public ProductTemplate descriptionOrCode(String descriptionOrCode) {
    
    this.descriptionOrCode = descriptionOrCode;
    return this;
  }

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

  public String getDescriptionOrCode() {
    return descriptionOrCode;
  }



  public void setDescriptionOrCode(String descriptionOrCode) {
    this.descriptionOrCode = descriptionOrCode;
  }


  public ProductTemplate descriptionAndCode(String descriptionAndCode) {
    
    this.descriptionAndCode = descriptionAndCode;
    return this;
  }

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

  public String getDescriptionAndCode() {
    return descriptionAndCode;
  }



  public void setDescriptionAndCode(String descriptionAndCode) {
    this.descriptionAndCode = descriptionAndCode;
  }


  public ProductTemplate referenceCode(String referenceCode) {
    
    this.referenceCode = referenceCode;
    return this;
  }

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

  public String getReferenceCode() {
    return referenceCode;
  }



  public void setReferenceCode(String referenceCode) {
    this.referenceCode = referenceCode;
  }


  public ProductTemplate referenceDescription(String referenceDescription) {
    
    this.referenceDescription = referenceDescription;
    return this;
  }

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

  public String getReferenceDescription() {
    return referenceDescription;
  }



  public void setReferenceDescription(String referenceDescription) {
    this.referenceDescription = referenceDescription;
  }


  public ProductTemplate codeChanged(Boolean codeChanged) {
    
    this.codeChanged = codeChanged;
    return this;
  }

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

  public Boolean getCodeChanged() {
    return codeChanged;
  }



  public void setCodeChanged(Boolean codeChanged) {
    this.codeChanged = codeChanged;
  }


  public ProductTemplate parentEntity(BusinessEntity parentEntity) {
    
    this.parentEntity = parentEntity;
    return this;
  }

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

  public BusinessEntity getParentEntity() {
    return parentEntity;
  }



  public void setParentEntity(BusinessEntity parentEntity) {
    this.parentEntity = parentEntity;
  }


  public ProductTemplate _transient(Boolean _transient) {
    
    this._transient = _transient;
    return this;
  }

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

  public Boolean getTransient() {
    return _transient;
  }



  public void setTransient(Boolean _transient) {
    this._transient = _transient;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ProductTemplate productTemplate = (ProductTemplate) o;
    return Objects.equals(this.id, productTemplate.id) &&
        Objects.equals(this.version, productTemplate.version) &&
        Objects.equals(this.auditable, productTemplate.auditable) &&
        Objects.equals(this.historized, productTemplate.historized) &&
        Objects.equals(this.notified, productTemplate.notified) &&
        Objects.equals(this.auditableFields, productTemplate.auditableFields) &&
        Objects.equals(this.code, productTemplate.code) &&
        Objects.equals(this.description, productTemplate.description) &&
        Objects.equals(this.appendGeneratedCode, productTemplate.appendGeneratedCode) &&
        Objects.equals(this.uuid, productTemplate.uuid) &&
        Objects.equals(this.cfValues, productTemplate.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, productTemplate.cfAccumulatedValues) &&
        Objects.equals(this.disabled, productTemplate.disabled) &&
        Objects.equals(this.name, productTemplate.name) &&
        Objects.equals(this.offerTemplateCategories, productTemplate.offerTemplateCategories) &&
        Objects.equals(this.validity, productTemplate.validity) &&
        Objects.equals(this.imagePath, productTemplate.imagePath) &&
        Objects.equals(this.attachments, productTemplate.attachments) &&
        Objects.equals(this.lifeCycleStatus, productTemplate.lifeCycleStatus) &&
        Objects.equals(this.businessAccountModels, productTemplate.businessAccountModels) &&
        Objects.equals(this.channels, productTemplate.channels) &&
        Objects.equals(this.descriptionI18n, productTemplate.descriptionI18n) &&
        Objects.equals(this.longDescription, productTemplate.longDescription) &&
        Objects.equals(this.longDescriptionI18n, productTemplate.longDescriptionI18n) &&
        Objects.equals(this.globalRatingScriptInstance, productTemplate.globalRatingScriptInstance) &&
        Objects.equals(this.sellers, productTemplate.sellers) &&
        Objects.equals(this.customerCategories, productTemplate.customerCategories) &&
        Objects.equals(this.productChargeTemplates, productTemplate.productChargeTemplates) &&
        Objects.equals(this.businessProductModel, productTemplate.businessProductModel) &&
        Objects.equals(this.invoicingCalendar, productTemplate.invoicingCalendar) &&
        Objects.equals(this.walletTemplates, productTemplate.walletTemplates) &&
        Objects.equals(this.parentCFEntities, productTemplate.parentCFEntities) &&
        Objects.equals(this.descriptionI18nNullSafe, productTemplate.descriptionI18nNullSafe) &&
        Objects.equals(this.nameOrCode, productTemplate.nameOrCode) &&
        Objects.equals(this.longDescriptionI18nNullSafe, productTemplate.longDescriptionI18nNullSafe) &&
        Objects.equals(this.active, productTemplate.active) &&
        Objects.equals(this.cfValuesNullSafe, productTemplate.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, productTemplate.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, productTemplate.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this.descriptionOrCode, productTemplate.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, productTemplate.descriptionAndCode) &&
        Objects.equals(this.referenceCode, productTemplate.referenceCode) &&
        Objects.equals(this.referenceDescription, productTemplate.referenceDescription) &&
        Objects.equals(this.codeChanged, productTemplate.codeChanged) &&
        Objects.equals(this.parentEntity, productTemplate.parentEntity) &&
        Objects.equals(this._transient, productTemplate._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, uuid, cfValues, cfAccumulatedValues, disabled, name, offerTemplateCategories, validity, imagePath, attachments, lifeCycleStatus, businessAccountModels, channels, descriptionI18n, longDescription, longDescriptionI18n, globalRatingScriptInstance, sellers, customerCategories, productChargeTemplates, businessProductModel, invoicingCalendar, walletTemplates, parentCFEntities, descriptionI18nNullSafe, nameOrCode, longDescriptionI18nNullSafe, active, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ProductTemplate {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    auditable: ").append(toIndentedString(auditable)).append("\n");
    sb.append("    historized: ").append(toIndentedString(historized)).append("\n");
    sb.append("    notified: ").append(toIndentedString(notified)).append("\n");
    sb.append("    auditableFields: ").append(toIndentedString(auditableFields)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    appendGeneratedCode: ").append(toIndentedString(appendGeneratedCode)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    cfValues: ").append(toIndentedString(cfValues)).append("\n");
    sb.append("    cfAccumulatedValues: ").append(toIndentedString(cfAccumulatedValues)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    offerTemplateCategories: ").append(toIndentedString(offerTemplateCategories)).append("\n");
    sb.append("    validity: ").append(toIndentedString(validity)).append("\n");
    sb.append("    imagePath: ").append(toIndentedString(imagePath)).append("\n");
    sb.append("    attachments: ").append(toIndentedString(attachments)).append("\n");
    sb.append("    lifeCycleStatus: ").append(toIndentedString(lifeCycleStatus)).append("\n");
    sb.append("    businessAccountModels: ").append(toIndentedString(businessAccountModels)).append("\n");
    sb.append("    channels: ").append(toIndentedString(channels)).append("\n");
    sb.append("    descriptionI18n: ").append(toIndentedString(descriptionI18n)).append("\n");
    sb.append("    longDescription: ").append(toIndentedString(longDescription)).append("\n");
    sb.append("    longDescriptionI18n: ").append(toIndentedString(longDescriptionI18n)).append("\n");
    sb.append("    globalRatingScriptInstance: ").append(toIndentedString(globalRatingScriptInstance)).append("\n");
    sb.append("    sellers: ").append(toIndentedString(sellers)).append("\n");
    sb.append("    customerCategories: ").append(toIndentedString(customerCategories)).append("\n");
    sb.append("    productChargeTemplates: ").append(toIndentedString(productChargeTemplates)).append("\n");
    sb.append("    businessProductModel: ").append(toIndentedString(businessProductModel)).append("\n");
    sb.append("    invoicingCalendar: ").append(toIndentedString(invoicingCalendar)).append("\n");
    sb.append("    walletTemplates: ").append(toIndentedString(walletTemplates)).append("\n");
    sb.append("    parentCFEntities: ").append(toIndentedString(parentCFEntities)).append("\n");
    sb.append("    descriptionI18nNullSafe: ").append(toIndentedString(descriptionI18nNullSafe)).append("\n");
    sb.append("    nameOrCode: ").append(toIndentedString(nameOrCode)).append("\n");
    sb.append("    longDescriptionI18nNullSafe: ").append(toIndentedString(longDescriptionI18nNullSafe)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    cfValuesNullSafe: ").append(toIndentedString(cfValuesNullSafe)).append("\n");
    sb.append("    cfValuesAsValues: ").append(toIndentedString(cfValuesAsValues)).append("\n");
    sb.append("    cfAccumulatedValuesNullSafe: ").append(toIndentedString(cfAccumulatedValuesNullSafe)).append("\n");
    sb.append("    descriptionOrCode: ").append(toIndentedString(descriptionOrCode)).append("\n");
    sb.append("    descriptionAndCode: ").append(toIndentedString(descriptionAndCode)).append("\n");
    sb.append("    referenceCode: ").append(toIndentedString(referenceCode)).append("\n");
    sb.append("    referenceDescription: ").append(toIndentedString(referenceDescription)).append("\n");
    sb.append("    codeChanged: ").append(toIndentedString(codeChanged)).append("\n");
    sb.append("    parentEntity: ").append(toIndentedString(parentEntity)).append("\n");
    sb.append("    _transient: ").append(toIndentedString(_transient)).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    ");
  }

}

