/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.680.0
 * 
 *
 * 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.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * User address information.
 */
@ApiModel(description = "User address information.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class ClientUserIdentityAddress {
  public static final String SERIALIZED_NAME_STREET1 = "street_1";
  @SerializedName(SERIALIZED_NAME_STREET1)
  private String street1;

  public static final String SERIALIZED_NAME_STREET2 = "street_2";
  @SerializedName(SERIALIZED_NAME_STREET2)
  private String street2;

  public static final String SERIALIZED_NAME_CITY = "city";
  @SerializedName(SERIALIZED_NAME_CITY)
  private String city;

  public static final String SERIALIZED_NAME_REGION = "region";
  @SerializedName(SERIALIZED_NAME_REGION)
  private String region;

  public static final String SERIALIZED_NAME_COUNTRY = "country";
  @SerializedName(SERIALIZED_NAME_COUNTRY)
  private String country;

  public static final String SERIALIZED_NAME_POSTAL_CODE = "postal_code";
  @SerializedName(SERIALIZED_NAME_POSTAL_CODE)
  private String postalCode;

  public static final String SERIALIZED_NAME_PRIMARY = "primary";
  @SerializedName(SERIALIZED_NAME_PRIMARY)
  private Boolean primary;


  public ClientUserIdentityAddress street1(String street1) {
    
    this.street1 = street1;
    return this;
  }

   /**
   * First line of street address.
   * @return street1
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "First line of street address.")

  public String getStreet1() {
    return street1;
  }


  public void setStreet1(String street1) {
    this.street1 = street1;
  }


  public ClientUserIdentityAddress street2(String street2) {
    
    this.street2 = street2;
    return this;
  }

   /**
   * Second line of street address.
   * @return street2
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Second line of street address.")

  public String getStreet2() {
    return street2;
  }


  public void setStreet2(String street2) {
    this.street2 = street2;
  }


  public ClientUserIdentityAddress city(String city) {
    
    this.city = city;
    return this;
  }

   /**
   * City name.
   * @return city
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "City name.")

  public String getCity() {
    return city;
  }


  public void setCity(String city) {
    this.city = city;
  }


  public ClientUserIdentityAddress region(String region) {
    
    this.region = region;
    return this;
  }

   /**
   * State, province or region.
   * @return region
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "State, province or region.")

  public String getRegion() {
    return region;
  }


  public void setRegion(String region) {
    this.region = region;
  }


  public ClientUserIdentityAddress country(String country) {
    
    this.country = country;
    return this;
  }

   /**
   * Country code.
   * @return country
  **/
  @ApiModelProperty(required = true, value = "Country code.")

  public String getCountry() {
    return country;
  }


  public void setCountry(String country) {
    this.country = country;
  }


  public ClientUserIdentityAddress postalCode(String postalCode) {
    
    this.postalCode = postalCode;
    return this;
  }

   /**
   * Postal or ZIP code.
   * @return postalCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Postal or ZIP code.")

  public String getPostalCode() {
    return postalCode;
  }


  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode;
  }


  public ClientUserIdentityAddress primary(Boolean primary) {
    
    this.primary = primary;
    return this;
  }

   /**
   * Indicates whether this is the primary address for the User.
   * @return primary
  **/
  @ApiModelProperty(required = true, value = "Indicates whether this is the primary address for the User.")

  public Boolean getPrimary() {
    return primary;
  }


  public void setPrimary(Boolean primary) {
    this.primary = primary;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ClientUserIdentityAddress clientUserIdentityAddress = (ClientUserIdentityAddress) o;
    return Objects.equals(this.street1, clientUserIdentityAddress.street1) &&
        Objects.equals(this.street2, clientUserIdentityAddress.street2) &&
        Objects.equals(this.city, clientUserIdentityAddress.city) &&
        Objects.equals(this.region, clientUserIdentityAddress.region) &&
        Objects.equals(this.country, clientUserIdentityAddress.country) &&
        Objects.equals(this.postalCode, clientUserIdentityAddress.postalCode) &&
        Objects.equals(this.primary, clientUserIdentityAddress.primary);
  }

  @Override
  public int hashCode() {
    return Objects.hash(street1, street2, city, region, country, postalCode, primary);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ClientUserIdentityAddress {\n");
    sb.append("    street1: ").append(toIndentedString(street1)).append("\n");
    sb.append("    street2: ").append(toIndentedString(street2)).append("\n");
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
    sb.append("    region: ").append(toIndentedString(region)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
    sb.append("    primary: ").append(toIndentedString(primary)).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    ");
  }

}

