All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.api.model.DominoCommonUserPerson Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * Domino Data Lab API v4
 * This API provides access to select Domino functions available in Domino's non-public API. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key. 
 *
 * The version of the OpenAPI document: 4.0.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.dominodatalab.api.model;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.dominodatalab.api.invoker.ApiClient;
/**
 * DominoCommonUserPerson
 */
@JsonPropertyOrder({
  DominoCommonUserPerson.JSON_PROPERTY_AVATAR_URL,
  DominoCommonUserPerson.JSON_PROPERTY_COMPANY_NAME,
  DominoCommonUserPerson.JSON_PROPERTY_EMAIL,
  DominoCommonUserPerson.JSON_PROPERTY_FIRST_NAME,
  DominoCommonUserPerson.JSON_PROPERTY_FULL_NAME,
  DominoCommonUserPerson.JSON_PROPERTY_ID,
  DominoCommonUserPerson.JSON_PROPERTY_IDP_ID,
  DominoCommonUserPerson.JSON_PROPERTY_LAST_NAME,
  DominoCommonUserPerson.JSON_PROPERTY_PHONE_NUMBER,
  DominoCommonUserPerson.JSON_PROPERTY_USER_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:26.309454-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class DominoCommonUserPerson {
  public static final String JSON_PROPERTY_AVATAR_URL = "avatarUrl";
  private String avatarUrl;

  public static final String JSON_PROPERTY_COMPANY_NAME = "companyName";
  private String companyName;

  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_FULL_NAME = "fullName";
  private String fullName;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_IDP_ID = "idpId";
  private String idpId;

  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 static final String JSON_PROPERTY_USER_NAME = "userName";
  private String userName;

  public DominoCommonUserPerson() { 
  }

  public DominoCommonUserPerson avatarUrl(String avatarUrl) {
    this.avatarUrl = avatarUrl;
    return this;
  }

  /**
   * Url of the person's avatar
   * @return avatarUrl
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_AVATAR_URL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getAvatarUrl() {
    return avatarUrl;
  }


  @JsonProperty(JSON_PROPERTY_AVATAR_URL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAvatarUrl(String avatarUrl) {
    this.avatarUrl = avatarUrl;
  }


  public DominoCommonUserPerson companyName(String companyName) {
    this.companyName = companyName;
    return this;
  }

  /**
   * Person's company name
   * @return companyName
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPANY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCompanyName() {
    return companyName;
  }


  @JsonProperty(JSON_PROPERTY_COMPANY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }


  public DominoCommonUserPerson email(String email) {
    this.email = email;
    return this;
  }

  /**
   * Person email
   * @return email
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EMAIL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEmail() {
    return email;
  }


  @JsonProperty(JSON_PROPERTY_EMAIL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEmail(String email) {
    this.email = email;
  }


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

  /**
   * Person first name
   * @return firstName
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_FIRST_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getFirstName() {
    return firstName;
  }


  @JsonProperty(JSON_PROPERTY_FIRST_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }


  public DominoCommonUserPerson fullName(String fullName) {
    this.fullName = fullName;
    return this;
  }

  /**
   * Person full name
   * @return fullName
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_FULL_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getFullName() {
    return fullName;
  }


  @JsonProperty(JSON_PROPERTY_FULL_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setFullName(String fullName) {
    this.fullName = fullName;
  }


  public DominoCommonUserPerson id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Person user id
   * @return id
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  public DominoCommonUserPerson idpId(String idpId) {
    this.idpId = idpId;
    return this;
  }

  /**
   * Get idpId
   * @return idpId
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_IDP_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getIdpId() {
    return idpId;
  }


  @JsonProperty(JSON_PROPERTY_IDP_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIdpId(String idpId) {
    this.idpId = idpId;
  }


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

  /**
   * Person last name
   * @return lastName
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_LAST_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getLastName() {
    return lastName;
  }


  @JsonProperty(JSON_PROPERTY_LAST_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLastName(String lastName) {
    this.lastName = lastName;
  }


  public DominoCommonUserPerson phoneNumber(String phoneNumber) {
    this.phoneNumber = phoneNumber;
    return this;
  }

  /**
   * Person phone number
   * @return phoneNumber
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getPhoneNumber() {
    return phoneNumber;
  }


  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPhoneNumber(String phoneNumber) {
    this.phoneNumber = phoneNumber;
  }


  public DominoCommonUserPerson userName(String userName) {
    this.userName = userName;
    return this;
  }

  /**
   * Person username
   * @return userName
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_USER_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getUserName() {
    return userName;
  }


  @JsonProperty(JSON_PROPERTY_USER_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setUserName(String userName) {
    this.userName = userName;
  }


  /**
   * Return true if this domino.common.user.Person object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoCommonUserPerson dominoCommonUserPerson = (DominoCommonUserPerson) o;
    return Objects.equals(this.avatarUrl, dominoCommonUserPerson.avatarUrl) &&
        Objects.equals(this.companyName, dominoCommonUserPerson.companyName) &&
        Objects.equals(this.email, dominoCommonUserPerson.email) &&
        Objects.equals(this.firstName, dominoCommonUserPerson.firstName) &&
        Objects.equals(this.fullName, dominoCommonUserPerson.fullName) &&
        Objects.equals(this.id, dominoCommonUserPerson.id) &&
        Objects.equals(this.idpId, dominoCommonUserPerson.idpId) &&
        Objects.equals(this.lastName, dominoCommonUserPerson.lastName) &&
        Objects.equals(this.phoneNumber, dominoCommonUserPerson.phoneNumber) &&
        Objects.equals(this.userName, dominoCommonUserPerson.userName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(avatarUrl, companyName, email, firstName, fullName, id, idpId, lastName, phoneNumber, userName);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoCommonUserPerson {\n");
    sb.append("    avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n");
    sb.append("    companyName: ").append(toIndentedString(companyName)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
    sb.append("    fullName: ").append(toIndentedString(fullName)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    idpId: ").append(toIndentedString(idpId)).append("\n");
    sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
    sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).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    ");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @return URL query string
   */
  public String toUrlQueryString() {
    return toUrlQueryString(null);
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    String suffix = "";
    String containerSuffix = "";
    String containerPrefix = "";
    if (prefix == null) {
      // style=form, explode=true, e.g. /pet?name=cat&type=manx
      prefix = "";
    } else {
      // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
      prefix = prefix + "[";
      suffix = "]";
      containerSuffix = "]";
      containerPrefix = "[";
    }

    StringJoiner joiner = new StringJoiner("&");

    // add `avatarUrl` to the URL query string
    if (getAvatarUrl() != null) {
      joiner.add(String.format("%savatarUrl%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getAvatarUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `companyName` to the URL query string
    if (getCompanyName() != null) {
      joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `email` to the URL query string
    if (getEmail() != null) {
      joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `firstName` to the URL query string
    if (getFirstName() != null) {
      joiner.add(String.format("%sfirstName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getFirstName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `fullName` to the URL query string
    if (getFullName() != null) {
      joiner.add(String.format("%sfullName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getFullName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `id` to the URL query string
    if (getId() != null) {
      joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `idpId` to the URL query string
    if (getIdpId() != null) {
      joiner.add(String.format("%sidpId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getIdpId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `lastName` to the URL query string
    if (getLastName() != null) {
      joiner.add(String.format("%slastName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getLastName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `phoneNumber` to the URL query string
    if (getPhoneNumber() != null) {
      joiner.add(String.format("%sphoneNumber%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPhoneNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `userName` to the URL query string
    if (getUserName() != null) {
      joiner.add(String.format("%suserName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getUserName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy