All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.salesforce.einsteinbot.sdk.model.ChoicesResponseMessageChoices Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.3.0
Show newest version
/*
 * 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 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;

/**
 * Choice
 */
@ApiModel(description = "Choice")
@JsonPropertyOrder({
  ChoicesResponseMessageChoices.JSON_PROPERTY_LABEL,
  ChoicesResponseMessageChoices.JSON_PROPERTY_ALIAS,
  ChoicesResponseMessageChoices.JSON_PROPERTY_ID
})
@JsonTypeName("ChoicesResponseMessage_choices")
@javax.annotation.Generated(value = "com.salesforce.einsteinbot.openapi.codegen.EinsteinBotCodeGenerator", date = "2022-03-24T00:55:11.933462Z[Etc/UTC]")
public class ChoicesResponseMessageChoices   {
  public static final String JSON_PROPERTY_LABEL = "label";
  private String label;

  public static final String JSON_PROPERTY_ALIAS = "alias";
  private JsonNullable alias = JsonNullable.undefined();

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public ChoicesResponseMessageChoices() { 
  }

  public ChoicesResponseMessageChoices label(String label) {
    
    this.label = label;
    return this;
  }

   /**
   * Choice label
   * @return label
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "Order Status", required = true, value = "Choice label")
  @JsonProperty(JSON_PROPERTY_LABEL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getLabel() {
    return label;
  }


  @JsonProperty(JSON_PROPERTY_LABEL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLabel(String label) {
    this.label = label;
  }


  public ChoicesResponseMessageChoices alias(String alias) {
    this.alias = JsonNullable.of(alias);
    
    return this;
  }

   /**
   * Choice alias
   * @return alias
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", value = "Choice alias")
  @JsonIgnore

  public String getAlias() {
        return alias.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_ALIAS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getAlias_JsonNullable() {
    return alias;
  }
  
  @JsonProperty(JSON_PROPERTY_ALIAS)
  public void setAlias_JsonNullable(JsonNullable alias) {
    this.alias = alias;
  }

  public void setAlias(String alias) {
    this.alias = JsonNullable.of(alias);
  }


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

   /**
   * Choice id
   * @return id
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "8a9a745f-0c09-4b13-955c-1ab9e06c7ad7", required = true, value = "Choice id")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ChoicesResponseMessageChoices choicesResponseMessageChoices = (ChoicesResponseMessageChoices) o;
    return Objects.equals(this.label, choicesResponseMessageChoices.label) &&
        equalsNullable(this.alias, choicesResponseMessageChoices.alias) &&
        Objects.equals(this.id, choicesResponseMessageChoices.id);
  }

  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(label, hashCodeNullable(alias), id);
  }

  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 ChoicesResponseMessageChoices {\n");
    sb.append("    label: ").append(toIndentedString(label)).append("\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).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