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

com.adyen.model.checkout.SubInputDetail Maven / Gradle / Ivy

/*
 * Adyen Checkout API
 *
 * The version of the OpenAPI document: 71
 * 
 *
 * 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.checkout;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.checkout.Item;
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.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * SubInputDetail
 */
@JsonPropertyOrder({
  SubInputDetail.JSON_PROPERTY_CONFIGURATION,
  SubInputDetail.JSON_PROPERTY_ITEMS,
  SubInputDetail.JSON_PROPERTY_KEY,
  SubInputDetail.JSON_PROPERTY_OPTIONAL,
  SubInputDetail.JSON_PROPERTY_TYPE,
  SubInputDetail.JSON_PROPERTY_VALUE
})

public class SubInputDetail {
  public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
  private Map configuration = null;

  public static final String JSON_PROPERTY_ITEMS = "items";
  private List items = null;

  public static final String JSON_PROPERTY_KEY = "key";
  private String key;

  public static final String JSON_PROPERTY_OPTIONAL = "optional";
  private Boolean optional;

  public static final String JSON_PROPERTY_TYPE = "type";
  private String type;

  public static final String JSON_PROPERTY_VALUE = "value";
  private String value;

  public SubInputDetail() { 
  }

  public SubInputDetail configuration(Map configuration) {
    this.configuration = configuration;
    return this;
  }

  public SubInputDetail putConfigurationItem(String key, String configurationItem) {
    if (this.configuration == null) {
      this.configuration = new HashMap<>();
    }
    this.configuration.put(key, configurationItem);
    return this;
  }

   /**
   * Configuration parameters for the required input.
   * @return configuration
  **/
  @ApiModelProperty(value = "Configuration parameters for the required input.")
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Map getConfiguration() {
    return configuration;
  }


 /**
  * Configuration parameters for the required input.
  *
  * @param configuration
  */ 
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setConfiguration(Map configuration) {
    this.configuration = configuration;
  }


  public SubInputDetail items(List items) {
    this.items = items;
    return this;
  }

  public SubInputDetail addItemsItem(Item itemsItem) {
    if (this.items == null) {
      this.items = new ArrayList<>();
    }
    this.items.add(itemsItem);
    return this;
  }

   /**
   * In case of a select, the items to choose from.
   * @return items
  **/
  @ApiModelProperty(value = "In case of a select, the items to choose from.")
  @JsonProperty(JSON_PROPERTY_ITEMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getItems() {
    return items;
  }


 /**
  * In case of a select, the items to choose from.
  *
  * @param items
  */ 
  @JsonProperty(JSON_PROPERTY_ITEMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setItems(List items) {
    this.items = items;
  }


  public SubInputDetail key(String key) {
    this.key = key;
    return this;
  }

   /**
   * The value to provide in the result.
   * @return key
  **/
  @ApiModelProperty(value = "The value to provide in the result.")
  @JsonProperty(JSON_PROPERTY_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getKey() {
    return key;
  }


 /**
  * The value to provide in the result.
  *
  * @param key
  */ 
  @JsonProperty(JSON_PROPERTY_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setKey(String key) {
    this.key = key;
  }


  public SubInputDetail optional(Boolean optional) {
    this.optional = optional;
    return this;
  }

   /**
   * True if this input is optional to provide.
   * @return optional
  **/
  @ApiModelProperty(value = "True if this input is optional to provide.")
  @JsonProperty(JSON_PROPERTY_OPTIONAL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getOptional() {
    return optional;
  }


 /**
  * True if this input is optional to provide.
  *
  * @param optional
  */ 
  @JsonProperty(JSON_PROPERTY_OPTIONAL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOptional(Boolean optional) {
    this.optional = optional;
  }


  public SubInputDetail type(String type) {
    this.type = type;
    return this;
  }

   /**
   * The type of the required input.
   * @return type
  **/
  @ApiModelProperty(value = "The type of the required input.")
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getType() {
    return type;
  }


 /**
  * The type of the required input.
  *
  * @param type
  */ 
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(String type) {
    this.type = type;
  }


  public SubInputDetail value(String value) {
    this.value = value;
    return this;
  }

   /**
   * The value can be pre-filled, if available.
   * @return value
  **/
  @ApiModelProperty(value = "The value can be pre-filled, if available.")
  @JsonProperty(JSON_PROPERTY_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getValue() {
    return value;
  }


 /**
  * The value can be pre-filled, if available.
  *
  * @param value
  */ 
  @JsonProperty(JSON_PROPERTY_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setValue(String value) {
    this.value = value;
  }


  /**
   * Return true if this SubInputDetail object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubInputDetail subInputDetail = (SubInputDetail) o;
    return Objects.equals(this.configuration, subInputDetail.configuration) &&
        Objects.equals(this.items, subInputDetail.items) &&
        Objects.equals(this.key, subInputDetail.key) &&
        Objects.equals(this.optional, subInputDetail.optional) &&
        Objects.equals(this.type, subInputDetail.type) &&
        Objects.equals(this.value, subInputDetail.value);
  }

  @Override
  public int hashCode() {
    return Objects.hash(configuration, items, key, optional, type, value);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubInputDetail {\n");
    sb.append("    configuration: ").append(toIndentedString(configuration)).append("\n");
    sb.append("    items: ").append(toIndentedString(items)).append("\n");
    sb.append("    key: ").append(toIndentedString(key)).append("\n");
    sb.append("    optional: ").append(toIndentedString(optional)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).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 SubInputDetail given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of SubInputDetail
   * @throws JsonProcessingException if the JSON string is invalid with respect to SubInputDetail
   */
  public static SubInputDetail fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, SubInputDetail.class);
  }
/**
  * Convert an instance of SubInputDetail to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy