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

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

@JsonTypeName("technical-client-registration.goto-target")
public final class TechClientRegGotoTargetAttributesData {
   public static final String JSON_API_RESOURCE_TYPE = "technical-client-registration.goto-target";
   @Schema(description = "Whether an interactive goto to this target is treated as a failure (e.g. failed attempt counters are increased if applicable).")
   private final boolean treatedAsFailure;

   @SuppressFBWarnings(justification = "generated code")
   public TechClientRegGotoTargetAttributesData(boolean treatedAsFailure) {
      this.treatedAsFailure = treatedAsFailure;
   }

   @SuppressFBWarnings(justification = "generated code")
   public boolean isTreatedAsFailure() {
      return this.treatedAsFailure;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      return result * 59 + (this.treatedAsFailure ? 79 : 97);
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "TechClientRegGotoTargetAttributesData(treatedAsFailure=" + this.isTreatedAsFailure() + ")";
   }
}
