com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidSharedMinedPhoto 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.ZenidSharedEyesInfo;
import com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidSharedLazyMatImage;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.wultra.app.onboardingserver.provider.zenid.model.ApiClient;
/**
* MinedPhoto - shows image data, and also two face-related values - estimated age and sex.
*/
@JsonPropertyOrder({
ZenidSharedMinedPhoto.JSON_PROPERTY_IMAGE_DATA,
ZenidSharedMinedPhoto.JSON_PROPERTY_EYES_INFO,
ZenidSharedMinedPhoto.JSON_PROPERTY_HAS_OCCLUDED_MOUTH,
ZenidSharedMinedPhoto.JSON_PROPERTY_HAS_SUN_GLASSES,
ZenidSharedMinedPhoto.JSON_PROPERTY_HAS_HEAD_WEAR,
ZenidSharedMinedPhoto.JSON_PROPERTY_FROM_NFC,
ZenidSharedMinedPhoto.JSON_PROPERTY_TEXT,
ZenidSharedMinedPhoto.JSON_PROPERTY_CONFIDENCE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ZenidSharedMinedPhoto {
public static final String JSON_PROPERTY_IMAGE_DATA = "ImageData";
private ZenidSharedLazyMatImage imageData;
public static final String JSON_PROPERTY_EYES_INFO = "EyesInfo";
private ZenidSharedEyesInfo eyesInfo;
public static final String JSON_PROPERTY_HAS_OCCLUDED_MOUTH = "HasOccludedMouth";
private Boolean hasOccludedMouth;
public static final String JSON_PROPERTY_HAS_SUN_GLASSES = "HasSunGlasses";
private Boolean hasSunGlasses;
public static final String JSON_PROPERTY_HAS_HEAD_WEAR = "HasHeadWear";
private Boolean hasHeadWear;
public static final String JSON_PROPERTY_FROM_NFC = "FromNfc";
private Boolean fromNfc;
public static final String JSON_PROPERTY_TEXT = "Text";
private String text;
public static final String JSON_PROPERTY_CONFIDENCE = "Confidence";
private Integer confidence;
public ZenidSharedMinedPhoto() {
}
public ZenidSharedMinedPhoto imageData(ZenidSharedLazyMatImage imageData) {
this.imageData = imageData;
return this;
}
/**
* Get imageData
* @return imageData
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMAGE_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ZenidSharedLazyMatImage getImageData() {
return imageData;
}
@JsonProperty(JSON_PROPERTY_IMAGE_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setImageData(ZenidSharedLazyMatImage imageData) {
this.imageData = imageData;
}
public ZenidSharedMinedPhoto eyesInfo(ZenidSharedEyesInfo eyesInfo) {
this.eyesInfo = eyesInfo;
return this;
}
/**
* Get eyesInfo
* @return eyesInfo
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EYES_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ZenidSharedEyesInfo getEyesInfo() {
return eyesInfo;
}
@JsonProperty(JSON_PROPERTY_EYES_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEyesInfo(ZenidSharedEyesInfo eyesInfo) {
this.eyesInfo = eyesInfo;
}
public ZenidSharedMinedPhoto hasOccludedMouth(Boolean hasOccludedMouth) {
this.hasOccludedMouth = hasOccludedMouth;
return this;
}
/**
* Get hasOccludedMouth
* @return hasOccludedMouth
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HAS_OCCLUDED_MOUTH)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getHasOccludedMouth() {
return hasOccludedMouth;
}
@JsonProperty(JSON_PROPERTY_HAS_OCCLUDED_MOUTH)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHasOccludedMouth(Boolean hasOccludedMouth) {
this.hasOccludedMouth = hasOccludedMouth;
}
public ZenidSharedMinedPhoto hasSunGlasses(Boolean hasSunGlasses) {
this.hasSunGlasses = hasSunGlasses;
return this;
}
/**
* Get hasSunGlasses
* @return hasSunGlasses
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HAS_SUN_GLASSES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getHasSunGlasses() {
return hasSunGlasses;
}
@JsonProperty(JSON_PROPERTY_HAS_SUN_GLASSES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHasSunGlasses(Boolean hasSunGlasses) {
this.hasSunGlasses = hasSunGlasses;
}
public ZenidSharedMinedPhoto hasHeadWear(Boolean hasHeadWear) {
this.hasHeadWear = hasHeadWear;
return this;
}
/**
* Get hasHeadWear
* @return hasHeadWear
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HAS_HEAD_WEAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getHasHeadWear() {
return hasHeadWear;
}
@JsonProperty(JSON_PROPERTY_HAS_HEAD_WEAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHasHeadWear(Boolean hasHeadWear) {
this.hasHeadWear = hasHeadWear;
}
public ZenidSharedMinedPhoto fromNfc(Boolean fromNfc) {
this.fromNfc = fromNfc;
return this;
}
/**
* Get fromNfc
* @return fromNfc
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FROM_NFC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getFromNfc() {
return fromNfc;
}
@JsonProperty(JSON_PROPERTY_FROM_NFC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFromNfc(Boolean fromNfc) {
this.fromNfc = fromNfc;
}
public ZenidSharedMinedPhoto text(String text) {
this.text = text;
return this;
}
/**
* Get text
* @return text
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getText() {
return text;
}
@JsonProperty(JSON_PROPERTY_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setText(String text) {
this.text = text;
}
public ZenidSharedMinedPhoto confidence(Integer confidence) {
this.confidence = confidence;
return this;
}
/**
* Get confidence
* @return confidence
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getConfidence() {
return confidence;
}
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfidence(Integer confidence) {
this.confidence = confidence;
}
/**
* Return true if this ZenidShared.MinedPhoto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ZenidSharedMinedPhoto zenidSharedMinedPhoto = (ZenidSharedMinedPhoto) o;
return Objects.equals(this.imageData, zenidSharedMinedPhoto.imageData) &&
Objects.equals(this.eyesInfo, zenidSharedMinedPhoto.eyesInfo) &&
Objects.equals(this.hasOccludedMouth, zenidSharedMinedPhoto.hasOccludedMouth) &&
Objects.equals(this.hasSunGlasses, zenidSharedMinedPhoto.hasSunGlasses) &&
Objects.equals(this.hasHeadWear, zenidSharedMinedPhoto.hasHeadWear) &&
Objects.equals(this.fromNfc, zenidSharedMinedPhoto.fromNfc) &&
Objects.equals(this.text, zenidSharedMinedPhoto.text) &&
Objects.equals(this.confidence, zenidSharedMinedPhoto.confidence);
}
@Override
public int hashCode() {
return Objects.hash(imageData, eyesInfo, hasOccludedMouth, hasSunGlasses, hasHeadWear, fromNfc, text, confidence);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ZenidSharedMinedPhoto {\n");
sb.append(" imageData: ").append(toIndentedString(imageData)).append("\n");
sb.append(" eyesInfo: ").append(toIndentedString(eyesInfo)).append("\n");
sb.append(" hasOccludedMouth: ").append(toIndentedString(hasOccludedMouth)).append("\n");
sb.append(" hasSunGlasses: ").append(toIndentedString(hasSunGlasses)).append("\n");
sb.append(" hasHeadWear: ").append(toIndentedString(hasHeadWear)).append("\n");
sb.append(" fromNfc: ").append(toIndentedString(fromNfc)).append("\n");
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append(" confidence: ").append(toIndentedString(confidence)).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 `ImageData` to the URL query string
if (getImageData() != null) {
joiner.add(getImageData().toUrlQueryString(prefix + "ImageData" + suffix));
}
// add `EyesInfo` to the URL query string
if (getEyesInfo() != null) {
joiner.add(getEyesInfo().toUrlQueryString(prefix + "EyesInfo" + suffix));
}
// add `HasOccludedMouth` to the URL query string
if (getHasOccludedMouth() != null) {
joiner.add(String.format("%sHasOccludedMouth%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getHasOccludedMouth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `HasSunGlasses` to the URL query string
if (getHasSunGlasses() != null) {
joiner.add(String.format("%sHasSunGlasses%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getHasSunGlasses()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `HasHeadWear` to the URL query string
if (getHasHeadWear() != null) {
joiner.add(String.format("%sHasHeadWear%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getHasHeadWear()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `FromNfc` to the URL query string
if (getFromNfc() != null) {
joiner.add(String.format("%sFromNfc%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getFromNfc()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `Text` to the URL query string
if (getText() != null) {
joiner.add(String.format("%sText%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `Confidence` to the URL query string
if (getConfidence() != null) {
joiner.add(String.format("%sConfidence%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getConfidence()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}