package com.airlock.iam.authentication.infrastructure.transfer.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nullable;

@JsonTypeName("authentication.selection.option")
public final class SelectionOptionData {
   public static final String SELECTION_OPTION_TYPE = "authentication.selection.option";
   @JsonInclude(Include.NON_DEFAULT)
   @Nullable
   @Schema(description = "Flag indicating whether this selection was last selected. This flag is only sent if true.")
   private final Boolean lastSelected;

   @SuppressFBWarnings(justification = "generated code")
   public SelectionOptionData(@Nullable Boolean lastSelected) {
      this.lastSelected = lastSelected;
   }

   @Nullable
   @SuppressFBWarnings(justification = "generated code")
   public Boolean getLastSelected() {
      return this.lastSelected;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "SelectionOptionData(lastSelected=" + this.getLastSelected() + ")";
   }
}
