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.dynamic-step")
public final class TechClientRegDynamicStepActivationData {
   public static final String JSON_API_RESOURCE_TYPE = "technical-client-registration.dynamic-step";
   @Schema(description = "Whether this step is activatable from the current step.")
   private final boolean activatable;
   @Schema(description = "Whether this step is deactivatable from the current step.")
   private final boolean deactivatable;
   @Schema(description = "Whether this step is currently activated.")
   private final boolean activated;

   @SuppressFBWarnings(justification = "generated code")
   public TechClientRegDynamicStepActivationData(boolean activatable, boolean deactivatable, boolean activated) {
      this.activatable = activatable;
      this.deactivatable = deactivatable;
      this.activated = activated;
   }

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

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "TechClientRegDynamicStepActivationData(activatable="
         + this.isActivatable()
         + ", deactivatable="
         + this.isDeactivatable()
         + ", activated="
         + this.isActivated()
         + ")";
   }
}
