content: /*
   * Adyen Payment API
   *
   * The version of the OpenAPI document: 68
   *
   *
   * 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.adyen.model.payment;
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.List;
  import java.util.logging.Logger;
  
  /** DeviceRenderOptions */
  @JsonPropertyOrder({
    DeviceRenderOptions.JSON_PROPERTY_SDK_INTERFACE,
    DeviceRenderOptions.JSON_PROPERTY_SDK_UI_TYPE
  })
  public class DeviceRenderOptions {
    /** Supported SDK interface types. Allowed values: * native * html * both */
    public enum SdkInterfaceEnum {
      NATIVE(String.valueOf("native")),
  
      HTML(String.valueOf("html")),
  
      BOTH(String.valueOf("both"));
  
      private static final Logger LOG = Logger.getLogger(SdkInterfaceEnum.class.getName());
  
      private String value;
  
      SdkInterfaceEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static SdkInterfaceEnum fromValue(String value) {
        for (SdkInterfaceEnum b : SdkInterfaceEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "SdkInterfaceEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(SdkInterfaceEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_SDK_INTERFACE = "sdkInterface";
    private SdkInterfaceEnum sdkInterface;
  
    /** Gets or Sets sdkUiType */
    public enum SdkUiTypeEnum {
      MULTISELECT(String.valueOf("multiSelect")),
  
      OTHERHTML(String.valueOf("otherHtml")),
  
      OUTOFBAND(String.valueOf("outOfBand")),
  
      SINGLESELECT(String.valueOf("singleSelect")),
  
      TEXT(String.valueOf("text"));
  
      private static final Logger LOG = Logger.getLogger(SdkUiTypeEnum.class.getName());
  
      private String value;
  
      SdkUiTypeEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static SdkUiTypeEnum fromValue(String value) {
        for (SdkUiTypeEnum b : SdkUiTypeEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "SdkUiTypeEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(SdkUiTypeEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_SDK_UI_TYPE = "sdkUiType";
    private List<SdkUiTypeEnum> sdkUiType;
  
    public DeviceRenderOptions() {}
  
    /**
     * Supported SDK interface types. Allowed values: * native * html * both
     *
     * @param sdkInterface Supported SDK interface types. Allowed values: * native * html * both
     * @return the current {@code DeviceRenderOptions} instance, allowing for method chaining
     */
    public DeviceRenderOptions sdkInterface(SdkInterfaceEnum sdkInterface) {
      this.sdkInterface = sdkInterface;
      return this;
    }
  
    /**
     * Supported SDK interface types. Allowed values: * native * html * both
     *
     * @return sdkInterface Supported SDK interface types. Allowed values: * native * html * both
     */
    @JsonProperty(JSON_PROPERTY_SDK_INTERFACE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public SdkInterfaceEnum getSdkInterface() {
      return sdkInterface;
    }
  
    /**
     * Supported SDK interface types. Allowed values: * native * html * both
     *
     * @param sdkInterface Supported SDK interface types. Allowed values: * native * html * both
     */
    @JsonProperty(JSON_PROPERTY_SDK_INTERFACE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSdkInterface(SdkInterfaceEnum sdkInterface) {
      this.sdkInterface = sdkInterface;
    }
  
    /**
     * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect *
     * outOfBand * otherHtml * multiSelect
     *
     * @param sdkUiType UI types supported for displaying specific challenges. Allowed values: * text
     *     * singleSelect * outOfBand * otherHtml * multiSelect
     * @return the current {@code DeviceRenderOptions} instance, allowing for method chaining
     */
    public DeviceRenderOptions sdkUiType(List<SdkUiTypeEnum> sdkUiType) {
      this.sdkUiType = sdkUiType;
      return this;
    }
  
    public DeviceRenderOptions addSdkUiTypeItem(SdkUiTypeEnum sdkUiTypeItem) {
      if (this.sdkUiType == null) {
        this.sdkUiType = new ArrayList<>();
      }
      this.sdkUiType.add(sdkUiTypeItem);
      return this;
    }
  
    /**
     * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect *
     * outOfBand * otherHtml * multiSelect
     *
     * @return sdkUiType UI types supported for displaying specific challenges. Allowed values: * text
     *     * singleSelect * outOfBand * otherHtml * multiSelect
     */
    @JsonProperty(JSON_PROPERTY_SDK_UI_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<SdkUiTypeEnum> getSdkUiType() {
      return sdkUiType;
    }
  
    /**
     * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect *
     * outOfBand * otherHtml * multiSelect
     *
     * @param sdkUiType UI types supported for displaying specific challenges. Allowed values: * text
     *     * singleSelect * outOfBand * otherHtml * multiSelect
     */
    @JsonProperty(JSON_PROPERTY_SDK_UI_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSdkUiType(List<SdkUiTypeEnum> sdkUiType) {
      this.sdkUiType = sdkUiType;
    }
  
    /** Return true if this DeviceRenderOptions object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      DeviceRenderOptions deviceRenderOptions = (DeviceRenderOptions) o;
      return Objects.equals(this.sdkInterface, deviceRenderOptions.sdkInterface)
          && Objects.equals(this.sdkUiType, deviceRenderOptions.sdkUiType);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(sdkInterface, sdkUiType);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class DeviceRenderOptions {\n");
      sb.append("    sdkInterface: ").append(toIndentedString(sdkInterface)).append("\n");
      sb.append("    sdkUiType: ").append(toIndentedString(sdkUiType)).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    ");
    }
  
    /**
     * Create an instance of DeviceRenderOptions given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of DeviceRenderOptions
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     DeviceRenderOptions
     */
    public static DeviceRenderOptions fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, DeviceRenderOptions.class);
    }
  
    /**
     * Convert an instance of DeviceRenderOptions to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  