com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidWebUploadSampleResponse 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.SystemDrawingPointF;
import com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidSharedHash;
import com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidSharedMineAllResult;
import com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidWebClassesFieldOcrResult;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.wultra.app.onboardingserver.provider.zenid.model.ApiClient;
/**
* Response object for UploadSample
*/
@JsonPropertyOrder({
ZenidWebUploadSampleResponse.JSON_PROPERTY_SAMPLE_I_D,
ZenidWebUploadSampleResponse.JSON_PROPERTY_CUSTOM_DATA,
ZenidWebUploadSampleResponse.JSON_PROPERTY_UPLOAD_SESSION_I_D,
ZenidWebUploadSampleResponse.JSON_PROPERTY_SAMPLE_TYPE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_MINED_DATA,
ZenidWebUploadSampleResponse.JSON_PROPERTY_RAW_FIELDS_OCR,
ZenidWebUploadSampleResponse.JSON_PROPERTY_STATE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_PROJECTED_IMAGE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_PARENT_SAMPLE_I_D,
ZenidWebUploadSampleResponse.JSON_PROPERTY_ANONYMIZED_IMAGE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_IMAGE_URL_FORMAT,
ZenidWebUploadSampleResponse.JSON_PROPERTY_IMAGE_PAGE_COUNT,
ZenidWebUploadSampleResponse.JSON_PROPERTY_DOCUMENT_OUTLINE_IN_ORIGINAL_IMAGE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_SUBSAMPLES,
ZenidWebUploadSampleResponse.JSON_PROPERTY_UPLOAD_TIME,
ZenidWebUploadSampleResponse.JSON_PROPERTY_ERROR_CODE,
ZenidWebUploadSampleResponse.JSON_PROPERTY_ERROR_TEXT,
ZenidWebUploadSampleResponse.JSON_PROPERTY_PROCESSING_TIME_MS,
ZenidWebUploadSampleResponse.JSON_PROPERTY_MESSAGE_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ZenidWebUploadSampleResponse {
public static final String JSON_PROPERTY_SAMPLE_I_D = "SampleID";
private String sampleID;
public static final String JSON_PROPERTY_CUSTOM_DATA = "CustomData";
private String customData;
public static final String JSON_PROPERTY_UPLOAD_SESSION_I_D = "UploadSessionID";
private UUID uploadSessionID;
/**
* Real SampleType
*/
public enum SampleTypeEnum {
DOCUMENT_PICTURE("DocumentPicture"),
SELFIE("Selfie"),
SELFIE_VIDEO("SelfieVideo"),
DOCUMENT_VIDEO("DocumentVideo"),
ARCHIVED("Archived"),
UNKNOWN("Unknown");
private String value;
SampleTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SampleTypeEnum fromValue(String value) {
for (SampleTypeEnum b : SampleTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SAMPLE_TYPE = "SampleType";
private SampleTypeEnum sampleType;
public static final String JSON_PROPERTY_MINED_DATA = "MinedData";
private ZenidSharedMineAllResult minedData;
public static final String JSON_PROPERTY_RAW_FIELDS_OCR = "RawFieldsOcr";
private List rawFieldsOcr = new ArrayList<>();
/**
* State of the request - NotDone/Done/Error
*/
public enum StateEnum {
NOT_DONE("NotDone"),
DONE("Done"),
ERROR("Error"),
OPERATOR("Operator"),
REJECTED("Rejected"),
ARCHIVED("Archived");
private String value;
StateEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StateEnum fromValue(String value) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_STATE = "State";
private StateEnum state;
public static final String JSON_PROPERTY_PROJECTED_IMAGE = "ProjectedImage";
private ZenidSharedHash projectedImage;
public static final String JSON_PROPERTY_PARENT_SAMPLE_I_D = "ParentSampleID";
private String parentSampleID;
public static final String JSON_PROPERTY_ANONYMIZED_IMAGE = "AnonymizedImage";
private ZenidSharedHash anonymizedImage;
public static final String JSON_PROPERTY_IMAGE_URL_FORMAT = "ImageUrlFormat";
private String imageUrlFormat;
public static final String JSON_PROPERTY_IMAGE_PAGE_COUNT = "ImagePageCount";
private Integer imagePageCount;
public static final String JSON_PROPERTY_DOCUMENT_OUTLINE_IN_ORIGINAL_IMAGE = "DocumentOutlineInOriginalImage";
private List documentOutlineInOriginalImage = new ArrayList<>();
public static final String JSON_PROPERTY_SUBSAMPLES = "Subsamples";
private List subsamples = new ArrayList<>();
public static final String JSON_PROPERTY_UPLOAD_TIME = "UploadTime";
private OffsetDateTime uploadTime;
/**
* If throght processing some error occurs, ErrorCode property is set.
*/
public enum ErrorCodeEnum {
UNKNOWN_SAMPLE_ID("UnknownSampleID"),
UNKNOWN_UPLOAD_SESSION_ID("UnknownUploadSessionID"),
EMPTY_BODY("EmptyBody"),
INTERNAL_SERVER_ERROR("InternalServerError"),
INVALID_TIME_STAMP("InvalidTimeStamp"),
SAMPLE_IN_INVALID_STATE("SampleInInvalidState"),
INVALID_SAMPLE_COMBINATION("InvalidSampleCombination"),
ACCESS_DENIED("AccessDenied"),
UNKNOWN_PERSON("UnknownPerson"),
INVALID_INPUT_DATA("InvalidInputData"),
INIT_SDK_RECREATES_SESSION_ERROR("InitSDKRecreatesSessionError");
private String value;
ErrorCodeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ErrorCodeEnum fromValue(String value) {
for (ErrorCodeEnum b : ErrorCodeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ERROR_CODE = "ErrorCode";
private ErrorCodeEnum errorCode;
public static final String JSON_PROPERTY_ERROR_TEXT = "ErrorText";
private String errorText;
public static final String JSON_PROPERTY_PROCESSING_TIME_MS = "ProcessingTimeMs";
private Long processingTimeMs;
public static final String JSON_PROPERTY_MESSAGE_TYPE = "MessageType";
private String messageType;
public ZenidWebUploadSampleResponse() {
}
@JsonCreator
public ZenidWebUploadSampleResponse(
@JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) String messageType
) {
this();
this.messageType = messageType;
}
public ZenidWebUploadSampleResponse sampleID(String sampleID) {
this.sampleID = sampleID;
return this;
}
/**
* Unique ID of the sample in ZenID system.
* @return sampleID
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SAMPLE_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSampleID() {
return sampleID;
}
@JsonProperty(JSON_PROPERTY_SAMPLE_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSampleID(String sampleID) {
this.sampleID = sampleID;
}
public ZenidWebUploadSampleResponse customData(String customData) {
this.customData = customData;
return this;
}
/**
* Copy of the input parameter CustomData
* @return customData
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOM_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCustomData() {
return customData;
}
@JsonProperty(JSON_PROPERTY_CUSTOM_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCustomData(String customData) {
this.customData = customData;
}
public ZenidWebUploadSampleResponse uploadSessionID(UUID uploadSessionID) {
this.uploadSessionID = uploadSessionID;
return this;
}
/**
* Copy of the input parameter UploadSessionID
* @return uploadSessionID
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UPLOAD_SESSION_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUploadSessionID() {
return uploadSessionID;
}
@JsonProperty(JSON_PROPERTY_UPLOAD_SESSION_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUploadSessionID(UUID uploadSessionID) {
this.uploadSessionID = uploadSessionID;
}
public ZenidWebUploadSampleResponse sampleType(SampleTypeEnum sampleType) {
this.sampleType = sampleType;
return this;
}
/**
* Real SampleType
* @return sampleType
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SAMPLE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SampleTypeEnum getSampleType() {
return sampleType;
}
@JsonProperty(JSON_PROPERTY_SAMPLE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSampleType(SampleTypeEnum sampleType) {
this.sampleType = sampleType;
}
public ZenidWebUploadSampleResponse minedData(ZenidSharedMineAllResult minedData) {
this.minedData = minedData;
return this;
}
/**
* Get minedData
* @return minedData
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MINED_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ZenidSharedMineAllResult getMinedData() {
return minedData;
}
@JsonProperty(JSON_PROPERTY_MINED_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMinedData(ZenidSharedMineAllResult minedData) {
this.minedData = minedData;
}
public ZenidWebUploadSampleResponse rawFieldsOcr(List rawFieldsOcr) {
this.rawFieldsOcr = rawFieldsOcr;
return this;
}
public ZenidWebUploadSampleResponse addRawFieldsOcrItem(ZenidWebClassesFieldOcrResult rawFieldsOcrItem) {
if (this.rawFieldsOcr == null) {
this.rawFieldsOcr = new ArrayList<>();
}
this.rawFieldsOcr.add(rawFieldsOcrItem);
return this;
}
/**
* Raw OCR results of fields (not mined)
* @return rawFieldsOcr
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RAW_FIELDS_OCR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getRawFieldsOcr() {
return rawFieldsOcr;
}
@JsonProperty(JSON_PROPERTY_RAW_FIELDS_OCR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRawFieldsOcr(List rawFieldsOcr) {
this.rawFieldsOcr = rawFieldsOcr;
}
public ZenidWebUploadSampleResponse state(StateEnum state) {
this.state = state;
return this;
}
/**
* State of the request - NotDone/Done/Error
* @return state
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public StateEnum getState() {
return state;
}
@JsonProperty(JSON_PROPERTY_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setState(StateEnum state) {
this.state = state;
}
public ZenidWebUploadSampleResponse projectedImage(ZenidSharedHash projectedImage) {
this.projectedImage = projectedImage;
return this;
}
/**
* Get projectedImage
* @return projectedImage
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROJECTED_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ZenidSharedHash getProjectedImage() {
return projectedImage;
}
@JsonProperty(JSON_PROPERTY_PROJECTED_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProjectedImage(ZenidSharedHash projectedImage) {
this.projectedImage = projectedImage;
}
public ZenidWebUploadSampleResponse parentSampleID(String parentSampleID) {
this.parentSampleID = parentSampleID;
return this;
}
/**
* hash of the parent sampleID if this is a subsample
* @return parentSampleID
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PARENT_SAMPLE_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getParentSampleID() {
return parentSampleID;
}
@JsonProperty(JSON_PROPERTY_PARENT_SAMPLE_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setParentSampleID(String parentSampleID) {
this.parentSampleID = parentSampleID;
}
public ZenidWebUploadSampleResponse anonymizedImage(ZenidSharedHash anonymizedImage) {
this.anonymizedImage = anonymizedImage;
return this;
}
/**
* Get anonymizedImage
* @return anonymizedImage
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ANONYMIZED_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ZenidSharedHash getAnonymizedImage() {
return anonymizedImage;
}
@JsonProperty(JSON_PROPERTY_ANONYMIZED_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnonymizedImage(ZenidSharedHash anonymizedImage) {
this.anonymizedImage = anonymizedImage;
}
public ZenidWebUploadSampleResponse imageUrlFormat(String imageUrlFormat) {
this.imageUrlFormat = imageUrlFormat;
return this;
}
/**
* link to the source projected image
* @return imageUrlFormat
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMAGE_URL_FORMAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getImageUrlFormat() {
return imageUrlFormat;
}
@JsonProperty(JSON_PROPERTY_IMAGE_URL_FORMAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setImageUrlFormat(String imageUrlFormat) {
this.imageUrlFormat = imageUrlFormat;
}
public ZenidWebUploadSampleResponse imagePageCount(Integer imagePageCount) {
this.imagePageCount = imagePageCount;
return this;
}
/**
* Number of pages this document has (in case of PDF or TIFF). This can be used in history URL /history/image/{hash}?page=1
* @return imagePageCount
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMAGE_PAGE_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getImagePageCount() {
return imagePageCount;
}
@JsonProperty(JSON_PROPERTY_IMAGE_PAGE_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setImagePageCount(Integer imagePageCount) {
this.imagePageCount = imagePageCount;
}
public ZenidWebUploadSampleResponse documentOutlineInOriginalImage(List documentOutlineInOriginalImage) {
this.documentOutlineInOriginalImage = documentOutlineInOriginalImage;
return this;
}
public ZenidWebUploadSampleResponse addDocumentOutlineInOriginalImageItem(SystemDrawingPointF documentOutlineInOriginalImageItem) {
if (this.documentOutlineInOriginalImage == null) {
this.documentOutlineInOriginalImage = new ArrayList<>();
}
this.documentOutlineInOriginalImage.add(documentOutlineInOriginalImageItem);
return this;
}
/**
* Outline of the document in the original image in relative dimensions
* @return documentOutlineInOriginalImage
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DOCUMENT_OUTLINE_IN_ORIGINAL_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getDocumentOutlineInOriginalImage() {
return documentOutlineInOriginalImage;
}
@JsonProperty(JSON_PROPERTY_DOCUMENT_OUTLINE_IN_ORIGINAL_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDocumentOutlineInOriginalImage(List documentOutlineInOriginalImage) {
this.documentOutlineInOriginalImage = documentOutlineInOriginalImage;
}
public ZenidWebUploadSampleResponse subsamples(List subsamples) {
this.subsamples = subsamples;
return this;
}
public ZenidWebUploadSampleResponse addSubsamplesItem(ZenidWebUploadSampleResponse subsamplesItem) {
if (this.subsamples == null) {
this.subsamples = new ArrayList<>();
}
this.subsamples.add(subsamplesItem);
return this;
}
/**
* If subsample processing is enable, this list contains further images extracted from the primary image, each with extra document image
* @return subsamples
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUBSAMPLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getSubsamples() {
return subsamples;
}
@JsonProperty(JSON_PROPERTY_SUBSAMPLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSubsamples(List subsamples) {
this.subsamples = subsamples;
}
public ZenidWebUploadSampleResponse uploadTime(OffsetDateTime uploadTime) {
this.uploadTime = uploadTime;
return this;
}
/**
* Time of the sample upload (server time)
* @return uploadTime
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UPLOAD_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getUploadTime() {
return uploadTime;
}
@JsonProperty(JSON_PROPERTY_UPLOAD_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUploadTime(OffsetDateTime uploadTime) {
this.uploadTime = uploadTime;
}
public ZenidWebUploadSampleResponse errorCode(ErrorCodeEnum errorCode) {
this.errorCode = errorCode;
return this;
}
/**
* If throght processing some error occurs, ErrorCode property is set.
* @return errorCode
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ErrorCodeEnum getErrorCode() {
return errorCode;
}
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setErrorCode(ErrorCodeEnum errorCode) {
this.errorCode = errorCode;
}
public ZenidWebUploadSampleResponse errorText(String errorText) {
this.errorText = errorText;
return this;
}
/**
* Error text
* @return errorText
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ERROR_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getErrorText() {
return errorText;
}
@JsonProperty(JSON_PROPERTY_ERROR_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setErrorText(String errorText) {
this.errorText = errorText;
}
public ZenidWebUploadSampleResponse processingTimeMs(Long processingTimeMs) {
this.processingTimeMs = processingTimeMs;
return this;
}
/**
* Get processingTimeMs
* @return processingTimeMs
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROCESSING_TIME_MS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getProcessingTimeMs() {
return processingTimeMs;
}
@JsonProperty(JSON_PROPERTY_PROCESSING_TIME_MS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProcessingTimeMs(Long processingTimeMs) {
this.processingTimeMs = processingTimeMs;
}
/**
* Get messageType
* @return messageType
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MESSAGE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMessageType() {
return messageType;
}
/**
* Return true if this ZenidWeb.UploadSampleResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ZenidWebUploadSampleResponse zenidWebUploadSampleResponse = (ZenidWebUploadSampleResponse) o;
return Objects.equals(this.sampleID, zenidWebUploadSampleResponse.sampleID) &&
Objects.equals(this.customData, zenidWebUploadSampleResponse.customData) &&
Objects.equals(this.uploadSessionID, zenidWebUploadSampleResponse.uploadSessionID) &&
Objects.equals(this.sampleType, zenidWebUploadSampleResponse.sampleType) &&
Objects.equals(this.minedData, zenidWebUploadSampleResponse.minedData) &&
Objects.equals(this.rawFieldsOcr, zenidWebUploadSampleResponse.rawFieldsOcr) &&
Objects.equals(this.state, zenidWebUploadSampleResponse.state) &&
Objects.equals(this.projectedImage, zenidWebUploadSampleResponse.projectedImage) &&
Objects.equals(this.parentSampleID, zenidWebUploadSampleResponse.parentSampleID) &&
Objects.equals(this.anonymizedImage, zenidWebUploadSampleResponse.anonymizedImage) &&
Objects.equals(this.imageUrlFormat, zenidWebUploadSampleResponse.imageUrlFormat) &&
Objects.equals(this.imagePageCount, zenidWebUploadSampleResponse.imagePageCount) &&
Objects.equals(this.documentOutlineInOriginalImage, zenidWebUploadSampleResponse.documentOutlineInOriginalImage) &&
Objects.equals(this.subsamples, zenidWebUploadSampleResponse.subsamples) &&
Objects.equals(this.uploadTime, zenidWebUploadSampleResponse.uploadTime) &&
Objects.equals(this.errorCode, zenidWebUploadSampleResponse.errorCode) &&
Objects.equals(this.errorText, zenidWebUploadSampleResponse.errorText) &&
Objects.equals(this.processingTimeMs, zenidWebUploadSampleResponse.processingTimeMs) &&
Objects.equals(this.messageType, zenidWebUploadSampleResponse.messageType);
}
@Override
public int hashCode() {
return Objects.hash(sampleID, customData, uploadSessionID, sampleType, minedData, rawFieldsOcr, state, projectedImage, parentSampleID, anonymizedImage, imageUrlFormat, imagePageCount, documentOutlineInOriginalImage, subsamples, uploadTime, errorCode, errorText, processingTimeMs, messageType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ZenidWebUploadSampleResponse {\n");
sb.append(" sampleID: ").append(toIndentedString(sampleID)).append("\n");
sb.append(" customData: ").append(toIndentedString(customData)).append("\n");
sb.append(" uploadSessionID: ").append(toIndentedString(uploadSessionID)).append("\n");
sb.append(" sampleType: ").append(toIndentedString(sampleType)).append("\n");
sb.append(" minedData: ").append(toIndentedString(minedData)).append("\n");
sb.append(" rawFieldsOcr: ").append(toIndentedString(rawFieldsOcr)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" projectedImage: ").append(toIndentedString(projectedImage)).append("\n");
sb.append(" parentSampleID: ").append(toIndentedString(parentSampleID)).append("\n");
sb.append(" anonymizedImage: ").append(toIndentedString(anonymizedImage)).append("\n");
sb.append(" imageUrlFormat: ").append(toIndentedString(imageUrlFormat)).append("\n");
sb.append(" imagePageCount: ").append(toIndentedString(imagePageCount)).append("\n");
sb.append(" documentOutlineInOriginalImage: ").append(toIndentedString(documentOutlineInOriginalImage)).append("\n");
sb.append(" subsamples: ").append(toIndentedString(subsamples)).append("\n");
sb.append(" uploadTime: ").append(toIndentedString(uploadTime)).append("\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" errorText: ").append(toIndentedString(errorText)).append("\n");
sb.append(" processingTimeMs: ").append(toIndentedString(processingTimeMs)).append("\n");
sb.append(" messageType: ").append(toIndentedString(messageType)).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 `SampleID` to the URL query string
if (getSampleID() != null) {
joiner.add(String.format("%sSampleID%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getSampleID()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `CustomData` to the URL query string
if (getCustomData() != null) {
joiner.add(String.format("%sCustomData%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCustomData()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `UploadSessionID` to the URL query string
if (getUploadSessionID() != null) {
joiner.add(String.format("%sUploadSessionID%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getUploadSessionID()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `SampleType` to the URL query string
if (getSampleType() != null) {
joiner.add(String.format("%sSampleType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getSampleType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `MinedData` to the URL query string
if (getMinedData() != null) {
joiner.add(getMinedData().toUrlQueryString(prefix + "MinedData" + suffix));
}
// add `RawFieldsOcr` to the URL query string
if (getRawFieldsOcr() != null) {
for (int i = 0; i < getRawFieldsOcr().size(); i++) {
if (getRawFieldsOcr().get(i) != null) {
joiner.add(getRawFieldsOcr().get(i).toUrlQueryString(String.format("%sRawFieldsOcr%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `State` to the URL query string
if (getState() != null) {
joiner.add(String.format("%sState%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getState()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ProjectedImage` to the URL query string
if (getProjectedImage() != null) {
joiner.add(getProjectedImage().toUrlQueryString(prefix + "ProjectedImage" + suffix));
}
// add `ParentSampleID` to the URL query string
if (getParentSampleID() != null) {
joiner.add(String.format("%sParentSampleID%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getParentSampleID()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `AnonymizedImage` to the URL query string
if (getAnonymizedImage() != null) {
joiner.add(getAnonymizedImage().toUrlQueryString(prefix + "AnonymizedImage" + suffix));
}
// add `ImageUrlFormat` to the URL query string
if (getImageUrlFormat() != null) {
joiner.add(String.format("%sImageUrlFormat%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getImageUrlFormat()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ImagePageCount` to the URL query string
if (getImagePageCount() != null) {
joiner.add(String.format("%sImagePageCount%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getImagePageCount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `DocumentOutlineInOriginalImage` to the URL query string
if (getDocumentOutlineInOriginalImage() != null) {
for (int i = 0; i < getDocumentOutlineInOriginalImage().size(); i++) {
if (getDocumentOutlineInOriginalImage().get(i) != null) {
joiner.add(getDocumentOutlineInOriginalImage().get(i).toUrlQueryString(String.format("%sDocumentOutlineInOriginalImage%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `Subsamples` to the URL query string
if (getSubsamples() != null) {
for (int i = 0; i < getSubsamples().size(); i++) {
if (getSubsamples().get(i) != null) {
joiner.add(getSubsamples().get(i).toUrlQueryString(String.format("%sSubsamples%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `UploadTime` to the URL query string
if (getUploadTime() != null) {
joiner.add(String.format("%sUploadTime%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getUploadTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ErrorCode` to the URL query string
if (getErrorCode() != null) {
joiner.add(String.format("%sErrorCode%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getErrorCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ErrorText` to the URL query string
if (getErrorText() != null) {
joiner.add(String.format("%sErrorText%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getErrorText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ProcessingTimeMs` to the URL query string
if (getProcessingTimeMs() != null) {
joiner.add(String.format("%sProcessingTimeMs%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getProcessingTimeMs()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `MessageType` to the URL query string
if (getMessageType() != null) {
joiner.add(String.format("%sMessageType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getMessageType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}