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

com.adyen.model.legalentitymanagement.CapabilityProblemEntity Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Legal Entity Management API
 *
 * The version of the OpenAPI document: 3
 * 
 *
 * 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.legalentitymanagement;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.legalentitymanagement.CapabilityProblemEntityRecursive;
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.fasterxml.jackson.core.JsonProcessingException;


/**
 * CapabilityProblemEntity
 */
@JsonPropertyOrder({
  CapabilityProblemEntity.JSON_PROPERTY_DOCUMENTS,
  CapabilityProblemEntity.JSON_PROPERTY_ID,
  CapabilityProblemEntity.JSON_PROPERTY_OWNER,
  CapabilityProblemEntity.JSON_PROPERTY_TYPE
})

public class CapabilityProblemEntity {
  public static final String JSON_PROPERTY_DOCUMENTS = "documents";
  private List documents;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_OWNER = "owner";
  private CapabilityProblemEntityRecursive owner;

  /**
   * Gets or Sets type
   */
  public enum TypeEnum {
    BANKACCOUNT(String.valueOf("BankAccount")),
    
    DOCUMENT(String.valueOf("Document")),
    
    LEGALENTITY(String.valueOf("LegalEntity")),
    
    PRODUCT(String.valueOf("product"));

    private String value;

    TypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static TypeEnum fromValue(String value) {
      for (TypeEnum b : TypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

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

  public CapabilityProblemEntity() { 
  }

  /**
   * List of document IDs corresponding to the verification errors from capabilities.
   *
   * @param documents List of document IDs corresponding to the verification errors from capabilities.
   * @return the current {@code CapabilityProblemEntity} instance, allowing for method chaining
   */
  public CapabilityProblemEntity documents(List documents) {
    this.documents = documents;
    return this;
  }

  public CapabilityProblemEntity addDocumentsItem(String documentsItem) {
    if (this.documents == null) {
      this.documents = new ArrayList<>();
    }
    this.documents.add(documentsItem);
    return this;
  }

  /**
   * List of document IDs corresponding to the verification errors from capabilities.
   * @return documents List of document IDs corresponding to the verification errors from capabilities.
   */
  @JsonProperty(JSON_PROPERTY_DOCUMENTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getDocuments() {
    return documents;
  }

  /**
   * List of document IDs corresponding to the verification errors from capabilities.
   *
   * @param documents List of document IDs corresponding to the verification errors from capabilities.
   */
  @JsonProperty(JSON_PROPERTY_DOCUMENTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDocuments(List documents) {
    this.documents = documents;
  }

  /**
   * id
   *
   * @param id 
   * @return the current {@code CapabilityProblemEntity} instance, allowing for method chaining
   */
  public CapabilityProblemEntity id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Get id
   * @return id 
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }

  /**
   * id
   *
   * @param id 
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(String id) {
    this.id = id;
  }

  /**
   * owner
   *
   * @param owner 
   * @return the current {@code CapabilityProblemEntity} instance, allowing for method chaining
   */
  public CapabilityProblemEntity owner(CapabilityProblemEntityRecursive owner) {
    this.owner = owner;
    return this;
  }

  /**
   * Get owner
   * @return owner 
   */
  @JsonProperty(JSON_PROPERTY_OWNER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public CapabilityProblemEntityRecursive getOwner() {
    return owner;
  }

  /**
   * owner
   *
   * @param owner 
   */
  @JsonProperty(JSON_PROPERTY_OWNER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOwner(CapabilityProblemEntityRecursive owner) {
    this.owner = owner;
  }

  /**
   * type
   *
   * @param type 
   * @return the current {@code CapabilityProblemEntity} instance, allowing for method chaining
   */
  public CapabilityProblemEntity type(TypeEnum type) {
    this.type = type;
    return this;
  }

  /**
   * Get type
   * @return type 
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TypeEnum getType() {
    return type;
  }

  /**
   * type
   *
   * @param type 
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(TypeEnum type) {
    this.type = type;
  }

  /**
   * Return true if this CapabilityProblemEntity object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CapabilityProblemEntity capabilityProblemEntity = (CapabilityProblemEntity) o;
    return Objects.equals(this.documents, capabilityProblemEntity.documents) &&
        Objects.equals(this.id, capabilityProblemEntity.id) &&
        Objects.equals(this.owner, capabilityProblemEntity.owner) &&
        Objects.equals(this.type, capabilityProblemEntity.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(documents, id, owner, type);
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy