/*
 * Inventory
 * Swagger JSON for inventory apis
 *
 * OpenAPI spec version: 5.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.kibocommerce.sdk.inventory.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 com.kibocommerce.sdk.inventory.model.BaseRequest;
import com.kibocommerce.sdk.inventory.model.Item;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * AggregateRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-25T11:56:03.255426-05:00[America/Chicago]")
public class AggregateRequest extends BaseRequest {
  public static final String SERIALIZED_NAME_ITEMS = "items";
  @SerializedName(SERIALIZED_NAME_ITEMS)
  private List<Item> items = new ArrayList<Item>();

  public static final String SERIALIZED_NAME_IGNORE_SAFETY_STOCK = "ignoreSafetyStock";
  @SerializedName(SERIALIZED_NAME_IGNORE_SAFETY_STOCK)
  private Boolean ignoreSafetyStock;

  public static final String SERIALIZED_NAME_INCLUDE_NEGATIVE_INVENTORY = "includeNegativeInventory";
  @SerializedName(SERIALIZED_NAME_INCLUDE_NEGATIVE_INVENTORY)
  private Boolean includeNegativeInventory;

  public static final String SERIALIZED_NAME_DIRECT_SHIP = "directShip";
  @SerializedName(SERIALIZED_NAME_DIRECT_SHIP)
  private Boolean directShip;

  public static final String SERIALIZED_NAME_TRANSFER_ENABLED = "transferEnabled";
  @SerializedName(SERIALIZED_NAME_TRANSFER_ENABLED)
  private Boolean transferEnabled;

  public static final String SERIALIZED_NAME_PICKUP = "pickup";
  @SerializedName(SERIALIZED_NAME_PICKUP)
  private Boolean pickup;

  public AggregateRequest items(List<Item> items) {
    this.items = items;
    return this;
  }

  public AggregateRequest addItemsItem(Item itemsItem) {
    this.items.add(itemsItem);
    return this;
  }

   /**
   * List of Items to search on
   * @return items
  **/
  @ApiModelProperty(required = true, value = "List of Items to search on")
  public List<Item> getItems() {
    return items;
  }

  public void setItems(List<Item> items) {
    this.items = items;
  }

  public AggregateRequest ignoreSafetyStock(Boolean ignoreSafetyStock) {
    this.ignoreSafetyStock = ignoreSafetyStock;
    return this;
  }

   /**
   * Whether to ignore the safety stock buffer put in place
   * @return ignoreSafetyStock
  **/
  @ApiModelProperty(value = "Whether to ignore the safety stock buffer put in place")
  public Boolean getIgnoreSafetyStock() {
    return ignoreSafetyStock;
  }

  public void setIgnoreSafetyStock(Boolean ignoreSafetyStock) {
    this.ignoreSafetyStock = ignoreSafetyStock;
  }

  public AggregateRequest includeNegativeInventory(Boolean includeNegativeInventory) {
    this.includeNegativeInventory = includeNegativeInventory;
    return this;
  }

   /**
   * Whether to allow items with negative inventory in the results
   * @return includeNegativeInventory
  **/
  @ApiModelProperty(value = "Whether to allow items with negative inventory in the results")
  public Boolean getIncludeNegativeInventory() {
    return includeNegativeInventory;
  }

  public void setIncludeNegativeInventory(Boolean includeNegativeInventory) {
    this.includeNegativeInventory = includeNegativeInventory;
  }

  public AggregateRequest directShip(Boolean directShip) {
    this.directShip = directShip;
    return this;
  }

   /**
   * Whether to limit results to locations that are shipping enabled
   * @return directShip
  **/
  @ApiModelProperty(value = "Whether to limit results to locations that are shipping enabled")
  public Boolean getDirectShip() {
    return directShip;
  }

  public void setDirectShip(Boolean directShip) {
    this.directShip = directShip;
  }

  public AggregateRequest transferEnabled(Boolean transferEnabled) {
    this.transferEnabled = transferEnabled;
    return this;
  }

   /**
   * Filter results by locations that apply tax (true) or don&#39;t (false)
   * @return transferEnabled
  **/
  @ApiModelProperty(value = "Filter results by locations that apply tax (true) or don't (false)")
  public Boolean getTransferEnabled() {
    return transferEnabled;
  }

  public void setTransferEnabled(Boolean transferEnabled) {
    this.transferEnabled = transferEnabled;
  }

  public AggregateRequest pickup(Boolean pickup) {
    this.pickup = pickup;
    return this;
  }

   /**
   * Filter results by pickup enabled (true) or not (false)
   * @return pickup
  **/
  @ApiModelProperty(value = "Filter results by pickup enabled (true) or not (false)")
  public Boolean getPickup() {
    return pickup;
  }

  public void setPickup(Boolean pickup) {
    this.pickup = pickup;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AggregateRequest aggregateRequest = (AggregateRequest) o;
    return Objects.equals(this.items, aggregateRequest.items) &&
        Objects.equals(this.ignoreSafetyStock, aggregateRequest.ignoreSafetyStock) &&
        Objects.equals(this.includeNegativeInventory, aggregateRequest.includeNegativeInventory) &&
        Objects.equals(this.directShip, aggregateRequest.directShip) &&
        Objects.equals(this.transferEnabled, aggregateRequest.transferEnabled) &&
        Objects.equals(this.pickup, aggregateRequest.pickup) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(items, ignoreSafetyStock, includeNegativeInventory, directShip, transferEnabled, pickup, super.hashCode());
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AggregateRequest {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    items: ").append(toIndentedString(items)).append("\n");
    sb.append("    ignoreSafetyStock: ").append(toIndentedString(ignoreSafetyStock)).append("\n");
    sb.append("    includeNegativeInventory: ").append(toIndentedString(includeNegativeInventory)).append("\n");
    sb.append("    directShip: ").append(toIndentedString(directShip)).append("\n");
    sb.append("    transferEnabled: ").append(toIndentedString(transferEnabled)).append("\n");
    sb.append("    pickup: ").append(toIndentedString(pickup)).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    ");
  }

}

