content: /*
   * Legal Entity Management API
   *
   * The version of the OpenAPI document: 4
   *
   *
   * 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 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.*;
  
  /** TaxInformation */
  @JsonPropertyOrder({
    TaxInformation.JSON_PROPERTY_COUNTRY,
    TaxInformation.JSON_PROPERTY_NUMBER,
    TaxInformation.JSON_PROPERTY_NUMBER_ABSENT,
    TaxInformation.JSON_PROPERTY_TYPE
  })
  public class TaxInformation {
    public static final String JSON_PROPERTY_COUNTRY = "country";
    private String country;
  
    public static final String JSON_PROPERTY_NUMBER = "number";
    private String number;
  
    public static final String JSON_PROPERTY_NUMBER_ABSENT = "numberAbsent";
    private Boolean numberAbsent;
  
    public static final String JSON_PROPERTY_TYPE = "type";
    private String type;
  
    public TaxInformation() {}
  
    /**
     * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country
     * code.
     *
     * @param country The two-letter [ISO 3166-1
     *     alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
     * @return the current {@code TaxInformation} instance, allowing for method chaining
     */
    public TaxInformation country(String country) {
      this.country = country;
      return this;
    }
  
    /**
     * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country
     * code.
     *
     * @return country The two-letter [ISO 3166-1
     *     alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
     */
    @JsonProperty(JSON_PROPERTY_COUNTRY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getCountry() {
      return country;
    }
  
    /**
     * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country
     * code.
     *
     * @param country The two-letter [ISO 3166-1
     *     alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
     */
    @JsonProperty(JSON_PROPERTY_COUNTRY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCountry(String country) {
      this.country = country;
    }
  
    /**
     * The tax ID number (TIN) of the organization or individual.
     *
     * @param number The tax ID number (TIN) of the organization or individual.
     * @return the current {@code TaxInformation} instance, allowing for method chaining
     */
    public TaxInformation number(String number) {
      this.number = number;
      return this;
    }
  
    /**
     * The tax ID number (TIN) of the organization or individual.
     *
     * @return number The tax ID number (TIN) of the organization or individual.
     */
    @JsonProperty(JSON_PROPERTY_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getNumber() {
      return number;
    }
  
    /**
     * The tax ID number (TIN) of the organization or individual.
     *
     * @param number The tax ID number (TIN) of the organization or individual.
     */
    @JsonProperty(JSON_PROPERTY_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setNumber(String number) {
      this.number = number;
    }
  
    /**
     * Set this to **true** if the legal entity or legal arrangement does not have a tax ID number
     * (TIN). Only applicable in Australia.
     *
     * @param numberAbsent Set this to **true** if the legal entity or legal arrangement does not have
     *     a tax ID number (TIN). Only applicable in Australia.
     * @return the current {@code TaxInformation} instance, allowing for method chaining
     */
    public TaxInformation numberAbsent(Boolean numberAbsent) {
      this.numberAbsent = numberAbsent;
      return this;
    }
  
    /**
     * Set this to **true** if the legal entity or legal arrangement does not have a tax ID number
     * (TIN). Only applicable in Australia.
     *
     * @return numberAbsent Set this to **true** if the legal entity or legal arrangement does not
     *     have a tax ID number (TIN). Only applicable in Australia.
     */
    @JsonProperty(JSON_PROPERTY_NUMBER_ABSENT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Boolean getNumberAbsent() {
      return numberAbsent;
    }
  
    /**
     * Set this to **true** if the legal entity or legal arrangement does not have a tax ID number
     * (TIN). Only applicable in Australia.
     *
     * @param numberAbsent Set this to **true** if the legal entity or legal arrangement does not have
     *     a tax ID number (TIN). Only applicable in Australia.
     */
    @JsonProperty(JSON_PROPERTY_NUMBER_ABSENT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setNumberAbsent(Boolean numberAbsent) {
      this.numberAbsent = numberAbsent;
    }
  
    /**
     * The TIN type depending on the country where it was issued. Only provide if the country has
     * multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**,
     * or **ITIN** for the US.
     *
     * @param type The TIN type depending on the country where it was issued. Only provide if the
     *     country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide
     *     **SSN**, **EIN**, or **ITIN** for the US.
     * @return the current {@code TaxInformation} instance, allowing for method chaining
     */
    public TaxInformation type(String type) {
      this.type = type;
      return this;
    }
  
    /**
     * The TIN type depending on the country where it was issued. Only provide if the country has
     * multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**,
     * or **ITIN** for the US.
     *
     * @return type The TIN type depending on the country where it was issued. Only provide if the
     *     country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide
     *     **SSN**, **EIN**, or **ITIN** for the US.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getType() {
      return type;
    }
  
    /**
     * The TIN type depending on the country where it was issued. Only provide if the country has
     * multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**,
     * or **ITIN** for the US.
     *
     * @param type The TIN type depending on the country where it was issued. Only provide if the
     *     country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide
     *     **SSN**, **EIN**, or **ITIN** for the US.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setType(String type) {
      this.type = type;
    }
  
    /** Return true if this TaxInformation object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      TaxInformation taxInformation = (TaxInformation) o;
      return Objects.equals(this.country, taxInformation.country)
          && Objects.equals(this.number, taxInformation.number)
          && Objects.equals(this.numberAbsent, taxInformation.numberAbsent)
          && Objects.equals(this.type, taxInformation.type);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(country, number, numberAbsent, type);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class TaxInformation {\n");
      sb.append("    country: ").append(toIndentedString(country)).append("\n");
      sb.append("    number: ").append(toIndentedString(number)).append("\n");
      sb.append("    numberAbsent: ").append(toIndentedString(numberAbsent)).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 TaxInformation given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of TaxInformation
     * @throws JsonProcessingException if the JSON string is invalid with respect to TaxInformation
     */
    public static TaxInformation fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, TaxInformation.class);
    }
  
    /**
     * Convert an instance of TaxInformation to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  