content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  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 jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.UUID;
  
  /**
   * WorkspaceUserAccessInfo
   * <p>
   * Info summarizing a user's access to a workspace
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "userId",
    "userEmail",
    "userName",
    "workspaceId",
    "workspacePermission",
    "organizationPermission"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class WorkspaceUserAccessInfo implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userId")
    private UUID userId;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userEmail")
    private String userEmail;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userName")
    private String userName;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    private UUID workspaceId;
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("workspacePermission")
    @JsonPropertyDescription("Airbyte permission configuration")
    private Permission workspacePermission;
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("organizationPermission")
    @JsonPropertyDescription("Airbyte permission configuration")
    private Permission organizationPermission;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -8511588156510683102L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userId")
    public UUID getUserId() {
      return userId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userId")
    public void setUserId(UUID userId) {
      this.userId = userId;
    }
  
    public WorkspaceUserAccessInfo withUserId(UUID userId) {
      this.userId = userId;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userEmail")
    public String getUserEmail() {
      return userEmail;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userEmail")
    public void setUserEmail(String userEmail) {
      this.userEmail = userEmail;
    }
  
    public WorkspaceUserAccessInfo withUserEmail(String userEmail) {
      this.userEmail = userEmail;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userName")
    public String getUserName() {
      return userName;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("userName")
    public void setUserName(String userName) {
      this.userName = userName;
    }
  
    public WorkspaceUserAccessInfo withUserName(String userName) {
      this.userName = userName;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    public UUID getWorkspaceId() {
      return workspaceId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    public void setWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
    }
  
    public WorkspaceUserAccessInfo withWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
      return this;
    }
  
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("workspacePermission")
    public Permission getWorkspacePermission() {
      return workspacePermission;
    }
  
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("workspacePermission")
    public void setWorkspacePermission(Permission workspacePermission) {
      this.workspacePermission = workspacePermission;
    }
  
    public WorkspaceUserAccessInfo withWorkspacePermission(Permission workspacePermission) {
      this.workspacePermission = workspacePermission;
      return this;
    }
  
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("organizationPermission")
    public Permission getOrganizationPermission() {
      return organizationPermission;
    }
  
    /**
     * Permission
     * <p>
     * Airbyte permission configuration
     *
     */
    @JsonProperty("organizationPermission")
    public void setOrganizationPermission(Permission organizationPermission) {
      this.organizationPermission = organizationPermission;
    }
  
    public WorkspaceUserAccessInfo withOrganizationPermission(Permission organizationPermission) {
      this.organizationPermission = organizationPermission;
      return this;
    }
  
    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
      return this.additionalProperties;
    }
  
    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
    }
  
    public WorkspaceUserAccessInfo withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(WorkspaceUserAccessInfo.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("userId");
      sb.append('=');
      sb.append(((this.userId == null) ? "<null>" : this.userId));
      sb.append(',');
      sb.append("userEmail");
      sb.append('=');
      sb.append(((this.userEmail == null) ? "<null>" : this.userEmail));
      sb.append(',');
      sb.append("userName");
      sb.append('=');
      sb.append(((this.userName == null) ? "<null>" : this.userName));
      sb.append(',');
      sb.append("workspaceId");
      sb.append('=');
      sb.append(((this.workspaceId == null) ? "<null>" : this.workspaceId));
      sb.append(',');
      sb.append("workspacePermission");
      sb.append('=');
      sb.append(((this.workspacePermission == null) ? "<null>" : this.workspacePermission));
      sb.append(',');
      sb.append("organizationPermission");
      sb.append('=');
      sb.append(((this.organizationPermission == null) ? "<null>" : this.organizationPermission));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(((this.additionalProperties == null) ? "<null>" : this.additionalProperties));
      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.workspacePermission == null) ? 0 : this.workspacePermission.hashCode()));
      result = ((result * 31) + ((this.organizationPermission == null) ? 0 : this.organizationPermission.hashCode()));
      result = ((result * 31) + ((this.userEmail == null) ? 0 : this.userEmail.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.userName == null) ? 0 : this.userName.hashCode()));
      result = ((result * 31) + ((this.userId == null) ? 0 : this.userId.hashCode()));
      result = ((result * 31) + ((this.workspaceId == null) ? 0 : this.workspaceId.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof WorkspaceUserAccessInfo) == false) {
        return false;
      }
      WorkspaceUserAccessInfo rhs = ((WorkspaceUserAccessInfo) other);
      return ((((((((this.workspacePermission == rhs.workspacePermission)
          || ((this.workspacePermission != null) && this.workspacePermission.equals(rhs.workspacePermission)))
          && ((this.organizationPermission == rhs.organizationPermission)
              || ((this.organizationPermission != null) && this.organizationPermission.equals(rhs.organizationPermission))))
          && ((this.userEmail == rhs.userEmail) || ((this.userEmail != null) && this.userEmail.equals(rhs.userEmail))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))))
          && ((this.userName == rhs.userName) || ((this.userName != null) && this.userName.equals(rhs.userName))))
          && ((this.userId == rhs.userId) || ((this.userId != null) && this.userId.equals(rhs.userId))))
          && ((this.workspaceId == rhs.workspaceId) || ((this.workspaceId != null) && this.workspaceId.equals(rhs.workspaceId))));
    }
  
  }
  