/*
 * Azure Blockchain Workbench REST API
 * The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and platforms, perform transactions on a blockchain, and retrieve transactional and contract data from a blockchain.
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.swagger.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 io.swagger.client.model.UserChainMapping;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * User
 */

public class User {
  @SerializedName("userID")
  private Integer userID = null;

  @SerializedName("provisioningStatus")
  private Integer provisioningStatus = null;

  @SerializedName("externalID")
  private String externalID = null;

  @SerializedName("firstName")
  private String firstName = null;

  @SerializedName("lastName")
  private String lastName = null;

  @SerializedName("emailAddress")
  private String emailAddress = null;

  @SerializedName("userChainMappings")
  private List<UserChainMapping> userChainMappings = null;

  public User userID(Integer userID) {
    this.userID = userID;
    return this;
  }

   /**
   * Get userID
   * @return userID
  **/
  @ApiModelProperty(value = "")
  public Integer getUserID() {
    return userID;
  }

  public void setUserID(Integer userID) {
    this.userID = userID;
  }

  public User provisioningStatus(Integer provisioningStatus) {
    this.provisioningStatus = provisioningStatus;
    return this;
  }

   /**
   * Get provisioningStatus
   * @return provisioningStatus
  **/
  @ApiModelProperty(value = "")
  public Integer getProvisioningStatus() {
    return provisioningStatus;
  }

  public void setProvisioningStatus(Integer provisioningStatus) {
    this.provisioningStatus = provisioningStatus;
  }

  public User externalID(String externalID) {
    this.externalID = externalID;
    return this;
  }

   /**
   * Get externalID
   * @return externalID
  **/
  @ApiModelProperty(value = "")
  public String getExternalID() {
    return externalID;
  }

  public void setExternalID(String externalID) {
    this.externalID = externalID;
  }

  public User firstName(String firstName) {
    this.firstName = firstName;
    return this;
  }

   /**
   * Get firstName
   * @return firstName
  **/
  @ApiModelProperty(value = "")
  public String getFirstName() {
    return firstName;
  }

  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }

  public User lastName(String lastName) {
    this.lastName = lastName;
    return this;
  }

   /**
   * Get lastName
   * @return lastName
  **/
  @ApiModelProperty(value = "")
  public String getLastName() {
    return lastName;
  }

  public void setLastName(String lastName) {
    this.lastName = lastName;
  }

  public User emailAddress(String emailAddress) {
    this.emailAddress = emailAddress;
    return this;
  }

   /**
   * Get emailAddress
   * @return emailAddress
  **/
  @ApiModelProperty(value = "")
  public String getEmailAddress() {
    return emailAddress;
  }

  public void setEmailAddress(String emailAddress) {
    this.emailAddress = emailAddress;
  }

  public User userChainMappings(List<UserChainMapping> userChainMappings) {
    this.userChainMappings = userChainMappings;
    return this;
  }

  public User addUserChainMappingsItem(UserChainMapping userChainMappingsItem) {
    if (this.userChainMappings == null) {
      this.userChainMappings = new ArrayList<UserChainMapping>();
    }
    this.userChainMappings.add(userChainMappingsItem);
    return this;
  }

   /**
   * Get userChainMappings
   * @return userChainMappings
  **/
  @ApiModelProperty(value = "")
  public List<UserChainMapping> getUserChainMappings() {
    return userChainMappings;
  }

  public void setUserChainMappings(List<UserChainMapping> userChainMappings) {
    this.userChainMappings = userChainMappings;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    User user = (User) o;
    return Objects.equals(this.userID, user.userID) &&
        Objects.equals(this.provisioningStatus, user.provisioningStatus) &&
        Objects.equals(this.externalID, user.externalID) &&
        Objects.equals(this.firstName, user.firstName) &&
        Objects.equals(this.lastName, user.lastName) &&
        Objects.equals(this.emailAddress, user.emailAddress) &&
        Objects.equals(this.userChainMappings, user.userChainMappings);
  }

  @Override
  public int hashCode() {
    return Objects.hash(userID, provisioningStatus, externalID, firstName, lastName, emailAddress, userChainMappings);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class User {\n");
    
    sb.append("    userID: ").append(toIndentedString(userID)).append("\n");
    sb.append("    provisioningStatus: ").append(toIndentedString(provisioningStatus)).append("\n");
    sb.append("    externalID: ").append(toIndentedString(externalID)).append("\n");
    sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
    sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
    sb.append("    emailAddress: ").append(toIndentedString(emailAddress)).append("\n");
    sb.append("    userChainMappings: ").append(toIndentedString(userChainMappings)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

