/*
 * 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.BSMConfigurationDto;
import org.openapitools.client.model.CustomFieldDto;
import org.openapitools.client.model.OfferTemplateCategoryDto;
import org.openapitools.client.model.ServiceConfigurationDto;

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

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private String code;

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

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "customFields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  private List<CustomFieldDto> customFields = null;

  public static final String SERIALIZED_NAME_PREFIX = "prefix";
  @SerializedName(SERIALIZED_NAME_PREFIX)
  private String prefix;

  public static final String SERIALIZED_NAME_SERVICES_TO_ACTIVATE = "servicesToActivate";
  @SerializedName(SERIALIZED_NAME_SERVICES_TO_ACTIVATE)
  private List<ServiceConfigurationDto> servicesToActivate = null;

  public static final String SERIALIZED_NAME_PRODUCTS_TO_ACTIVATE = "productsToActivate";
  @SerializedName(SERIALIZED_NAME_PRODUCTS_TO_ACTIVATE)
  private List<ServiceConfigurationDto> productsToActivate = null;

  public static final String SERIALIZED_NAME_BUSINESS_SERVICE_MODELS = "businessServiceModels";
  @SerializedName(SERIALIZED_NAME_BUSINESS_SERVICE_MODELS)
  private List<BSMConfigurationDto> businessServiceModels = null;

  /**
   * Gets or Sets lifeCycleStatusEnum
   */
  @JsonAdapter(LifeCycleStatusEnumEnum.Adapter.class)
  public enum LifeCycleStatusEnumEnum {
    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;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_LIFE_CYCLE_STATUS_ENUM = "lifeCycleStatusEnum";
  @SerializedName(SERIALIZED_NAME_LIFE_CYCLE_STATUS_ENUM)
  private LifeCycleStatusEnumEnum lifeCycleStatusEnum;

  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_IMAGE_BASE64 = "imageBase64";
  @SerializedName(SERIALIZED_NAME_IMAGE_BASE64)
  private String imageBase64;

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


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

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

  public String getBomCode() {
    return bomCode;
  }



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


  public BomOfferDto 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 BomOfferDto 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 BomOfferDto 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 BomOfferDto customFields(List<CustomFieldDto> customFields) {
    
    this.customFields = customFields;
    return this;
  }

  public BomOfferDto addCustomFieldsItem(CustomFieldDto customFieldsItem) {
    if (this.customFields == null) {
      this.customFields = new ArrayList<CustomFieldDto>();
    }
    this.customFields.add(customFieldsItem);
    return this;
  }

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

  public List<CustomFieldDto> getCustomFields() {
    return customFields;
  }



  public void setCustomFields(List<CustomFieldDto> customFields) {
    this.customFields = customFields;
  }


  public BomOfferDto prefix(String prefix) {
    
    this.prefix = prefix;
    return this;
  }

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

  public String getPrefix() {
    return prefix;
  }



  public void setPrefix(String prefix) {
    this.prefix = prefix;
  }


  public BomOfferDto servicesToActivate(List<ServiceConfigurationDto> servicesToActivate) {
    
    this.servicesToActivate = servicesToActivate;
    return this;
  }

  public BomOfferDto addServicesToActivateItem(ServiceConfigurationDto servicesToActivateItem) {
    if (this.servicesToActivate == null) {
      this.servicesToActivate = new ArrayList<ServiceConfigurationDto>();
    }
    this.servicesToActivate.add(servicesToActivateItem);
    return this;
  }

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

  public List<ServiceConfigurationDto> getServicesToActivate() {
    return servicesToActivate;
  }



  public void setServicesToActivate(List<ServiceConfigurationDto> servicesToActivate) {
    this.servicesToActivate = servicesToActivate;
  }


  public BomOfferDto productsToActivate(List<ServiceConfigurationDto> productsToActivate) {
    
    this.productsToActivate = productsToActivate;
    return this;
  }

  public BomOfferDto addProductsToActivateItem(ServiceConfigurationDto productsToActivateItem) {
    if (this.productsToActivate == null) {
      this.productsToActivate = new ArrayList<ServiceConfigurationDto>();
    }
    this.productsToActivate.add(productsToActivateItem);
    return this;
  }

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

  public List<ServiceConfigurationDto> getProductsToActivate() {
    return productsToActivate;
  }



  public void setProductsToActivate(List<ServiceConfigurationDto> productsToActivate) {
    this.productsToActivate = productsToActivate;
  }


  public BomOfferDto businessServiceModels(List<BSMConfigurationDto> businessServiceModels) {
    
    this.businessServiceModels = businessServiceModels;
    return this;
  }

  public BomOfferDto addBusinessServiceModelsItem(BSMConfigurationDto businessServiceModelsItem) {
    if (this.businessServiceModels == null) {
      this.businessServiceModels = new ArrayList<BSMConfigurationDto>();
    }
    this.businessServiceModels.add(businessServiceModelsItem);
    return this;
  }

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

  public List<BSMConfigurationDto> getBusinessServiceModels() {
    return businessServiceModels;
  }



  public void setBusinessServiceModels(List<BSMConfigurationDto> businessServiceModels) {
    this.businessServiceModels = businessServiceModels;
  }


  public BomOfferDto lifeCycleStatusEnum(LifeCycleStatusEnumEnum lifeCycleStatusEnum) {
    
    this.lifeCycleStatusEnum = lifeCycleStatusEnum;
    return this;
  }

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

  public LifeCycleStatusEnumEnum getLifeCycleStatusEnum() {
    return lifeCycleStatusEnum;
  }



  public void setLifeCycleStatusEnum(LifeCycleStatusEnumEnum lifeCycleStatusEnum) {
    this.lifeCycleStatusEnum = lifeCycleStatusEnum;
  }


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

  public BomOfferDto 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 BomOfferDto 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 BomOfferDto 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;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BomOfferDto bomOfferDto = (BomOfferDto) o;
    return Objects.equals(this.bomCode, bomOfferDto.bomCode) &&
        Objects.equals(this.code, bomOfferDto.code) &&
        Objects.equals(this.name, bomOfferDto.name) &&
        Objects.equals(this.description, bomOfferDto.description) &&
        Objects.equals(this.customFields, bomOfferDto.customFields) &&
        Objects.equals(this.prefix, bomOfferDto.prefix) &&
        Objects.equals(this.servicesToActivate, bomOfferDto.servicesToActivate) &&
        Objects.equals(this.productsToActivate, bomOfferDto.productsToActivate) &&
        Objects.equals(this.businessServiceModels, bomOfferDto.businessServiceModels) &&
        Objects.equals(this.lifeCycleStatusEnum, bomOfferDto.lifeCycleStatusEnum) &&
        Objects.equals(this.offerTemplateCategories, bomOfferDto.offerTemplateCategories) &&
        Objects.equals(this.imageBase64, bomOfferDto.imageBase64) &&
        Objects.equals(this.imagePath, bomOfferDto.imagePath);
  }

  @Override
  public int hashCode() {
    return Objects.hash(bomCode, code, name, description, customFields, prefix, servicesToActivate, productsToActivate, businessServiceModels, lifeCycleStatusEnum, offerTemplateCategories, imageBase64, imagePath);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BomOfferDto {\n");
    sb.append("    bomCode: ").append(toIndentedString(bomCode)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    prefix: ").append(toIndentedString(prefix)).append("\n");
    sb.append("    servicesToActivate: ").append(toIndentedString(servicesToActivate)).append("\n");
    sb.append("    productsToActivate: ").append(toIndentedString(productsToActivate)).append("\n");
    sb.append("    businessServiceModels: ").append(toIndentedString(businessServiceModels)).append("\n");
    sb.append("    lifeCycleStatusEnum: ").append(toIndentedString(lifeCycleStatusEnum)).append("\n");
    sb.append("    offerTemplateCategories: ").append(toIndentedString(offerTemplateCategories)).append("\n");
    sb.append("    imageBase64: ").append(toIndentedString(imageBase64)).append("\n");
    sb.append("    imagePath: ").append(toIndentedString(imagePath)).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    ");
  }

}

