content: /*
   * 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.management;
  
  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.*;
  
  /** Contact */
  @JsonPropertyOrder({
    Contact.JSON_PROPERTY_EMAIL,
    Contact.JSON_PROPERTY_FIRST_NAME,
    Contact.JSON_PROPERTY_INFIX,
    Contact.JSON_PROPERTY_LAST_NAME,
    Contact.JSON_PROPERTY_PHONE_NUMBER
  })
  public class Contact {
    public static final String JSON_PROPERTY_EMAIL = "email";
    private String email;
  
    public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
    private String firstName;
  
    public static final String JSON_PROPERTY_INFIX = "infix";
    private String infix;
  
    public static final String JSON_PROPERTY_LAST_NAME = "lastName";
    private String lastName;
  
    public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
    private String phoneNumber;
  
    public Contact() {}
  
    /**
     * The individual&#39;s email address.
     *
     * @param email The individual&#39;s email address.
     * @return the current {@code Contact} instance, allowing for method chaining
     */
    public Contact email(String email) {
      this.email = email;
      return this;
    }
  
    /**
     * The individual&#39;s email address.
     *
     * @return email The individual&#39;s email address.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getEmail() {
      return email;
    }
  
    /**
     * The individual&#39;s email address.
     *
     * @param email The individual&#39;s email address.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setEmail(String email) {
      this.email = email;
    }
  
    /**
     * The individual&#39;s first name.
     *
     * @param firstName The individual&#39;s first name.
     * @return the current {@code Contact} instance, allowing for method chaining
     */
    public Contact firstName(String firstName) {
      this.firstName = firstName;
      return this;
    }
  
    /**
     * The individual&#39;s first name.
     *
     * @return firstName The individual&#39;s first name.
     */
    @JsonProperty(JSON_PROPERTY_FIRST_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getFirstName() {
      return firstName;
    }
  
    /**
     * The individual&#39;s first name.
     *
     * @param firstName The individual&#39;s first name.
     */
    @JsonProperty(JSON_PROPERTY_FIRST_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setFirstName(String firstName) {
      this.firstName = firstName;
    }
  
    /**
     * The infix in the individual&#39;s name, if any.
     *
     * @param infix The infix in the individual&#39;s name, if any.
     * @return the current {@code Contact} instance, allowing for method chaining
     */
    public Contact infix(String infix) {
      this.infix = infix;
      return this;
    }
  
    /**
     * The infix in the individual&#39;s name, if any.
     *
     * @return infix The infix in the individual&#39;s name, if any.
     */
    @JsonProperty(JSON_PROPERTY_INFIX)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getInfix() {
      return infix;
    }
  
    /**
     * The infix in the individual&#39;s name, if any.
     *
     * @param infix The infix in the individual&#39;s name, if any.
     */
    @JsonProperty(JSON_PROPERTY_INFIX)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setInfix(String infix) {
      this.infix = infix;
    }
  
    /**
     * The individual&#39;s last name.
     *
     * @param lastName The individual&#39;s last name.
     * @return the current {@code Contact} instance, allowing for method chaining
     */
    public Contact lastName(String lastName) {
      this.lastName = lastName;
      return this;
    }
  
    /**
     * The individual&#39;s last name.
     *
     * @return lastName The individual&#39;s last name.
     */
    @JsonProperty(JSON_PROPERTY_LAST_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getLastName() {
      return lastName;
    }
  
    /**
     * The individual&#39;s last name.
     *
     * @param lastName The individual&#39;s last name.
     */
    @JsonProperty(JSON_PROPERTY_LAST_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLastName(String lastName) {
      this.lastName = lastName;
    }
  
    /**
     * The individual&#39;s phone number, specified as 10-14 digits with an optional &#x60;+&#x60;
     * prefix.
     *
     * @param phoneNumber The individual&#39;s phone number, specified as 10-14 digits with an
     *     optional &#x60;+&#x60; prefix.
     * @return the current {@code Contact} instance, allowing for method chaining
     */
    public Contact phoneNumber(String phoneNumber) {
      this.phoneNumber = phoneNumber;
      return this;
    }
  
    /**
     * The individual&#39;s phone number, specified as 10-14 digits with an optional &#x60;+&#x60;
     * prefix.
     *
     * @return phoneNumber The individual&#39;s phone number, specified as 10-14 digits with an
     *     optional &#x60;+&#x60; prefix.
     */
    @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getPhoneNumber() {
      return phoneNumber;
    }
  
    /**
     * The individual&#39;s phone number, specified as 10-14 digits with an optional &#x60;+&#x60;
     * prefix.
     *
     * @param phoneNumber The individual&#39;s phone number, specified as 10-14 digits with an
     *     optional &#x60;+&#x60; prefix.
     */
    @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPhoneNumber(String phoneNumber) {
      this.phoneNumber = phoneNumber;
    }
  
    /** Return true if this Contact object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      Contact contact = (Contact) o;
      return Objects.equals(this.email, contact.email)
          && Objects.equals(this.firstName, contact.firstName)
          && Objects.equals(this.infix, contact.infix)
          && Objects.equals(this.lastName, contact.lastName)
          && Objects.equals(this.phoneNumber, contact.phoneNumber);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(email, firstName, infix, lastName, phoneNumber);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class Contact {\n");
      sb.append("    email: ").append(toIndentedString(email)).append("\n");
      sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
      sb.append("    infix: ").append(toIndentedString(infix)).append("\n");
      sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
      sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).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 Contact given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of Contact
     * @throws JsonProcessingException if the JSON string is invalid with respect to Contact
     */
    public static Contact fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, Contact.class);
    }
  
    /**
     * Convert an instance of Contact to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  