/*
 * 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.DatePeriod;
import org.openapitools.client.model.OfferTemplate;
import org.openapitools.client.model.ServiceTemplate;

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

  public static final String SERIALIZED_NAME_OFFER_TEMPLATE = "offerTemplate";
  @SerializedName(SERIALIZED_NAME_OFFER_TEMPLATE)
  private OfferTemplate offerTemplate;

  public static final String SERIALIZED_NAME_SERVICE_TEMPLATE = "serviceTemplate";
  @SerializedName(SERIALIZED_NAME_SERVICE_TEMPLATE)
  private ServiceTemplate serviceTemplate;

  public static final String SERIALIZED_NAME_MANDATORY = "mandatory";
  @SerializedName(SERIALIZED_NAME_MANDATORY)
  private Boolean mandatory;

  public static final String SERIALIZED_NAME_INCOMPATIBLE_SERVICES = "incompatibleServices";
  @SerializedName(SERIALIZED_NAME_INCOMPATIBLE_SERVICES)
  private List<ServiceTemplate> incompatibleServices = null;

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

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


  public OfferServiceTemplate 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 OfferServiceTemplate offerTemplate(OfferTemplate offerTemplate) {
    
    this.offerTemplate = offerTemplate;
    return this;
  }

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

  public OfferTemplate getOfferTemplate() {
    return offerTemplate;
  }



  public void setOfferTemplate(OfferTemplate offerTemplate) {
    this.offerTemplate = offerTemplate;
  }


  public OfferServiceTemplate serviceTemplate(ServiceTemplate serviceTemplate) {
    
    this.serviceTemplate = serviceTemplate;
    return this;
  }

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

  public ServiceTemplate getServiceTemplate() {
    return serviceTemplate;
  }



  public void setServiceTemplate(ServiceTemplate serviceTemplate) {
    this.serviceTemplate = serviceTemplate;
  }


  public OfferServiceTemplate mandatory(Boolean mandatory) {
    
    this.mandatory = mandatory;
    return this;
  }

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

  public Boolean getMandatory() {
    return mandatory;
  }



  public void setMandatory(Boolean mandatory) {
    this.mandatory = mandatory;
  }


  public OfferServiceTemplate incompatibleServices(List<ServiceTemplate> incompatibleServices) {
    
    this.incompatibleServices = incompatibleServices;
    return this;
  }

  public OfferServiceTemplate addIncompatibleServicesItem(ServiceTemplate incompatibleServicesItem) {
    if (this.incompatibleServices == null) {
      this.incompatibleServices = new ArrayList<ServiceTemplate>();
    }
    this.incompatibleServices.add(incompatibleServicesItem);
    return this;
  }

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

  public List<ServiceTemplate> getIncompatibleServices() {
    return incompatibleServices;
  }



  public void setIncompatibleServices(List<ServiceTemplate> incompatibleServices) {
    this.incompatibleServices = incompatibleServices;
  }


  public OfferServiceTemplate 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 OfferServiceTemplate _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;
    }
    OfferServiceTemplate offerServiceTemplate = (OfferServiceTemplate) o;
    return Objects.equals(this.id, offerServiceTemplate.id) &&
        Objects.equals(this.offerTemplate, offerServiceTemplate.offerTemplate) &&
        Objects.equals(this.serviceTemplate, offerServiceTemplate.serviceTemplate) &&
        Objects.equals(this.mandatory, offerServiceTemplate.mandatory) &&
        Objects.equals(this.incompatibleServices, offerServiceTemplate.incompatibleServices) &&
        Objects.equals(this.validity, offerServiceTemplate.validity) &&
        Objects.equals(this._transient, offerServiceTemplate._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, offerTemplate, serviceTemplate, mandatory, incompatibleServices, validity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OfferServiceTemplate {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    offerTemplate: ").append(toIndentedString(offerTemplate)).append("\n");
    sb.append("    serviceTemplate: ").append(toIndentedString(serviceTemplate)).append("\n");
    sb.append("    mandatory: ").append(toIndentedString(mandatory)).append("\n");
    sb.append("    incompatibleServices: ").append(toIndentedString(incompatibleServices)).append("\n");
    sb.append("    validity: ").append(toIndentedString(validity)).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    ");
  }

}

