/*
 * 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.ChannelDto;
import org.openapitools.client.model.CustomFieldsDto;
import org.openapitools.client.model.CustomerCategoryDto;
import org.openapitools.client.model.DigitalResourceDto;
import org.openapitools.client.model.DiscountPlanDto;
import org.openapitools.client.model.LanguageDescriptionDto;
import org.openapitools.client.model.OfferProductTemplateDto;
import org.openapitools.client.model.OfferServiceTemplateDto;
import org.openapitools.client.model.OfferTemplateCategoryDto;
import org.openapitools.client.model.SubscriptionRenewalDto;
import org.threeten.bp.OffsetDateTime;

/**
 * OfferTemplateDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class OfferTemplateDto {
  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_VALID_FROM = "validFrom";
  @SerializedName(SERIALIZED_NAME_VALID_FROM)
  private OffsetDateTime validFrom;

  public static final String SERIALIZED_NAME_VALID_TO = "validTo";
  @SerializedName(SERIALIZED_NAME_VALID_TO)
  private OffsetDateTime validTo;

  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<OfferTemplateCategoryDto> offerTemplateCategories = null;

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

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

  public static final String SERIALIZED_NAME_MODEL_CODE = "modelCode";
  @SerializedName(SERIALIZED_NAME_MODEL_CODE)
  private String modelCode;

  /**
   * 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_CUSTOM_FIELDS = "customFields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  private CustomFieldsDto customFields;

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

  public static final String SERIALIZED_NAME_IMAGE_BASE64 = "imageBase64";
  @SerializedName(SERIALIZED_NAME_IMAGE_BASE64)
  private String imageBase64;

  public static final String SERIALIZED_NAME_LANGUAGE_DESCRIPTIONS = "languageDescriptions";
  @SerializedName(SERIALIZED_NAME_LANGUAGE_DESCRIPTIONS)
  private List<LanguageDescriptionDto> languageDescriptions = 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_DESCRIPTIONS_TRANSLATED = "longDescriptionsTranslated";
  @SerializedName(SERIALIZED_NAME_LONG_DESCRIPTIONS_TRANSLATED)
  private List<LanguageDescriptionDto> longDescriptionsTranslated = null;

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

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

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

  public static final String SERIALIZED_NAME_BOM_CODE = "bomCode";
  @SerializedName(SERIALIZED_NAME_BOM_CODE)
  private String bomCode;

  public static final String SERIALIZED_NAME_OFFER_TEMPLATE_CATEGORY_CODE = "offerTemplateCategoryCode";
  @SerializedName(SERIALIZED_NAME_OFFER_TEMPLATE_CATEGORY_CODE)
  private String offerTemplateCategoryCode;

  public static final String SERIALIZED_NAME_OFFER_SERVICE_TEMPLATES = "offerServiceTemplates";
  @SerializedName(SERIALIZED_NAME_OFFER_SERVICE_TEMPLATES)
  private List<OfferServiceTemplateDto> offerServiceTemplates = null;

  public static final String SERIALIZED_NAME_OFFER_PRODUCT_TEMPLATES = "offerProductTemplates";
  @SerializedName(SERIALIZED_NAME_OFFER_PRODUCT_TEMPLATES)
  private List<OfferProductTemplateDto> offerProductTemplates = null;

  public static final String SERIALIZED_NAME_ALLOWED_DISCOUNT_PLANS = "allowedDiscountPlans";
  @SerializedName(SERIALIZED_NAME_ALLOWED_DISCOUNT_PLANS)
  private List<DiscountPlanDto> allowedDiscountPlans = null;

  public static final String SERIALIZED_NAME_RENEWAL_RULE = "renewalRule";
  @SerializedName(SERIALIZED_NAME_RENEWAL_RULE)
  private SubscriptionRenewalDto renewalRule;

  public static final String SERIALIZED_NAME_MINIMUM_AMOUNT_EL = "minimumAmountEl";
  @SerializedName(SERIALIZED_NAME_MINIMUM_AMOUNT_EL)
  private String minimumAmountEl;

  public static final String SERIALIZED_NAME_MINIMUM_AMOUNT_EL_SPARK = "minimumAmountElSpark";
  @SerializedName(SERIALIZED_NAME_MINIMUM_AMOUNT_EL_SPARK)
  private String minimumAmountElSpark;

  public static final String SERIALIZED_NAME_MINIMUM_LABEL_EL = "minimumLabelEl";
  @SerializedName(SERIALIZED_NAME_MINIMUM_LABEL_EL)
  private String minimumLabelEl;

  public static final String SERIALIZED_NAME_MINIMUM_LABEL_EL_SPARK = "minimumLabelElSpark";
  @SerializedName(SERIALIZED_NAME_MINIMUM_LABEL_EL_SPARK)
  private String minimumLabelElSpark;

  public static final String SERIALIZED_NAME_AUTO_END_OF_ENGAGEMENT = "autoEndOfEngagement";
  @SerializedName(SERIALIZED_NAME_AUTO_END_OF_ENGAGEMENT)
  private Boolean autoEndOfEngagement;

  public static final String SERIALIZED_NAME_CODE_ONLY = "codeOnly";
  @SerializedName(SERIALIZED_NAME_CODE_ONLY)
  private Boolean codeOnly;


  public OfferTemplateDto 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 OfferTemplateDto 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 OfferTemplateDto 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 OfferTemplateDto 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 OfferTemplateDto 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 OfferTemplateDto validFrom(OffsetDateTime validFrom) {
    
    this.validFrom = validFrom;
    return this;
  }

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

  public OffsetDateTime getValidFrom() {
    return validFrom;
  }



  public void setValidFrom(OffsetDateTime validFrom) {
    this.validFrom = validFrom;
  }


  public OfferTemplateDto validTo(OffsetDateTime validTo) {
    
    this.validTo = validTo;
    return this;
  }

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

  public OffsetDateTime getValidTo() {
    return validTo;
  }



  public void setValidTo(OffsetDateTime validTo) {
    this.validTo = validTo;
  }


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

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

  public String getName() {
    return name;
  }



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


  public OfferTemplateDto offerTemplateCategories(List<OfferTemplateCategoryDto> offerTemplateCategories) {
    
    this.offerTemplateCategories = offerTemplateCategories;
    return this;
  }

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

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

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



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


  public OfferTemplateDto channels(List<ChannelDto> channels) {
    
    this.channels = channels;
    return this;
  }

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

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

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



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


  public OfferTemplateDto attachments(List<DigitalResourceDto> attachments) {
    
    this.attachments = attachments;
    return this;
  }

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

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

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



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


  public OfferTemplateDto modelCode(String modelCode) {
    
    this.modelCode = modelCode;
    return this;
  }

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

  public String getModelCode() {
    return modelCode;
  }



  public void setModelCode(String modelCode) {
    this.modelCode = modelCode;
  }


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

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

  public LifeCycleStatusEnum getLifeCycleStatus() {
    return lifeCycleStatus;
  }



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


  public OfferTemplateDto customFields(CustomFieldsDto customFields) {
    
    this.customFields = customFields;
    return this;
  }

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

  public CustomFieldsDto getCustomFields() {
    return customFields;
  }



  public void setCustomFields(CustomFieldsDto customFields) {
    this.customFields = customFields;
  }


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

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

  public String getImageBase64() {
    return imageBase64;
  }



  public void setImageBase64(String imageBase64) {
    this.imageBase64 = imageBase64;
  }


  public OfferTemplateDto languageDescriptions(List<LanguageDescriptionDto> languageDescriptions) {
    
    this.languageDescriptions = languageDescriptions;
    return this;
  }

  public OfferTemplateDto addLanguageDescriptionsItem(LanguageDescriptionDto languageDescriptionsItem) {
    if (this.languageDescriptions == null) {
      this.languageDescriptions = new ArrayList<LanguageDescriptionDto>();
    }
    this.languageDescriptions.add(languageDescriptionsItem);
    return this;
  }

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

  public List<LanguageDescriptionDto> getLanguageDescriptions() {
    return languageDescriptions;
  }



  public void setLanguageDescriptions(List<LanguageDescriptionDto> languageDescriptions) {
    this.languageDescriptions = languageDescriptions;
  }


  public OfferTemplateDto 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 OfferTemplateDto longDescriptionsTranslated(List<LanguageDescriptionDto> longDescriptionsTranslated) {
    
    this.longDescriptionsTranslated = longDescriptionsTranslated;
    return this;
  }

  public OfferTemplateDto addLongDescriptionsTranslatedItem(LanguageDescriptionDto longDescriptionsTranslatedItem) {
    if (this.longDescriptionsTranslated == null) {
      this.longDescriptionsTranslated = new ArrayList<LanguageDescriptionDto>();
    }
    this.longDescriptionsTranslated.add(longDescriptionsTranslatedItem);
    return this;
  }

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

  public List<LanguageDescriptionDto> getLongDescriptionsTranslated() {
    return longDescriptionsTranslated;
  }



  public void setLongDescriptionsTranslated(List<LanguageDescriptionDto> longDescriptionsTranslated) {
    this.longDescriptionsTranslated = longDescriptionsTranslated;
  }


  public OfferTemplateDto globalRatingScriptInstance(String globalRatingScriptInstance) {
    
    this.globalRatingScriptInstance = globalRatingScriptInstance;
    return this;
  }

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

  public String getGlobalRatingScriptInstance() {
    return globalRatingScriptInstance;
  }



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


  public OfferTemplateDto sellers(List<String> sellers) {
    
    this.sellers = sellers;
    return this;
  }

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

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

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



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


  public OfferTemplateDto customerCategories(List<CustomerCategoryDto> customerCategories) {
    
    this.customerCategories = customerCategories;
    return this;
  }

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

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

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



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


  public OfferTemplateDto bomCode(String bomCode) {
    
    this.bomCode = bomCode;
    return this;
  }

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

  public String getBomCode() {
    return bomCode;
  }



  public void setBomCode(String bomCode) {
    this.bomCode = bomCode;
  }


  public OfferTemplateDto offerTemplateCategoryCode(String offerTemplateCategoryCode) {
    
    this.offerTemplateCategoryCode = offerTemplateCategoryCode;
    return this;
  }

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

  public String getOfferTemplateCategoryCode() {
    return offerTemplateCategoryCode;
  }



  public void setOfferTemplateCategoryCode(String offerTemplateCategoryCode) {
    this.offerTemplateCategoryCode = offerTemplateCategoryCode;
  }


  public OfferTemplateDto offerServiceTemplates(List<OfferServiceTemplateDto> offerServiceTemplates) {
    
    this.offerServiceTemplates = offerServiceTemplates;
    return this;
  }

  public OfferTemplateDto addOfferServiceTemplatesItem(OfferServiceTemplateDto offerServiceTemplatesItem) {
    if (this.offerServiceTemplates == null) {
      this.offerServiceTemplates = new ArrayList<OfferServiceTemplateDto>();
    }
    this.offerServiceTemplates.add(offerServiceTemplatesItem);
    return this;
  }

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

  public List<OfferServiceTemplateDto> getOfferServiceTemplates() {
    return offerServiceTemplates;
  }



  public void setOfferServiceTemplates(List<OfferServiceTemplateDto> offerServiceTemplates) {
    this.offerServiceTemplates = offerServiceTemplates;
  }


  public OfferTemplateDto offerProductTemplates(List<OfferProductTemplateDto> offerProductTemplates) {
    
    this.offerProductTemplates = offerProductTemplates;
    return this;
  }

  public OfferTemplateDto addOfferProductTemplatesItem(OfferProductTemplateDto offerProductTemplatesItem) {
    if (this.offerProductTemplates == null) {
      this.offerProductTemplates = new ArrayList<OfferProductTemplateDto>();
    }
    this.offerProductTemplates.add(offerProductTemplatesItem);
    return this;
  }

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

  public List<OfferProductTemplateDto> getOfferProductTemplates() {
    return offerProductTemplates;
  }



  public void setOfferProductTemplates(List<OfferProductTemplateDto> offerProductTemplates) {
    this.offerProductTemplates = offerProductTemplates;
  }


  public OfferTemplateDto allowedDiscountPlans(List<DiscountPlanDto> allowedDiscountPlans) {
    
    this.allowedDiscountPlans = allowedDiscountPlans;
    return this;
  }

  public OfferTemplateDto addAllowedDiscountPlansItem(DiscountPlanDto allowedDiscountPlansItem) {
    if (this.allowedDiscountPlans == null) {
      this.allowedDiscountPlans = new ArrayList<DiscountPlanDto>();
    }
    this.allowedDiscountPlans.add(allowedDiscountPlansItem);
    return this;
  }

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

  public List<DiscountPlanDto> getAllowedDiscountPlans() {
    return allowedDiscountPlans;
  }



  public void setAllowedDiscountPlans(List<DiscountPlanDto> allowedDiscountPlans) {
    this.allowedDiscountPlans = allowedDiscountPlans;
  }


  public OfferTemplateDto renewalRule(SubscriptionRenewalDto renewalRule) {
    
    this.renewalRule = renewalRule;
    return this;
  }

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

  public SubscriptionRenewalDto getRenewalRule() {
    return renewalRule;
  }



  public void setRenewalRule(SubscriptionRenewalDto renewalRule) {
    this.renewalRule = renewalRule;
  }


  public OfferTemplateDto minimumAmountEl(String minimumAmountEl) {
    
    this.minimumAmountEl = minimumAmountEl;
    return this;
  }

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

  public String getMinimumAmountEl() {
    return minimumAmountEl;
  }



  public void setMinimumAmountEl(String minimumAmountEl) {
    this.minimumAmountEl = minimumAmountEl;
  }


  public OfferTemplateDto minimumAmountElSpark(String minimumAmountElSpark) {
    
    this.minimumAmountElSpark = minimumAmountElSpark;
    return this;
  }

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

  public String getMinimumAmountElSpark() {
    return minimumAmountElSpark;
  }



  public void setMinimumAmountElSpark(String minimumAmountElSpark) {
    this.minimumAmountElSpark = minimumAmountElSpark;
  }


  public OfferTemplateDto minimumLabelEl(String minimumLabelEl) {
    
    this.minimumLabelEl = minimumLabelEl;
    return this;
  }

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

  public String getMinimumLabelEl() {
    return minimumLabelEl;
  }



  public void setMinimumLabelEl(String minimumLabelEl) {
    this.minimumLabelEl = minimumLabelEl;
  }


  public OfferTemplateDto minimumLabelElSpark(String minimumLabelElSpark) {
    
    this.minimumLabelElSpark = minimumLabelElSpark;
    return this;
  }

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

  public String getMinimumLabelElSpark() {
    return minimumLabelElSpark;
  }



  public void setMinimumLabelElSpark(String minimumLabelElSpark) {
    this.minimumLabelElSpark = minimumLabelElSpark;
  }


  public OfferTemplateDto autoEndOfEngagement(Boolean autoEndOfEngagement) {
    
    this.autoEndOfEngagement = autoEndOfEngagement;
    return this;
  }

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

  public Boolean getAutoEndOfEngagement() {
    return autoEndOfEngagement;
  }



  public void setAutoEndOfEngagement(Boolean autoEndOfEngagement) {
    this.autoEndOfEngagement = autoEndOfEngagement;
  }


  public OfferTemplateDto codeOnly(Boolean codeOnly) {
    
    this.codeOnly = codeOnly;
    return this;
  }

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

  public Boolean getCodeOnly() {
    return codeOnly;
  }



  public void setCodeOnly(Boolean codeOnly) {
    this.codeOnly = codeOnly;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OfferTemplateDto offerTemplateDto = (OfferTemplateDto) o;
    return Objects.equals(this.id, offerTemplateDto.id) &&
        Objects.equals(this.code, offerTemplateDto.code) &&
        Objects.equals(this.description, offerTemplateDto.description) &&
        Objects.equals(this.updatedCode, offerTemplateDto.updatedCode) &&
        Objects.equals(this.disabled, offerTemplateDto.disabled) &&
        Objects.equals(this.validFrom, offerTemplateDto.validFrom) &&
        Objects.equals(this.validTo, offerTemplateDto.validTo) &&
        Objects.equals(this.name, offerTemplateDto.name) &&
        Objects.equals(this.offerTemplateCategories, offerTemplateDto.offerTemplateCategories) &&
        Objects.equals(this.channels, offerTemplateDto.channels) &&
        Objects.equals(this.attachments, offerTemplateDto.attachments) &&
        Objects.equals(this.modelCode, offerTemplateDto.modelCode) &&
        Objects.equals(this.lifeCycleStatus, offerTemplateDto.lifeCycleStatus) &&
        Objects.equals(this.customFields, offerTemplateDto.customFields) &&
        Objects.equals(this.imagePath, offerTemplateDto.imagePath) &&
        Objects.equals(this.imageBase64, offerTemplateDto.imageBase64) &&
        Objects.equals(this.languageDescriptions, offerTemplateDto.languageDescriptions) &&
        Objects.equals(this.longDescription, offerTemplateDto.longDescription) &&
        Objects.equals(this.longDescriptionsTranslated, offerTemplateDto.longDescriptionsTranslated) &&
        Objects.equals(this.globalRatingScriptInstance, offerTemplateDto.globalRatingScriptInstance) &&
        Objects.equals(this.sellers, offerTemplateDto.sellers) &&
        Objects.equals(this.customerCategories, offerTemplateDto.customerCategories) &&
        Objects.equals(this.bomCode, offerTemplateDto.bomCode) &&
        Objects.equals(this.offerTemplateCategoryCode, offerTemplateDto.offerTemplateCategoryCode) &&
        Objects.equals(this.offerServiceTemplates, offerTemplateDto.offerServiceTemplates) &&
        Objects.equals(this.offerProductTemplates, offerTemplateDto.offerProductTemplates) &&
        Objects.equals(this.allowedDiscountPlans, offerTemplateDto.allowedDiscountPlans) &&
        Objects.equals(this.renewalRule, offerTemplateDto.renewalRule) &&
        Objects.equals(this.minimumAmountEl, offerTemplateDto.minimumAmountEl) &&
        Objects.equals(this.minimumAmountElSpark, offerTemplateDto.minimumAmountElSpark) &&
        Objects.equals(this.minimumLabelEl, offerTemplateDto.minimumLabelEl) &&
        Objects.equals(this.minimumLabelElSpark, offerTemplateDto.minimumLabelElSpark) &&
        Objects.equals(this.autoEndOfEngagement, offerTemplateDto.autoEndOfEngagement) &&
        Objects.equals(this.codeOnly, offerTemplateDto.codeOnly);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, validFrom, validTo, name, offerTemplateCategories, channels, attachments, modelCode, lifeCycleStatus, customFields, imagePath, imageBase64, languageDescriptions, longDescription, longDescriptionsTranslated, globalRatingScriptInstance, sellers, customerCategories, bomCode, offerTemplateCategoryCode, offerServiceTemplates, offerProductTemplates, allowedDiscountPlans, renewalRule, minimumAmountEl, minimumAmountElSpark, minimumLabelEl, minimumLabelElSpark, autoEndOfEngagement, codeOnly);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OfferTemplateDto {\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("    validFrom: ").append(toIndentedString(validFrom)).append("\n");
    sb.append("    validTo: ").append(toIndentedString(validTo)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    offerTemplateCategories: ").append(toIndentedString(offerTemplateCategories)).append("\n");
    sb.append("    channels: ").append(toIndentedString(channels)).append("\n");
    sb.append("    attachments: ").append(toIndentedString(attachments)).append("\n");
    sb.append("    modelCode: ").append(toIndentedString(modelCode)).append("\n");
    sb.append("    lifeCycleStatus: ").append(toIndentedString(lifeCycleStatus)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    imagePath: ").append(toIndentedString(imagePath)).append("\n");
    sb.append("    imageBase64: ").append(toIndentedString(imageBase64)).append("\n");
    sb.append("    languageDescriptions: ").append(toIndentedString(languageDescriptions)).append("\n");
    sb.append("    longDescription: ").append(toIndentedString(longDescription)).append("\n");
    sb.append("    longDescriptionsTranslated: ").append(toIndentedString(longDescriptionsTranslated)).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("    bomCode: ").append(toIndentedString(bomCode)).append("\n");
    sb.append("    offerTemplateCategoryCode: ").append(toIndentedString(offerTemplateCategoryCode)).append("\n");
    sb.append("    offerServiceTemplates: ").append(toIndentedString(offerServiceTemplates)).append("\n");
    sb.append("    offerProductTemplates: ").append(toIndentedString(offerProductTemplates)).append("\n");
    sb.append("    allowedDiscountPlans: ").append(toIndentedString(allowedDiscountPlans)).append("\n");
    sb.append("    renewalRule: ").append(toIndentedString(renewalRule)).append("\n");
    sb.append("    minimumAmountEl: ").append(toIndentedString(minimumAmountEl)).append("\n");
    sb.append("    minimumAmountElSpark: ").append(toIndentedString(minimumAmountElSpark)).append("\n");
    sb.append("    minimumLabelEl: ").append(toIndentedString(minimumLabelEl)).append("\n");
    sb.append("    minimumLabelElSpark: ").append(toIndentedString(minimumLabelElSpark)).append("\n");
    sb.append("    autoEndOfEngagement: ").append(toIndentedString(autoEndOfEngagement)).append("\n");
    sb.append("    codeOnly: ").append(toIndentedString(codeOnly)).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    ");
  }

}

