package com.airlock.iam.admin.infrastructure.transfer.response.user;

import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.Date;

@JsonTypeName("user.account-link")
public class UserAccountLinkData {
   public static final String USER_ACCOUNT_LINK_TYPE = "user.account-link";
   @NotNull
   @Schema(description = "Subject of the associated provider.")
   private String accountSub;
   @Schema(description = "Optional account information of the user.")
   private String accountInfo;
   @NotNull
   @Schema(description = "Account link establishment date.")
   private Date establishedAt;

   @SuppressFBWarnings(justification = "generated code")
   public String getAccountSub() {
      return this.accountSub;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getAccountInfo() {
      return this.accountInfo;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Date getEstablishedAt() {
      return this.establishedAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAccountSub(String accountSub) {
      this.accountSub = accountSub;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAccountInfo(String accountInfo) {
      this.accountInfo = accountInfo;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setEstablishedAt(Date establishedAt) {
      this.establishedAt = establishedAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof UserAccountLinkData other)) {
         return false;
      } else {
         if (!other.canEqual(this)) {
            return false;
         }

         Object this$accountSub = this.accountSub;
         Object other$accountSub = other.accountSub;
         if (this$accountSub == null ? other$accountSub == null : this$accountSub.equals(other$accountSub)) {
            Object this$accountInfo = this.accountInfo;
            Object other$accountInfo = other.accountInfo;
            if (this$accountInfo == null ? other$accountInfo == null : this$accountInfo.equals(other$accountInfo)) {
               Object this$establishedAt = this.establishedAt;
               Object other$establishedAt = other.establishedAt;
               return this$establishedAt == null ? other$establishedAt == null : this$establishedAt.equals(other$establishedAt);
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   protected boolean canEqual(Object other) {
      return other instanceof UserAccountLinkData;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $accountSub = this.accountSub;
      result = result * 59 + ($accountSub == null ? 43 : $accountSub.hashCode());
      Object $accountInfo = this.accountInfo;
      result = result * 59 + ($accountInfo == null ? 43 : $accountInfo.hashCode());
      Object $establishedAt = this.establishedAt;
      return result * 59 + ($establishedAt == null ? 43 : $establishedAt.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "UserAccountLinkData(accountSub="
         + this.getAccountSub()
         + ", accountInfo="
         + this.getAccountInfo()
         + ", establishedAt="
         + this.getEstablishedAt()
         + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public UserAccountLinkData(String accountSub, String accountInfo, Date establishedAt) {
      this.accountSub = accountSub;
      this.accountInfo = accountInfo;
      this.establishedAt = establishedAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public UserAccountLinkData() {
   }
}
