content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.databind.JsonNode;
  import io.airbyte.config.User.Status;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.UUID;
  
  /**
   * AuthenticatedUser
   * <p>
   * Airbyte user configuration with a specific set of authUserId/authProvider
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "name",
    "userId",
    "authUserId",
    "authProvider",
    "defaultWorkspaceId",
    "status",
    "companyName",
    "email",
    "news",
    "uiMetadata"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class AuthenticatedUser implements Serializable {
  
    /**
     * Caption name for the user (Required)
     *
     */
    @JsonProperty("name")
    @JsonPropertyDescription("Caption name for the user")
    private String name;
    /**
     * Internal Airbyte Cloud User ID (Required)
     *
     */
    @JsonProperty("userId")
    @JsonPropertyDescription("Internal Airbyte Cloud User ID")
    private UUID userId;
    /**
     * The userId from the Auth provider (Required)
     *
     */
    @JsonProperty("authUserId")
    @JsonPropertyDescription("The userId from the Auth provider")
    private String authUserId;
    /**
     * AuthProvider
     * <p>
     * enum that describes the different types of auth providers that the platform supports. (Required)
     *
     */
    @JsonProperty("authProvider")
    @JsonPropertyDescription("enum that describes the different types of auth providers that the platform supports.")
    private AuthProvider authProvider = AuthProvider.fromValue("airbyte");
    /**
     * The workspace a user will go to by default when they login
     *
     */
    @JsonProperty("defaultWorkspaceId")
    @JsonPropertyDescription("The workspace a user will go to by default when they login")
    private UUID defaultWorkspaceId;
    @JsonProperty("status")
    private Status status;
    @JsonProperty("companyName")
    private String companyName;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("email")
    private String email;
    @JsonProperty("news")
    private Boolean news = false;
    /**
     * metadata information required from frontend UI
     *
     */
    @JsonProperty("uiMetadata")
    @JsonPropertyDescription("metadata information required from frontend UI")
    private JsonNode uiMetadata;
    private final static long serialVersionUID = -2788134797288590884L;
  
    /**
     * Caption name for the user (Required)
     *
     */
    @JsonProperty("name")
    public String getName() {
      return name;
    }
  
    /**
     * Caption name for the user (Required)
     *
     */
    @JsonProperty("name")
    public void setName(String name) {
      this.name = name;
    }
  
    public AuthenticatedUser withName(String name) {
      this.name = name;
      return this;
    }
  
    /**
     * Internal Airbyte Cloud User ID (Required)
     *
     */
    @JsonProperty("userId")
    public UUID getUserId() {
      return userId;
    }
  
    /**
     * Internal Airbyte Cloud User ID (Required)
     *
     */
    @JsonProperty("userId")
    public void setUserId(UUID userId) {
      this.userId = userId;
    }
  
    public AuthenticatedUser withUserId(UUID userId) {
      this.userId = userId;
      return this;
    }
  
    /**
     * The userId from the Auth provider (Required)
     *
     */
    @JsonProperty("authUserId")
    public String getAuthUserId() {
      return authUserId;
    }
  
    /**
     * The userId from the Auth provider (Required)
     *
     */
    @JsonProperty("authUserId")
    public void setAuthUserId(String authUserId) {
      this.authUserId = authUserId;
    }
  
    public AuthenticatedUser withAuthUserId(String authUserId) {
      this.authUserId = authUserId;
      return this;
    }
  
    /**
     * AuthProvider
     * <p>
     * enum that describes the different types of auth providers that the platform supports. (Required)
     *
     */
    @JsonProperty("authProvider")
    public AuthProvider getAuthProvider() {
      return authProvider;
    }
  
    /**
     * AuthProvider
     * <p>
     * enum that describes the different types of auth providers that the platform supports. (Required)
     *
     */
    @JsonProperty("authProvider")
    public void setAuthProvider(AuthProvider authProvider) {
      this.authProvider = authProvider;
    }
  
    public AuthenticatedUser withAuthProvider(AuthProvider authProvider) {
      this.authProvider = authProvider;
      return this;
    }
  
    /**
     * The workspace a user will go to by default when they login
     *
     */
    @JsonProperty("defaultWorkspaceId")
    public UUID getDefaultWorkspaceId() {
      return defaultWorkspaceId;
    }
  
    /**
     * The workspace a user will go to by default when they login
     *
     */
    @JsonProperty("defaultWorkspaceId")
    public void setDefaultWorkspaceId(UUID defaultWorkspaceId) {
      this.defaultWorkspaceId = defaultWorkspaceId;
    }
  
    public AuthenticatedUser withDefaultWorkspaceId(UUID defaultWorkspaceId) {
      this.defaultWorkspaceId = defaultWorkspaceId;
      return this;
    }
  
    @JsonProperty("status")
    public Status getStatus() {
      return status;
    }
  
    @JsonProperty("status")
    public void setStatus(Status status) {
      this.status = status;
    }
  
    public AuthenticatedUser withStatus(Status status) {
      this.status = status;
      return this;
    }
  
    @JsonProperty("companyName")
    public String getCompanyName() {
      return companyName;
    }
  
    @JsonProperty("companyName")
    public void setCompanyName(String companyName) {
      this.companyName = companyName;
    }
  
    public AuthenticatedUser withCompanyName(String companyName) {
      this.companyName = companyName;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("email")
    public String getEmail() {
      return email;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("email")
    public void setEmail(String email) {
      this.email = email;
    }
  
    public AuthenticatedUser withEmail(String email) {
      this.email = email;
      return this;
    }
  
    @JsonProperty("news")
    public Boolean getNews() {
      return news;
    }
  
    @JsonProperty("news")
    public void setNews(Boolean news) {
      this.news = news;
    }
  
    public AuthenticatedUser withNews(Boolean news) {
      this.news = news;
      return this;
    }
  
    /**
     * metadata information required from frontend UI
     *
     */
    @JsonProperty("uiMetadata")
    public JsonNode getUiMetadata() {
      return uiMetadata;
    }
  
    /**
     * metadata information required from frontend UI
     *
     */
    @JsonProperty("uiMetadata")
    public void setUiMetadata(JsonNode uiMetadata) {
      this.uiMetadata = uiMetadata;
    }
  
    public AuthenticatedUser withUiMetadata(JsonNode uiMetadata) {
      this.uiMetadata = uiMetadata;
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(AuthenticatedUser.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("name");
      sb.append('=');
      sb.append(((this.name == null) ? "<null>" : this.name));
      sb.append(',');
      sb.append("userId");
      sb.append('=');
      sb.append(((this.userId == null) ? "<null>" : this.userId));
      sb.append(',');
      sb.append("authUserId");
      sb.append('=');
      sb.append(((this.authUserId == null) ? "<null>" : this.authUserId));
      sb.append(',');
      sb.append("authProvider");
      sb.append('=');
      sb.append(((this.authProvider == null) ? "<null>" : this.authProvider));
      sb.append(',');
      sb.append("defaultWorkspaceId");
      sb.append('=');
      sb.append(((this.defaultWorkspaceId == null) ? "<null>" : this.defaultWorkspaceId));
      sb.append(',');
      sb.append("status");
      sb.append('=');
      sb.append(((this.status == null) ? "<null>" : this.status));
      sb.append(',');
      sb.append("companyName");
      sb.append('=');
      sb.append(((this.companyName == null) ? "<null>" : this.companyName));
      sb.append(',');
      sb.append("email");
      sb.append('=');
      sb.append(((this.email == null) ? "<null>" : this.email));
      sb.append(',');
      sb.append("news");
      sb.append('=');
      sb.append(((this.news == null) ? "<null>" : this.news));
      sb.append(',');
      sb.append("uiMetadata");
      sb.append('=');
      sb.append(((this.uiMetadata == null) ? "<null>" : this.uiMetadata));
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.news == null) ? 0 : this.news.hashCode()));
      result = ((result * 31) + ((this.authProvider == null) ? 0 : this.authProvider.hashCode()));
      result = ((result * 31) + ((this.defaultWorkspaceId == null) ? 0 : this.defaultWorkspaceId.hashCode()));
      result = ((result * 31) + ((this.authUserId == null) ? 0 : this.authUserId.hashCode()));
      result = ((result * 31) + ((this.companyName == null) ? 0 : this.companyName.hashCode()));
      result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode()));
      result = ((result * 31) + ((this.uiMetadata == null) ? 0 : this.uiMetadata.hashCode()));
      result = ((result * 31) + ((this.userId == null) ? 0 : this.userId.hashCode()));
      result = ((result * 31) + ((this.email == null) ? 0 : this.email.hashCode()));
      result = ((result * 31) + ((this.status == null) ? 0 : this.status.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof AuthenticatedUser) == false) {
        return false;
      }
      AuthenticatedUser rhs = ((AuthenticatedUser) other);
      return (((((((((((this.news == rhs.news) || ((this.news != null) && this.news.equals(rhs.news)))
          && ((this.authProvider == rhs.authProvider) || ((this.authProvider != null) && this.authProvider.equals(rhs.authProvider))))
          && ((this.defaultWorkspaceId == rhs.defaultWorkspaceId)
              || ((this.defaultWorkspaceId != null) && this.defaultWorkspaceId.equals(rhs.defaultWorkspaceId))))
          && ((this.authUserId == rhs.authUserId) || ((this.authUserId != null) && this.authUserId.equals(rhs.authUserId))))
          && ((this.companyName == rhs.companyName) || ((this.companyName != null) && this.companyName.equals(rhs.companyName))))
          && ((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))))
          && ((this.uiMetadata == rhs.uiMetadata) || ((this.uiMetadata != null) && this.uiMetadata.equals(rhs.uiMetadata))))
          && ((this.userId == rhs.userId) || ((this.userId != null) && this.userId.equals(rhs.userId))))
          && ((this.email == rhs.email) || ((this.email != null) && this.email.equals(rhs.email))))
          && ((this.status == rhs.status) || ((this.status != null) && this.status.equals(rhs.status))));
    }
  
  }
  