/*
 * 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.Attachment;
import org.openapitools.client.model.BillingAccount;
import org.openapitools.client.model.Note;
import org.openapitools.client.model.Product;
import org.openapitools.client.model.ProductOffering;
import org.openapitools.client.model.QuoteProductOfferingPrice;
import org.openapitools.client.model.RelatedParty;
import org.openapitools.client.model.TimeRange;

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

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private String state;

  public static final String SERIALIZED_NAME_ACTION = "action";
  @SerializedName(SERIALIZED_NAME_ACTION)
  private String action;

  public static final String SERIALIZED_NAME_APPOINTMENT = "appointment";
  @SerializedName(SERIALIZED_NAME_APPOINTMENT)
  private String appointment;

  public static final String SERIALIZED_NAME_ATTACHMENT = "attachment";
  @SerializedName(SERIALIZED_NAME_ATTACHMENT)
  private Attachment attachment;

  public static final String SERIALIZED_NAME_RELATED_PARTY = "relatedParty";
  @SerializedName(SERIALIZED_NAME_RELATED_PARTY)
  private List<RelatedParty> relatedParty = null;

  public static final String SERIALIZED_NAME_NOTE = "note";
  @SerializedName(SERIALIZED_NAME_NOTE)
  private List<Note> note = null;

  public static final String SERIALIZED_NAME_PRODUCT_OFFERING = "productOffering";
  @SerializedName(SERIALIZED_NAME_PRODUCT_OFFERING)
  private ProductOffering productOffering;

  public static final String SERIALIZED_NAME_PRODUCT = "product";
  @SerializedName(SERIALIZED_NAME_PRODUCT)
  private Product product;

  public static final String SERIALIZED_NAME_ITEM_QUOTE_PRODUCT_OFFERING_PRICE = "itemQuoteProductOfferingPrice";
  @SerializedName(SERIALIZED_NAME_ITEM_QUOTE_PRODUCT_OFFERING_PRICE)
  private List<QuoteProductOfferingPrice> itemQuoteProductOfferingPrice = null;

  public static final String SERIALIZED_NAME_BILLING_ACCOUNT = "billingAccount";
  @SerializedName(SERIALIZED_NAME_BILLING_ACCOUNT)
  private List<BillingAccount> billingAccount = null;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_PERIOD = "subscriptionPeriod";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_PERIOD)
  private TimeRange subscriptionPeriod;

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


  public ProductQuoteItem id(String id) {
    
    this.id = id;
    return this;
  }

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

  public String getId() {
    return id;
  }



  public void setId(String id) {
    this.id = id;
  }


  public ProductQuoteItem state(String state) {
    
    this.state = state;
    return this;
  }

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

  public String getState() {
    return state;
  }



  public void setState(String state) {
    this.state = state;
  }


  public ProductQuoteItem action(String action) {
    
    this.action = action;
    return this;
  }

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

  public String getAction() {
    return action;
  }



  public void setAction(String action) {
    this.action = action;
  }


  public ProductQuoteItem appointment(String appointment) {
    
    this.appointment = appointment;
    return this;
  }

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

  public String getAppointment() {
    return appointment;
  }



  public void setAppointment(String appointment) {
    this.appointment = appointment;
  }


  public ProductQuoteItem attachment(Attachment attachment) {
    
    this.attachment = attachment;
    return this;
  }

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

  public Attachment getAttachment() {
    return attachment;
  }



  public void setAttachment(Attachment attachment) {
    this.attachment = attachment;
  }


  public ProductQuoteItem relatedParty(List<RelatedParty> relatedParty) {
    
    this.relatedParty = relatedParty;
    return this;
  }

  public ProductQuoteItem addRelatedPartyItem(RelatedParty relatedPartyItem) {
    if (this.relatedParty == null) {
      this.relatedParty = new ArrayList<RelatedParty>();
    }
    this.relatedParty.add(relatedPartyItem);
    return this;
  }

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

  public List<RelatedParty> getRelatedParty() {
    return relatedParty;
  }



  public void setRelatedParty(List<RelatedParty> relatedParty) {
    this.relatedParty = relatedParty;
  }


  public ProductQuoteItem note(List<Note> note) {
    
    this.note = note;
    return this;
  }

  public ProductQuoteItem addNoteItem(Note noteItem) {
    if (this.note == null) {
      this.note = new ArrayList<Note>();
    }
    this.note.add(noteItem);
    return this;
  }

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

  public List<Note> getNote() {
    return note;
  }



  public void setNote(List<Note> note) {
    this.note = note;
  }


  public ProductQuoteItem productOffering(ProductOffering productOffering) {
    
    this.productOffering = productOffering;
    return this;
  }

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

  public ProductOffering getProductOffering() {
    return productOffering;
  }



  public void setProductOffering(ProductOffering productOffering) {
    this.productOffering = productOffering;
  }


  public ProductQuoteItem product(Product product) {
    
    this.product = product;
    return this;
  }

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

  public Product getProduct() {
    return product;
  }



  public void setProduct(Product product) {
    this.product = product;
  }


  public ProductQuoteItem itemQuoteProductOfferingPrice(List<QuoteProductOfferingPrice> itemQuoteProductOfferingPrice) {
    
    this.itemQuoteProductOfferingPrice = itemQuoteProductOfferingPrice;
    return this;
  }

  public ProductQuoteItem addItemQuoteProductOfferingPriceItem(QuoteProductOfferingPrice itemQuoteProductOfferingPriceItem) {
    if (this.itemQuoteProductOfferingPrice == null) {
      this.itemQuoteProductOfferingPrice = new ArrayList<QuoteProductOfferingPrice>();
    }
    this.itemQuoteProductOfferingPrice.add(itemQuoteProductOfferingPriceItem);
    return this;
  }

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

  public List<QuoteProductOfferingPrice> getItemQuoteProductOfferingPrice() {
    return itemQuoteProductOfferingPrice;
  }



  public void setItemQuoteProductOfferingPrice(List<QuoteProductOfferingPrice> itemQuoteProductOfferingPrice) {
    this.itemQuoteProductOfferingPrice = itemQuoteProductOfferingPrice;
  }


  public ProductQuoteItem billingAccount(List<BillingAccount> billingAccount) {
    
    this.billingAccount = billingAccount;
    return this;
  }

  public ProductQuoteItem addBillingAccountItem(BillingAccount billingAccountItem) {
    if (this.billingAccount == null) {
      this.billingAccount = new ArrayList<BillingAccount>();
    }
    this.billingAccount.add(billingAccountItem);
    return this;
  }

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

  public List<BillingAccount> getBillingAccount() {
    return billingAccount;
  }



  public void setBillingAccount(List<BillingAccount> billingAccount) {
    this.billingAccount = billingAccount;
  }


  public ProductQuoteItem subscriptionPeriod(TimeRange subscriptionPeriod) {
    
    this.subscriptionPeriod = subscriptionPeriod;
    return this;
  }

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

  public TimeRange getSubscriptionPeriod() {
    return subscriptionPeriod;
  }



  public void setSubscriptionPeriod(TimeRange subscriptionPeriod) {
    this.subscriptionPeriod = subscriptionPeriod;
  }


  public ProductQuoteItem consumptionCdr(List<String> consumptionCdr) {
    
    this.consumptionCdr = consumptionCdr;
    return this;
  }

  public ProductQuoteItem addConsumptionCdrItem(String consumptionCdrItem) {
    if (this.consumptionCdr == null) {
      this.consumptionCdr = new ArrayList<String>();
    }
    this.consumptionCdr.add(consumptionCdrItem);
    return this;
  }

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

  public List<String> getConsumptionCdr() {
    return consumptionCdr;
  }



  public void setConsumptionCdr(List<String> consumptionCdr) {
    this.consumptionCdr = consumptionCdr;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ProductQuoteItem productQuoteItem = (ProductQuoteItem) o;
    return Objects.equals(this.id, productQuoteItem.id) &&
        Objects.equals(this.state, productQuoteItem.state) &&
        Objects.equals(this.action, productQuoteItem.action) &&
        Objects.equals(this.appointment, productQuoteItem.appointment) &&
        Objects.equals(this.attachment, productQuoteItem.attachment) &&
        Objects.equals(this.relatedParty, productQuoteItem.relatedParty) &&
        Objects.equals(this.note, productQuoteItem.note) &&
        Objects.equals(this.productOffering, productQuoteItem.productOffering) &&
        Objects.equals(this.product, productQuoteItem.product) &&
        Objects.equals(this.itemQuoteProductOfferingPrice, productQuoteItem.itemQuoteProductOfferingPrice) &&
        Objects.equals(this.billingAccount, productQuoteItem.billingAccount) &&
        Objects.equals(this.subscriptionPeriod, productQuoteItem.subscriptionPeriod) &&
        Objects.equals(this.consumptionCdr, productQuoteItem.consumptionCdr);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, state, action, appointment, attachment, relatedParty, note, productOffering, product, itemQuoteProductOfferingPrice, billingAccount, subscriptionPeriod, consumptionCdr);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ProductQuoteItem {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    appointment: ").append(toIndentedString(appointment)).append("\n");
    sb.append("    attachment: ").append(toIndentedString(attachment)).append("\n");
    sb.append("    relatedParty: ").append(toIndentedString(relatedParty)).append("\n");
    sb.append("    note: ").append(toIndentedString(note)).append("\n");
    sb.append("    productOffering: ").append(toIndentedString(productOffering)).append("\n");
    sb.append("    product: ").append(toIndentedString(product)).append("\n");
    sb.append("    itemQuoteProductOfferingPrice: ").append(toIndentedString(itemQuoteProductOfferingPrice)).append("\n");
    sb.append("    billingAccount: ").append(toIndentedString(billingAccount)).append("\n");
    sb.append("    subscriptionPeriod: ").append(toIndentedString(subscriptionPeriod)).append("\n");
    sb.append("    consumptionCdr: ").append(toIndentedString(consumptionCdr)).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    ");
  }

}

