content: /*
   * Open Banking API
   *
   * The version of the OpenAPI document: 1
   *
   *
   * 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.openbanking;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  
  /** Identity */
  @JsonPropertyOrder({Identity.JSON_PROPERTY_FULL_LEGAL_NAME, Identity.JSON_PROPERTY_NAME})
  public class Identity {
    public static final String JSON_PROPERTY_FULL_LEGAL_NAME = "fullLegalName";
    private String fullLegalName;
  
    public static final String JSON_PROPERTY_NAME = "name";
    private String name;
  
    public Identity() {}
  
    /**
     * The complete legal name of the individual or entity.
     *
     * @param fullLegalName The complete legal name of the individual or entity.
     * @return the current {@code Identity} instance, allowing for method chaining
     */
    public Identity fullLegalName(String fullLegalName) {
      this.fullLegalName = fullLegalName;
      return this;
    }
  
    /**
     * The complete legal name of the individual or entity.
     *
     * @return fullLegalName The complete legal name of the individual or entity.
     */
    @JsonProperty(JSON_PROPERTY_FULL_LEGAL_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getFullLegalName() {
      return fullLegalName;
    }
  
    /**
     * The complete legal name of the individual or entity.
     *
     * @param fullLegalName The complete legal name of the individual or entity.
     */
    @JsonProperty(JSON_PROPERTY_FULL_LEGAL_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setFullLegalName(String fullLegalName) {
      this.fullLegalName = fullLegalName;
    }
  
    /**
     * A commonly used or human-readable name for the individual or entity.
     *
     * @param name A commonly used or human-readable name for the individual or entity.
     * @return the current {@code Identity} instance, allowing for method chaining
     */
    public Identity name(String name) {
      this.name = name;
      return this;
    }
  
    /**
     * A commonly used or human-readable name for the individual or entity.
     *
     * @return name A commonly used or human-readable name for the individual or entity.
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getName() {
      return name;
    }
  
    /**
     * A commonly used or human-readable name for the individual or entity.
     *
     * @param name A commonly used or human-readable name for the individual or entity.
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setName(String name) {
      this.name = name;
    }
  
    /** Return true if this Identity object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      Identity identity = (Identity) o;
      return Objects.equals(this.fullLegalName, identity.fullLegalName)
          && Objects.equals(this.name, identity.name);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(fullLegalName, name);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class Identity {\n");
      sb.append("    fullLegalName: ").append(toIndentedString(fullLegalName)).append("\n");
      sb.append("    name: ").append(toIndentedString(name)).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 Identity given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of Identity
     * @throws JsonProcessingException if the JSON string is invalid with respect to Identity
     */
    public static Identity fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, Identity.class);
    }
  
    /**
     * Convert an instance of Identity to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  