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.*;
  
  /** Support */
  @JsonPropertyOrder({Support.JSON_PROPERTY_EMAIL, Support.JSON_PROPERTY_PHONE})
  public class Support {
    public static final String JSON_PROPERTY_EMAIL = "email";
    private String email;
  
    public static final String JSON_PROPERTY_PHONE = "phone";
    private PhoneNumber phone;
  
    public Support() {}
  
    /**
     * The support email address of the legal entity.
     *
     * @param email The support email address of the legal entity.
     * @return the current {@code Support} instance, allowing for method chaining
     */
    public Support email(String email) {
      this.email = email;
      return this;
    }
  
    /**
     * The support email address of the legal entity.
     *
     * @return email The support email address of the legal entity.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getEmail() {
      return email;
    }
  
    /**
     * The support email address of the legal entity.
     *
     * @param email The support email address of the legal entity.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setEmail(String email) {
      this.email = email;
    }
  
    /**
     * phone
     *
     * @param phone
     * @return the current {@code Support} instance, allowing for method chaining
     */
    public Support phone(PhoneNumber phone) {
      this.phone = phone;
      return this;
    }
  
    /**
     * Get phone
     *
     * @return phone
     */
    @JsonProperty(JSON_PROPERTY_PHONE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public PhoneNumber getPhone() {
      return phone;
    }
  
    /**
     * phone
     *
     * @param phone
     */
    @JsonProperty(JSON_PROPERTY_PHONE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPhone(PhoneNumber phone) {
      this.phone = phone;
    }
  
    /** Return true if this Support object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      Support support = (Support) o;
      return Objects.equals(this.email, support.email) && Objects.equals(this.phone, support.phone);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(email, phone);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class Support {\n");
      sb.append("    email: ").append(toIndentedString(email)).append("\n");
      sb.append("    phone: ").append(toIndentedString(phone)).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 Support given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of Support
     * @throws JsonProcessingException if the JSON string is invalid with respect to Support
     */
    public static Support fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, Support.class);
    }
  
    /**
     * Convert an instance of Support to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  