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

com.wultra.app.onboardingserver.provider.zenid.model.api.ZenidWebInitSdkResponse 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.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.wultra.app.onboardingserver.provider.zenid.model.ApiClient;
/**
 * ZenidWebInitSdkResponse
 */
@JsonPropertyOrder({
  ZenidWebInitSdkResponse.JSON_PROPERTY_RESPONSE,
  ZenidWebInitSdkResponse.JSON_PROPERTY_ERROR_CODE,
  ZenidWebInitSdkResponse.JSON_PROPERTY_ERROR_TEXT,
  ZenidWebInitSdkResponse.JSON_PROPERTY_PROCESSING_TIME_MS,
  ZenidWebInitSdkResponse.JSON_PROPERTY_MESSAGE_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ZenidWebInitSdkResponse {
  public static final String JSON_PROPERTY_RESPONSE = "Response";
  private String response;

  /**
   * 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 ZenidWebInitSdkResponse() { 
  }

  @JsonCreator
  public ZenidWebInitSdkResponse(
    @JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) String messageType
  ) {
  this();
    this.messageType = messageType;
  }

  public ZenidWebInitSdkResponse response(String response) {
    this.response = response;
    return this;
  }

  /**
   * Get response
   * @return response
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RESPONSE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getResponse() {
    return response;
  }


  @JsonProperty(JSON_PROPERTY_RESPONSE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setResponse(String response) {
    this.response = response;
  }


  public ZenidWebInitSdkResponse 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 ZenidWebInitSdkResponse 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 ZenidWebInitSdkResponse 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.InitSdkResponse object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ZenidWebInitSdkResponse zenidWebInitSdkResponse = (ZenidWebInitSdkResponse) o;
    return Objects.equals(this.response, zenidWebInitSdkResponse.response) &&
        Objects.equals(this.errorCode, zenidWebInitSdkResponse.errorCode) &&
        Objects.equals(this.errorText, zenidWebInitSdkResponse.errorText) &&
        Objects.equals(this.processingTimeMs, zenidWebInitSdkResponse.processingTimeMs) &&
        Objects.equals(this.messageType, zenidWebInitSdkResponse.messageType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(response, errorCode, errorText, processingTimeMs, messageType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ZenidWebInitSdkResponse {\n");
    sb.append("    response: ").append(toIndentedString(response)).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 `Response` to the URL query string
    if (getResponse() != null) {
      joiner.add(String.format("%sResponse%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getResponse()), 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();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy