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

com.wultra.app.onboardingserver.provider.zenid.model.api.RecogLibRankDetail Maven / Gradle / Ivy

The newest version!
/*
 * ZenidWeb
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * 
 *
 * 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.wultra.app.onboardingserver.provider.zenid.model.api;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
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 com.wultra.app.onboardingserver.provider.zenid.model.api.RecogLibRankCondition;
import com.wultra.app.onboardingserver.provider.zenid.model.api.RecogLibSampleOverview;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.wultra.app.onboardingserver.provider.zenid.model.ApiClient;
/**
 * RecogLibRankDetail
 */
@JsonPropertyOrder({
  RecogLibRankDetail.JSON_PROPERTY_OVERALL,
  RecogLibRankDetail.JSON_PROPERTY_SAMPLES,
  RecogLibRankDetail.JSON_PROPERTY_CONDITIONS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class RecogLibRankDetail {
  /**
   * Gets or Sets overall
   */
  public enum OverallEnum {
    A("A"),
    
    B("B"),
    
    F("F");

    private String value;

    OverallEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static OverallEnum fromValue(String value) {
      for (OverallEnum b : OverallEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_OVERALL = "Overall";
  private OverallEnum overall;

  public static final String JSON_PROPERTY_SAMPLES = "Samples";
  private List samples = new ArrayList<>();

  public static final String JSON_PROPERTY_CONDITIONS = "Conditions";
  private List conditions = new ArrayList<>();

  public RecogLibRankDetail() { 
  }

  public RecogLibRankDetail overall(OverallEnum overall) {
    this.overall = overall;
    return this;
  }

  /**
   * Get overall
   * @return overall
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_OVERALL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public OverallEnum getOverall() {
    return overall;
  }


  @JsonProperty(JSON_PROPERTY_OVERALL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOverall(OverallEnum overall) {
    this.overall = overall;
  }


  public RecogLibRankDetail samples(List samples) {
    this.samples = samples;
    return this;
  }

  public RecogLibRankDetail addSamplesItem(RecogLibSampleOverview samplesItem) {
    if (this.samples == null) {
      this.samples = new ArrayList<>();
    }
    this.samples.add(samplesItem);
    return this;
  }

  /**
   * Get samples
   * @return samples
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SAMPLES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getSamples() {
    return samples;
  }


  @JsonProperty(JSON_PROPERTY_SAMPLES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSamples(List samples) {
    this.samples = samples;
  }


  public RecogLibRankDetail conditions(List conditions) {
    this.conditions = conditions;
    return this;
  }

  public RecogLibRankDetail addConditionsItem(RecogLibRankCondition conditionsItem) {
    if (this.conditions == null) {
      this.conditions = new ArrayList<>();
    }
    this.conditions.add(conditionsItem);
    return this;
  }

  /**
   * Get conditions
   * @return conditions
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CONDITIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getConditions() {
    return conditions;
  }


  @JsonProperty(JSON_PROPERTY_CONDITIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setConditions(List conditions) {
    this.conditions = conditions;
  }


  /**
   * Return true if this RecogLib.RankDetail object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RecogLibRankDetail recogLibRankDetail = (RecogLibRankDetail) o;
    return Objects.equals(this.overall, recogLibRankDetail.overall) &&
        Objects.equals(this.samples, recogLibRankDetail.samples) &&
        Objects.equals(this.conditions, recogLibRankDetail.conditions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(overall, samples, conditions);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RecogLibRankDetail {\n");
    sb.append("    overall: ").append(toIndentedString(overall)).append("\n");
    sb.append("    samples: ").append(toIndentedString(samples)).append("\n");
    sb.append("    conditions: ").append(toIndentedString(conditions)).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    ");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @return URL query string
   */
  public String toUrlQueryString() {
    return toUrlQueryString(null);
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    String suffix = "";
    String containerSuffix = "";
    String containerPrefix = "";
    if (prefix == null) {
      // style=form, explode=true, e.g. /pet?name=cat&type=manx
      prefix = "";
    } else {
      // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
      prefix = prefix + "[";
      suffix = "]";
      containerSuffix = "]";
      containerPrefix = "[";
    }

    StringJoiner joiner = new StringJoiner("&");

    // add `Overall` to the URL query string
    if (getOverall() != null) {
      joiner.add(String.format("%sOverall%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getOverall()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `Samples` to the URL query string
    if (getSamples() != null) {
      for (int i = 0; i < getSamples().size(); i++) {
        if (getSamples().get(i) != null) {
          joiner.add(getSamples().get(i).toUrlQueryString(String.format("%sSamples%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    // add `Conditions` to the URL query string
    if (getConditions() != null) {
      for (int i = 0; i < getConditions().size(); i++) {
        if (getConditions().get(i) != null) {
          joiner.add(getConditions().get(i).toUrlQueryString(String.format("%sConditions%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy