package com.airlock.iam.flow.domain.model.dynamicactivation;

import com.airlock.iam.flow.api.domain.model.step.StepId;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public final class DynamicStepActivationInformation {
   private final StepId stepId;
   private final boolean activatable;
   private final boolean deactivatable;
   private final boolean activated;

   @SuppressFBWarnings(justification = "generated code")
   DynamicStepActivationInformation(StepId stepId, boolean activatable, boolean deactivatable, boolean activated) {
      this.stepId = stepId;
      this.activatable = activatable;
      this.deactivatable = deactivatable;
      this.activated = activated;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static DynamicStepActivationInformation.DynamicStepActivationInformationBuilder builder() {
      return new DynamicStepActivationInformation.DynamicStepActivationInformationBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public StepId getStepId() {
      return this.stepId;
   }

   @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 DynamicStepActivationInformation other)) {
         return false;
      } else {
         if (this.activatable != other.activatable) {
            return false;
         }

         if (this.deactivatable != other.deactivatable) {
            return false;
         }

         if (this.activated != other.activated) {
            return false;
         }

         Object this$stepId = this.stepId;
         Object other$stepId = other.stepId;
         return this$stepId == null ? other$stepId == null : this$stepId.equals(other$stepId);
      }
   }

   @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);
      result = result * 59 + (this.activated ? 79 : 97);
      Object $stepId = this.stepId;
      return result * 59 + ($stepId == null ? 43 : $stepId.hashCode());
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public static class DynamicStepActivationInformationBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private StepId stepId;
      @SuppressFBWarnings(justification = "generated code")
      private boolean activatable;
      @SuppressFBWarnings(justification = "generated code")
      private boolean deactivatable;
      @SuppressFBWarnings(justification = "generated code")
      private boolean activated;

      @SuppressFBWarnings(justification = "generated code")
      DynamicStepActivationInformationBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public DynamicStepActivationInformation.DynamicStepActivationInformationBuilder stepId(StepId stepId) {
         this.stepId = stepId;
         return this;
      }

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

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

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

      @SuppressFBWarnings(justification = "generated code")
      public DynamicStepActivationInformation build() {
         return new DynamicStepActivationInformation(this.stepId, this.activatable, this.deactivatable, this.activated);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "DynamicStepActivationInformation.DynamicStepActivationInformationBuilder(stepId="
            + this.stepId
            + ", activatable="
            + this.activatable
            + ", deactivatable="
            + this.deactivatable
            + ", activated="
            + this.activated
            + ")";
      }
   }
}
