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

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.Date;
import java.util.Set;

public class UserAuthenticationMethodMigrationRequest {
   @ArraySchema(
      arraySchema = @Schema(
         description = "The authentication methods to migrate to such as: <ul> <li>AIRLOCK_2FA</li> <li>VASCO</li> <li>CRONTO</li> <li>SECURID</li> <li>MTAN</li> <li>OATH_OTP</li> <li>MATRIX</li> <li>EMAILOTP</li> <li>CERT</li> <li>BINDING_TOKEN</li> <li>...</li> </ul> ."
      ),
      minItems = 1
   )
   @NotNull
   @Size(min = 1, max = 100)
   private Set<String> nextMethods;
   @Nullable
   @Schema(description = "The date and time until which the migration has to be done - if omitted, there is no deadline for the migration.")
   private Date migrateUntil;

   @SuppressFBWarnings(justification = "generated code")
   public Set<String> getNextMethods() {
      return this.nextMethods;
   }

   @Nullable
   @SuppressFBWarnings(justification = "generated code")
   public Date getMigrateUntil() {
      return this.migrateUntil;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setNextMethods(Set<String> nextMethods) {
      this.nextMethods = nextMethods;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setMigrateUntil(@Nullable Date migrateUntil) {
      this.migrateUntil = migrateUntil;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof UserAuthenticationMethodMigrationRequest other)) {
         return false;
      } else if (!other.canEqual(this)) {
         return false;
      } else {
         Object this$nextMethods = this.nextMethods;
         Object other$nextMethods = other.nextMethods;
         if (this$nextMethods == null ? other$nextMethods == null : this$nextMethods.equals(other$nextMethods)) {
            Object this$migrateUntil = this.migrateUntil;
            Object other$migrateUntil = other.migrateUntil;
            return this$migrateUntil == null ? other$migrateUntil == null : this$migrateUntil.equals(other$migrateUntil);
         } else {
            return false;
         }
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "UserAuthenticationMethodMigrationRequest(nextMethods=" + this.getNextMethods() + ", migrateUntil=" + this.getMigrateUntil() + ")";
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public UserAuthenticationMethodMigrationRequest(Set<String> nextMethods, @Nullable Date migrateUntil) {
      this.nextMethods = nextMethods;
      this.migrateUntil = migrateUntil;
   }
}
