com.adyen.model.payment.DeviceRenderOptions Maven / Gradle / Ivy
/*
* 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 java.util.Objects;
import java.util.Arrays;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* 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("native"),
HTML("html"),
BOTH("both");
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;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SDK_INTERFACE = "sdkInterface";
private SdkInterfaceEnum sdkInterface;
/**
* Gets or Sets sdkUiType
*/
public enum SdkUiTypeEnum {
MULTISELECT("multiSelect"),
OTHERHTML("otherHtml"),
OUTOFBAND("outOfBand"),
SINGLESELECT("singleSelect"),
TEXT("text");
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;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SDK_UI_TYPE = "sdkUiType";
private List sdkUiType = null;
public DeviceRenderOptions() {
}
public DeviceRenderOptions sdkInterface(SdkInterfaceEnum sdkInterface) {
this.sdkInterface = sdkInterface;
return this;
}
/**
* Supported SDK interface types. Allowed values: * native * html * both
* @return sdkInterface
**/
@ApiModelProperty(value = "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
*/
@JsonProperty(JSON_PROPERTY_SDK_INTERFACE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSdkInterface(SdkInterfaceEnum sdkInterface) {
this.sdkInterface = sdkInterface;
}
public DeviceRenderOptions sdkUiType(List 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
**/
@ApiModelProperty(value = "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 getSdkUiType() {
return sdkUiType;
}
/**
* UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
*
* @param sdkUiType
*/
@JsonProperty(JSON_PROPERTY_SDK_UI_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSdkUiType(List 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);
}
}