com.salesforce.einsteinbot.sdk.model.ResponseOptionsVariables Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of einstein-bot-sdk-java Show documentation
Show all versions of einstein-bot-sdk-java Show documentation
Java SDK to interact with Einstein Bots Runtime.
This SDK is a wrapper around the Einstein Bots Runtime API that provides a few added features out of the box like Auth support, Session management
/*
* Einstein Bots API (BETA)
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v4
*
*
* 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.salesforce.einsteinbot.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Configure what variables are returned in the response
*/
@ApiModel(description = "Configure what variables are returned in the response")
@JsonPropertyOrder({
ResponseOptionsVariables.JSON_PROPERTY_INCLUDE,
ResponseOptionsVariables.JSON_PROPERTY_FILTER,
ResponseOptionsVariables.JSON_PROPERTY_ONLY_CHANGED
})
@JsonTypeName("ResponseOptionsVariables")
@javax.annotation.Generated(value = "com.salesforce.einsteinbot.openapi.codegen.EinsteinBotCodeGenerator", date = "2022-03-24T00:55:11.933462Z[Etc/UTC]")
public class ResponseOptionsVariables {
public static final String JSON_PROPERTY_INCLUDE = "include";
private Boolean include;
public static final String JSON_PROPERTY_FILTER = "filter";
private JsonNullable> filter = JsonNullable.>undefined();
public static final String JSON_PROPERTY_ONLY_CHANGED = "onlyChanged";
private Boolean onlyChanged;
public ResponseOptionsVariables() {
}
public ResponseOptionsVariables include(Boolean include) {
this.include = include;
return this;
}
/**
* Whether or not to include variables in the response
* @return include
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "true", required = true, value = "Whether or not to include variables in the response")
@JsonProperty(JSON_PROPERTY_INCLUDE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getInclude() {
return include;
}
@JsonProperty(JSON_PROPERTY_INCLUDE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setInclude(Boolean include) {
this.include = include;
}
public ResponseOptionsVariables filter(List filter) {
this.filter = JsonNullable.>of(filter);
return this;
}
public ResponseOptionsVariables addFilterItem(String filterItem) {
if (this.filter == null || !this.filter.isPresent()) {
this.filter = JsonNullable.>of(new ArrayList<>());
}
try {
this.filter.get().add(filterItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Limit returned variables to those specified here. If missing, null, or empty no filtering will be applied.
* @return filter
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"OrderQty\",\"OrderType\"]", value = "Limit returned variables to those specified here. If missing, null, or empty no filtering will be applied.")
@JsonIgnore
public List getFilter() {
return filter.orElse(null);
}
@JsonProperty(JSON_PROPERTY_FILTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getFilter_JsonNullable() {
return filter;
}
@JsonProperty(JSON_PROPERTY_FILTER)
public void setFilter_JsonNullable(JsonNullable> filter) {
this.filter = filter;
}
public void setFilter(List filter) {
this.filter = JsonNullable.>of(filter);
}
public ResponseOptionsVariables onlyChanged(Boolean onlyChanged) {
this.onlyChanged = onlyChanged;
return this;
}
/**
* Whether or not to limit the returned variables to only those that have changed as part of the request.
* @return onlyChanged
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "true", required = true, value = "Whether or not to limit the returned variables to only those that have changed as part of the request.")
@JsonProperty(JSON_PROPERTY_ONLY_CHANGED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getOnlyChanged() {
return onlyChanged;
}
@JsonProperty(JSON_PROPERTY_ONLY_CHANGED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setOnlyChanged(Boolean onlyChanged) {
this.onlyChanged = onlyChanged;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResponseOptionsVariables responseOptionsVariables = (ResponseOptionsVariables) o;
return Objects.equals(this.include, responseOptionsVariables.include) &&
equalsNullable(this.filter, responseOptionsVariables.filter) &&
Objects.equals(this.onlyChanged, responseOptionsVariables.onlyChanged);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(include, hashCodeNullable(filter), onlyChanged);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResponseOptionsVariables {\n");
sb.append(" include: ").append(toIndentedString(include)).append("\n");
sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
sb.append(" onlyChanged: ").append(toIndentedString(onlyChanged)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy