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.Objects;
  import java.util.UUID;
  
  /**
   * UserInvitation
   * <p>
   * An invitation for a user to access a particular workspace/organization
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "id",
    "inviteCode",
    "inviterUserId",
    "invitedEmail",
    "acceptedByUserId",
    "scopeId",
    "scopeType",
    "permissionType",
    "status",
    "createdAt",
    "updatedAt",
    "expiresAt"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class UserInvitation implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("id")
    private UUID id;
    /**
     * String that uniquely identifies a particular invitation (Required)
     *
     */
    @JsonProperty("inviteCode")
    @JsonPropertyDescription("String that uniquely identifies a particular invitation")
    private String inviteCode;
    /**
     * ID of the user who created the invitation (Required)
     *
     */
    @JsonProperty("inviterUserId")
    @JsonPropertyDescription("ID of the user who created the invitation")
    private UUID inviterUserId;
    /**
     * Email address of the user who is being invited (Required)
     *
     */
    @JsonProperty("invitedEmail")
    @JsonPropertyDescription("Email address of the user who is being invited")
    private String invitedEmail;
    /**
     * ID of the user who accepted the invitation
     *
     */
    @JsonProperty("acceptedByUserId")
    @JsonPropertyDescription("ID of the user who accepted the invitation")
    private UUID acceptedByUserId;
    /**
     * ID of the workspace/organization that the user is being invited to (Required)
     *
     */
    @JsonProperty("scopeId")
    @JsonPropertyDescription("ID of the workspace/organization that the user is being invited to")
    private UUID scopeId;
    /**
     * ScopeType
     * <p>
     * Scope type of resource id (Required)
     *
     */
    @JsonProperty("scopeType")
    @JsonPropertyDescription("Scope type of resource id")
    private ScopeType scopeType;
    /**
     * PermissionType
     * <p>
     * Permission type enum describing the level of access granted by the permission object (Required)
     *
     */
    @JsonProperty("permissionType")
    @JsonPropertyDescription("Permission type enum describing the level of access granted by the permission object")
    private Permission.PermissionType permissionType;
    /**
     * InvitationStatus
     * <p>
     * Userinvitation status enum (Required)
     *
     */
    @JsonProperty("status")
    @JsonPropertyDescription("Userinvitation status enum")
    private InvitationStatus status;
    /**
     * creation timestamp of the invitation
     *
     */
    @JsonProperty("createdAt")
    @JsonPropertyDescription("creation timestamp of the invitation")
    private Long createdAt;
    /**
     * last updated timestamp of the invitation
     *
     */
    @JsonProperty("updatedAt")
    @JsonPropertyDescription("last updated timestamp of the invitation")
    private Long updatedAt;
    /**
     * Timestamp at which the invitation will expire (Required)
     *
     */
    @JsonProperty("expiresAt")
    @JsonPropertyDescription("Timestamp at which the invitation will expire")
    private Long expiresAt;
    @JsonIgnore
    private final Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -4897023832343734575L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("id")
    public UUID getId() {
      return id;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("id")
    public void setId(UUID id) {
      this.id = id;
    }
  
    public UserInvitation withId(UUID id) {
      this.id = id;
      return this;
    }
  
    /**
     * String that uniquely identifies a particular invitation (Required)
     *
     */
    @JsonProperty("inviteCode")
    public String getInviteCode() {
      return inviteCode;
    }
  
    /**
     * String that uniquely identifies a particular invitation (Required)
     *
     */
    @JsonProperty("inviteCode")
    public void setInviteCode(String inviteCode) {
      this.inviteCode = inviteCode;
    }
  
    public UserInvitation withInviteCode(String inviteCode) {
      this.inviteCode = inviteCode;
      return this;
    }
  
    /**
     * ID of the user who created the invitation (Required)
     *
     */
    @JsonProperty("inviterUserId")
    public UUID getInviterUserId() {
      return inviterUserId;
    }
  
    /**
     * ID of the user who created the invitation (Required)
     *
     */
    @JsonProperty("inviterUserId")
    public void setInviterUserId(UUID inviterUserId) {
      this.inviterUserId = inviterUserId;
    }
  
    public UserInvitation withInviterUserId(UUID inviterUserId) {
      this.inviterUserId = inviterUserId;
      return this;
    }
  
    /**
     * Email address of the user who is being invited (Required)
     *
     */
    @JsonProperty("invitedEmail")
    public String getInvitedEmail() {
      return invitedEmail;
    }
  
    /**
     * Email address of the user who is being invited (Required)
     *
     */
    @JsonProperty("invitedEmail")
    public void setInvitedEmail(String invitedEmail) {
      this.invitedEmail = invitedEmail;
    }
  
    public UserInvitation withInvitedEmail(String invitedEmail) {
      this.invitedEmail = invitedEmail;
      return this;
    }
  
    /**
     * ID of the user who accepted the invitation
     *
     */
    @JsonProperty("acceptedByUserId")
    public UUID getAcceptedByUserId() {
      return acceptedByUserId;
    }
  
    /**
     * ID of the user who accepted the invitation
     *
     */
    @JsonProperty("acceptedByUserId")
    public void setAcceptedByUserId(UUID acceptedByUserId) {
      this.acceptedByUserId = acceptedByUserId;
    }
  
    public UserInvitation withAcceptedByUserId(UUID acceptedByUserId) {
      this.acceptedByUserId = acceptedByUserId;
      return this;
    }
  
    /**
     * ID of the workspace/organization that the user is being invited to (Required)
     *
     */
    @JsonProperty("scopeId")
    public UUID getScopeId() {
      return scopeId;
    }
  
    /**
     * ID of the workspace/organization that the user is being invited to (Required)
     *
     */
    @JsonProperty("scopeId")
    public void setScopeId(UUID scopeId) {
      this.scopeId = scopeId;
    }
  
    public UserInvitation withScopeId(UUID scopeId) {
      this.scopeId = scopeId;
      return this;
    }
  
    /**
     * ScopeType
     * <p>
     * Scope type of resource id (Required)
     *
     */
    @JsonProperty("scopeType")
    public ScopeType getScopeType() {
      return scopeType;
    }
  
    /**
     * ScopeType
     * <p>
     * Scope type of resource id (Required)
     *
     */
    @JsonProperty("scopeType")
    public void setScopeType(ScopeType scopeType) {
      this.scopeType = scopeType;
    }
  
    public UserInvitation withScopeType(ScopeType scopeType) {
      this.scopeType = scopeType;
      return this;
    }
  
    /**
     * PermissionType
     * <p>
     * Permission type enum describing the level of access granted by the permission object (Required)
     *
     */
    @JsonProperty("permissionType")
    public Permission.PermissionType getPermissionType() {
      return permissionType;
    }
  
    /**
     * PermissionType
     * <p>
     * Permission type enum describing the level of access granted by the permission object (Required)
     *
     */
    @JsonProperty("permissionType")
    public void setPermissionType(Permission.PermissionType permissionType) {
      this.permissionType = permissionType;
    }
  
    public UserInvitation withPermissionType(Permission.PermissionType permissionType) {
      this.permissionType = permissionType;
      return this;
    }
  
    /**
     * InvitationStatus
     * <p>
     * Userinvitation status enum (Required)
     *
     */
    @JsonProperty("status")
    public InvitationStatus getStatus() {
      return status;
    }
  
    /**
     * InvitationStatus
     * <p>
     * Userinvitation status enum (Required)
     *
     */
    @JsonProperty("status")
    public void setStatus(InvitationStatus status) {
      this.status = status;
    }
  
    public UserInvitation withStatus(InvitationStatus status) {
      this.status = status;
      return this;
    }
  
    /**
     * creation timestamp of the invitation
     *
     */
    @JsonProperty("createdAt")
    public Long getCreatedAt() {
      return createdAt;
    }
  
    /**
     * creation timestamp of the invitation
     *
     */
    @JsonProperty("createdAt")
    public void setCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
    }
  
    public UserInvitation withCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
      return this;
    }
  
    /**
     * last updated timestamp of the invitation
     *
     */
    @JsonProperty("updatedAt")
    public Long getUpdatedAt() {
      return updatedAt;
    }
  
    /**
     * last updated timestamp of the invitation
     *
     */
    @JsonProperty("updatedAt")
    public void setUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
    }
  
    public UserInvitation withUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
      return this;
    }
  
    /**
     * Timestamp at which the invitation will expire (Required)
     *
     */
    @JsonProperty("expiresAt")
    public Long getExpiresAt() {
      return expiresAt;
    }
  
    /**
     * Timestamp at which the invitation will expire (Required)
     *
     */
    @JsonProperty("expiresAt")
    public void setExpiresAt(Long expiresAt) {
      this.expiresAt = expiresAt;
    }
  
    public UserInvitation withExpiresAt(Long expiresAt) {
      this.expiresAt = expiresAt;
      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 UserInvitation withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(UserInvitation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("id");
      sb.append('=');
      sb.append(((this.id == null) ? "<null>" : this.id));
      sb.append(',');
      sb.append("inviteCode");
      sb.append('=');
      sb.append(((this.inviteCode == null) ? "<null>" : this.inviteCode));
      sb.append(',');
      sb.append("inviterUserId");
      sb.append('=');
      sb.append(((this.inviterUserId == null) ? "<null>" : this.inviterUserId));
      sb.append(',');
      sb.append("invitedEmail");
      sb.append('=');
      sb.append(((this.invitedEmail == null) ? "<null>" : this.invitedEmail));
      sb.append(',');
      sb.append("acceptedByUserId");
      sb.append('=');
      sb.append(((this.acceptedByUserId == null) ? "<null>" : this.acceptedByUserId));
      sb.append(',');
      sb.append("scopeId");
      sb.append('=');
      sb.append(((this.scopeId == null) ? "<null>" : this.scopeId));
      sb.append(',');
      sb.append("scopeType");
      sb.append('=');
      sb.append(((this.scopeType == null) ? "<null>" : this.scopeType));
      sb.append(',');
      sb.append("permissionType");
      sb.append('=');
      sb.append(((this.permissionType == null) ? "<null>" : this.permissionType));
      sb.append(',');
      sb.append("status");
      sb.append('=');
      sb.append(((this.status == null) ? "<null>" : this.status));
      sb.append(',');
      sb.append("createdAt");
      sb.append('=');
      sb.append(((this.createdAt == null) ? "<null>" : this.createdAt));
      sb.append(',');
      sb.append("updatedAt");
      sb.append('=');
      sb.append(((this.updatedAt == null) ? "<null>" : this.updatedAt));
      sb.append(',');
      sb.append("expiresAt");
      sb.append('=');
      sb.append(((this.expiresAt == null) ? "<null>" : this.expiresAt));
      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.permissionType == null) ? 0 : this.permissionType.hashCode()));
      result = ((result * 31) + ((this.scopeId == null) ? 0 : this.scopeId.hashCode()));
      result = ((result * 31) + ((this.inviterUserId == null) ? 0 : this.inviterUserId.hashCode()));
      result = ((result * 31) + ((this.expiresAt == null) ? 0 : this.expiresAt.hashCode()));
      result = ((result * 31) + ((this.invitedEmail == null) ? 0 : this.invitedEmail.hashCode()));
      result = ((result * 31) + ((this.createdAt == null) ? 0 : this.createdAt.hashCode()));
      result = ((result * 31) + ((this.scopeType == null) ? 0 : this.scopeType.hashCode()));
      result = ((result * 31) + ((this.inviteCode == null) ? 0 : this.inviteCode.hashCode()));
      result = ((result * 31) + ((this.acceptedByUserId == null) ? 0 : this.acceptedByUserId.hashCode()));
      result = ((result * 31) + ((this.id == null) ? 0 : this.id.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.status == null) ? 0 : this.status.hashCode()));
      result = ((result * 31) + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof UserInvitation) == false) {
        return false;
      }
      UserInvitation rhs = ((UserInvitation) other);
      return (((((((((((((Objects.equals(this.permissionType, rhs.permissionType))
          && (Objects.equals(this.scopeId, rhs.scopeId)))
          && (Objects.equals(this.inviterUserId, rhs.inviterUserId)))
          && (Objects.equals(this.expiresAt, rhs.expiresAt)))
          && (Objects.equals(this.invitedEmail, rhs.invitedEmail)))
          && (Objects.equals(this.createdAt, rhs.createdAt)))
          && (Objects.equals(this.scopeType, rhs.scopeType)))
          && (Objects.equals(this.inviteCode, rhs.inviteCode)))
          && (Objects.equals(this.acceptedByUserId, rhs.acceptedByUserId)))
          && (Objects.equals(this.id, rhs.id)))
          && (Objects.equals(this.additionalProperties, rhs.additionalProperties)))
          && (Objects.equals(this.status, rhs.status)))
          && ((Objects.equals(this.updatedAt, rhs.updatedAt)) || ((this.updatedAt != null) && this.updatedAt.equals(rhs.updatedAt))));
    }
  
  }
  