com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidWebDeletePersonResponse 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 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;
/**
* ZenidWebDeletePersonResponse
*/
@JsonPropertyOrder({
ZenidWebDeletePersonResponse.JSON_PROPERTY_DELETED_SAMPLE_I_DS,
ZenidWebDeletePersonResponse.JSON_PROPERTY_DELETED_FACES_FROM_SAMPLE_I_DS,
ZenidWebDeletePersonResponse.JSON_PROPERTY_DELETED_FACES_WITHOUT_CORRESPONDING_SAMPLE_COUNT,
ZenidWebDeletePersonResponse.JSON_PROPERTY_ERROR_CODE,
ZenidWebDeletePersonResponse.JSON_PROPERTY_ERROR_TEXT,
ZenidWebDeletePersonResponse.JSON_PROPERTY_PROCESSING_TIME_MS,
ZenidWebDeletePersonResponse.JSON_PROPERTY_MESSAGE_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ZenidWebDeletePersonResponse {
public static final String JSON_PROPERTY_DELETED_SAMPLE_I_DS = "DeletedSampleIDs";
private List deletedSampleIDs = new ArrayList<>();
public static final String JSON_PROPERTY_DELETED_FACES_FROM_SAMPLE_I_DS = "DeletedFacesFromSampleIDs";
private List deletedFacesFromSampleIDs = new ArrayList<>();
public static final String JSON_PROPERTY_DELETED_FACES_WITHOUT_CORRESPONDING_SAMPLE_COUNT = "DeletedFacesWithoutCorrespondingSampleCount";
private Integer deletedFacesWithoutCorrespondingSampleCount;
/**
* 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 ZenidWebDeletePersonResponse() {
}
@JsonCreator
public ZenidWebDeletePersonResponse(
@JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) String messageType
) {
this();
this.messageType = messageType;
}
public ZenidWebDeletePersonResponse deletedSampleIDs(List deletedSampleIDs) {
this.deletedSampleIDs = deletedSampleIDs;
return this;
}
public ZenidWebDeletePersonResponse addDeletedSampleIDsItem(String deletedSampleIDsItem) {
if (this.deletedSampleIDs == null) {
this.deletedSampleIDs = new ArrayList<>();
}
this.deletedSampleIDs.add(deletedSampleIDsItem);
return this;
}
/**
* Get deletedSampleIDs
* @return deletedSampleIDs
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DELETED_SAMPLE_I_DS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getDeletedSampleIDs() {
return deletedSampleIDs;
}
@JsonProperty(JSON_PROPERTY_DELETED_SAMPLE_I_DS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeletedSampleIDs(List deletedSampleIDs) {
this.deletedSampleIDs = deletedSampleIDs;
}
public ZenidWebDeletePersonResponse deletedFacesFromSampleIDs(List deletedFacesFromSampleIDs) {
this.deletedFacesFromSampleIDs = deletedFacesFromSampleIDs;
return this;
}
public ZenidWebDeletePersonResponse addDeletedFacesFromSampleIDsItem(String deletedFacesFromSampleIDsItem) {
if (this.deletedFacesFromSampleIDs == null) {
this.deletedFacesFromSampleIDs = new ArrayList<>();
}
this.deletedFacesFromSampleIDs.add(deletedFacesFromSampleIDsItem);
return this;
}
/**
* Get deletedFacesFromSampleIDs
* @return deletedFacesFromSampleIDs
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DELETED_FACES_FROM_SAMPLE_I_DS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getDeletedFacesFromSampleIDs() {
return deletedFacesFromSampleIDs;
}
@JsonProperty(JSON_PROPERTY_DELETED_FACES_FROM_SAMPLE_I_DS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeletedFacesFromSampleIDs(List deletedFacesFromSampleIDs) {
this.deletedFacesFromSampleIDs = deletedFacesFromSampleIDs;
}
public ZenidWebDeletePersonResponse deletedFacesWithoutCorrespondingSampleCount(Integer deletedFacesWithoutCorrespondingSampleCount) {
this.deletedFacesWithoutCorrespondingSampleCount = deletedFacesWithoutCorrespondingSampleCount;
return this;
}
/**
* Get deletedFacesWithoutCorrespondingSampleCount
* @return deletedFacesWithoutCorrespondingSampleCount
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DELETED_FACES_WITHOUT_CORRESPONDING_SAMPLE_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getDeletedFacesWithoutCorrespondingSampleCount() {
return deletedFacesWithoutCorrespondingSampleCount;
}
@JsonProperty(JSON_PROPERTY_DELETED_FACES_WITHOUT_CORRESPONDING_SAMPLE_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeletedFacesWithoutCorrespondingSampleCount(Integer deletedFacesWithoutCorrespondingSampleCount) {
this.deletedFacesWithoutCorrespondingSampleCount = deletedFacesWithoutCorrespondingSampleCount;
}
public ZenidWebDeletePersonResponse 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 ZenidWebDeletePersonResponse 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 ZenidWebDeletePersonResponse 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.DeletePersonResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ZenidWebDeletePersonResponse zenidWebDeletePersonResponse = (ZenidWebDeletePersonResponse) o;
return Objects.equals(this.deletedSampleIDs, zenidWebDeletePersonResponse.deletedSampleIDs) &&
Objects.equals(this.deletedFacesFromSampleIDs, zenidWebDeletePersonResponse.deletedFacesFromSampleIDs) &&
Objects.equals(this.deletedFacesWithoutCorrespondingSampleCount, zenidWebDeletePersonResponse.deletedFacesWithoutCorrespondingSampleCount) &&
Objects.equals(this.errorCode, zenidWebDeletePersonResponse.errorCode) &&
Objects.equals(this.errorText, zenidWebDeletePersonResponse.errorText) &&
Objects.equals(this.processingTimeMs, zenidWebDeletePersonResponse.processingTimeMs) &&
Objects.equals(this.messageType, zenidWebDeletePersonResponse.messageType);
}
@Override
public int hashCode() {
return Objects.hash(deletedSampleIDs, deletedFacesFromSampleIDs, deletedFacesWithoutCorrespondingSampleCount, errorCode, errorText, processingTimeMs, messageType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ZenidWebDeletePersonResponse {\n");
sb.append(" deletedSampleIDs: ").append(toIndentedString(deletedSampleIDs)).append("\n");
sb.append(" deletedFacesFromSampleIDs: ").append(toIndentedString(deletedFacesFromSampleIDs)).append("\n");
sb.append(" deletedFacesWithoutCorrespondingSampleCount: ").append(toIndentedString(deletedFacesWithoutCorrespondingSampleCount)).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 `DeletedSampleIDs` to the URL query string
if (getDeletedSampleIDs() != null) {
for (int i = 0; i < getDeletedSampleIDs().size(); i++) {
joiner.add(String.format("%sDeletedSampleIDs%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(ApiClient.valueToString(getDeletedSampleIDs().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `DeletedFacesFromSampleIDs` to the URL query string
if (getDeletedFacesFromSampleIDs() != null) {
for (int i = 0; i < getDeletedFacesFromSampleIDs().size(); i++) {
joiner.add(String.format("%sDeletedFacesFromSampleIDs%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(ApiClient.valueToString(getDeletedFacesFromSampleIDs().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `DeletedFacesWithoutCorrespondingSampleCount` to the URL query string
if (getDeletedFacesWithoutCorrespondingSampleCount() != null) {
joiner.add(String.format("%sDeletedFacesWithoutCorrespondingSampleCount%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDeletedFacesWithoutCorrespondingSampleCount()), 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();
}
}