com.seeq.model.SwapOptionV1 Maven / Gradle / Ivy
/*
* Seeq REST API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 65.1.3-v202408082312
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.seeq.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.seeq.model.InvalidSwapOutV1;
import com.seeq.model.ItemPreviewWithAssetsV1;
import com.seeq.model.ItemWithSwapPairsV1;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
* A list of Items that can be chosen as the swap root, ranked by the number of matches found between the Items to be swapped and the Items in the tree rooted at the Item to be swapped in.
*/
@Schema(description = "A list of Items that can be chosen as the swap root, ranked by the number of matches found between the Items to be swapped and the Items in the tree rooted at the Item to be swapped in.")
public class SwapOptionV1 {
@JsonProperty("invalidSwapOuts")
private List invalidSwapOuts = new ArrayList();
@JsonProperty("itemsWithSwapPairs")
private List itemsWithSwapPairs = new ArrayList();
@JsonProperty("swapRootCandidate")
private ItemPreviewWithAssetsV1 swapRootCandidate = null;
public SwapOptionV1 invalidSwapOuts(List invalidSwapOuts) {
this.invalidSwapOuts = invalidSwapOuts;
return this;
}
public SwapOptionV1 addInvalidSwapOutsItem(InvalidSwapOutV1 invalidSwapOutsItem) {
if (this.invalidSwapOuts == null) {
this.invalidSwapOuts = new ArrayList();
}
this.invalidSwapOuts.add(invalidSwapOutsItem);
return this;
}
/**
* The list of items from the query parameters that are invalid for swapping out with root item
* @return invalidSwapOuts
**/
@Schema(description = "The list of items from the query parameters that are invalid for swapping out with root item")
public List getInvalidSwapOuts() {
return invalidSwapOuts;
}
public void setInvalidSwapOuts(List invalidSwapOuts) {
this.invalidSwapOuts = invalidSwapOuts;
}
public SwapOptionV1 itemsWithSwapPairs(List itemsWithSwapPairs) {
this.itemsWithSwapPairs = itemsWithSwapPairs;
return this;
}
public SwapOptionV1 addItemsWithSwapPairsItem(ItemWithSwapPairsV1 itemsWithSwapPairsItem) {
if (this.itemsWithSwapPairs == null) {
this.itemsWithSwapPairs = new ArrayList();
}
this.itemsWithSwapPairs.add(itemsWithSwapPairsItem);
return this;
}
/**
* The list of items from the query parameters that can be swapped, augmented with the swap pairs needed to perform the swap
* @return itemsWithSwapPairs
**/
@Schema(description = "The list of items from the query parameters that can be swapped, augmented with the swap pairs needed to perform the swap")
public List getItemsWithSwapPairs() {
return itemsWithSwapPairs;
}
public void setItemsWithSwapPairs(List itemsWithSwapPairs) {
this.itemsWithSwapPairs = itemsWithSwapPairs;
}
public SwapOptionV1 swapRootCandidate(ItemPreviewWithAssetsV1 swapRootCandidate) {
this.swapRootCandidate = swapRootCandidate;
return this;
}
/**
* Get swapRootCandidate
* @return swapRootCandidate
**/
@Schema(description = "")
public ItemPreviewWithAssetsV1 getSwapRootCandidate() {
return swapRootCandidate;
}
public void setSwapRootCandidate(ItemPreviewWithAssetsV1 swapRootCandidate) {
this.swapRootCandidate = swapRootCandidate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SwapOptionV1 swapOptionV1 = (SwapOptionV1) o;
return Objects.equals(this.invalidSwapOuts, swapOptionV1.invalidSwapOuts) &&
Objects.equals(this.itemsWithSwapPairs, swapOptionV1.itemsWithSwapPairs) &&
Objects.equals(this.swapRootCandidate, swapOptionV1.swapRootCandidate);
}
@Override
public int hashCode() {
return Objects.hash(invalidSwapOuts, itemsWithSwapPairs, swapRootCandidate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SwapOptionV1 {\n");
sb.append(" invalidSwapOuts: ").append(toIndentedString(invalidSwapOuts)).append("\n");
sb.append(" itemsWithSwapPairs: ").append(toIndentedString(itemsWithSwapPairs)).append("\n");
sb.append(" swapRootCandidate: ").append(toIndentedString(swapRootCandidate)).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 ");
}
}