com.seeq.model.PropertySearchV1 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.PropertyFilterInputV1;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* The list of searches based on properties
*/
@Schema(description = "The list of searches based on properties")
public class PropertySearchV1 {
@JsonProperty("ancestorId")
private UUID ancestorId = null;
@JsonProperty("folderId")
private UUID folderId = null;
@JsonProperty("isInclude")
private Boolean isInclude = null;
@JsonProperty("predicates")
private List predicates = new ArrayList();
/**
* The type of search
*/
public enum SearchTypeEnum {
SWAP_ACROSS_ASSETS("SWAP_ACROSS_ASSETS"),
FIXED_LIST("FIXED_LIST"),
PROPERTY("PROPERTY");
private String value;
SearchTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SearchTypeEnum fromValue(String input) {
for (SearchTypeEnum b : SearchTypeEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
} @JsonProperty("searchType")
private SearchTypeEnum searchType = null;
@JsonProperty("types")
private List types = new ArrayList();
public PropertySearchV1 ancestorId(UUID ancestorId) {
this.ancestorId = ancestorId;
return this;
}
/**
* If provided, only search for items that are descendants of this asset
* @return ancestorId
**/
@Schema(description = "If provided, only search for items that are descendants of this asset")
public UUID getAncestorId() {
return ancestorId;
}
public void setAncestorId(UUID ancestorId) {
this.ancestorId = ancestorId;
}
public PropertySearchV1 folderId(UUID folderId) {
this.folderId = folderId;
return this;
}
/**
* If provided, only search for items that are scoped to the workbooks contained in this folder
* @return folderId
**/
@Schema(description = "If provided, only search for items that are scoped to the workbooks contained in this folder")
public UUID getFolderId() {
return folderId;
}
public void setFolderId(UUID folderId) {
this.folderId = folderId;
}
public PropertySearchV1 isInclude(Boolean isInclude) {
this.isInclude = isInclude;
return this;
}
/**
* If true, the items found by this search will be included in the output. If false, then the results will be excluded from the output (even if found by another search)
* @return isInclude
**/
@Schema(required = true, description = "If true, the items found by this search will be included in the output. If false, then the results will be excluded from the output (even if found by another search)")
public Boolean getIsInclude() {
return isInclude;
}
public void setIsInclude(Boolean isInclude) {
this.isInclude = isInclude;
}
public PropertySearchV1 predicates(List predicates) {
this.predicates = predicates;
return this;
}
public PropertySearchV1 addPredicatesItem(PropertyFilterInputV1 predicatesItem) {
if (this.predicates == null) {
this.predicates = new ArrayList();
}
this.predicates.add(predicatesItem);
return this;
}
/**
* A list of predicates by which to filter the items
* @return predicates
**/
@Schema(description = "A list of predicates by which to filter the items")
public List getPredicates() {
return predicates;
}
public void setPredicates(List predicates) {
this.predicates = predicates;
}
/**
* The type of search
* @return searchType
**/
@Schema(required = true, description = "The type of search")
public SearchTypeEnum getSearchType() {
return searchType;
}
public PropertySearchV1 types(List types) {
this.types = types;
return this;
}
public PropertySearchV1 addTypesItem(String typesItem) {
this.types.add(typesItem);
return this;
}
/**
* A list of types by which to filter the items
* @return types
**/
@Schema(required = true, description = "A list of types by which to filter the items")
public List getTypes() {
return types;
}
public void setTypes(List types) {
this.types = types;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PropertySearchV1 propertySearchV1 = (PropertySearchV1) o;
return Objects.equals(this.ancestorId, propertySearchV1.ancestorId) &&
Objects.equals(this.folderId, propertySearchV1.folderId) &&
Objects.equals(this.isInclude, propertySearchV1.isInclude) &&
Objects.equals(this.predicates, propertySearchV1.predicates) &&
Objects.equals(this.searchType, propertySearchV1.searchType) &&
Objects.equals(this.types, propertySearchV1.types);
}
@Override
public int hashCode() {
return Objects.hash(ancestorId, folderId, isInclude, predicates, searchType, types);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PropertySearchV1 {\n");
sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
sb.append(" folderId: ").append(toIndentedString(folderId)).append("\n");
sb.append(" isInclude: ").append(toIndentedString(isInclude)).append("\n");
sb.append(" predicates: ").append(toIndentedString(predicates)).append("\n");
sb.append(" searchType: ").append(toIndentedString(searchType)).append("\n");
sb.append(" types: ").append(toIndentedString(types)).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 ");
}
}