package com.airlock.iam.admin.application.service.settings;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.List;

public class AdminDetailSettings implements Settings {
   private List<String> lockReasons;
   private List<String> availableRoles;
   private List<UserProfileItemSettings> adminProfileItems;
   private String superAdminRole;
   private boolean enforceRoleCombinations;

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

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getLockReasons() {
      return this.lockReasons;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getAvailableRoles() {
      return this.availableRoles;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<UserProfileItemSettings> getAdminProfileItems() {
      return this.adminProfileItems;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getSuperAdminRole() {
      return this.superAdminRole;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public void setLockReasons(List<String> lockReasons) {
      this.lockReasons = lockReasons;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAvailableRoles(List<String> availableRoles) {
      this.availableRoles = availableRoles;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAdminProfileItems(List<UserProfileItemSettings> adminProfileItems) {
      this.adminProfileItems = adminProfileItems;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setSuperAdminRole(String superAdminRole) {
      this.superAdminRole = superAdminRole;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setEnforceRoleCombinations(boolean enforceRoleCombinations) {
      this.enforceRoleCombinations = enforceRoleCombinations;
   }

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

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

         Object this$lockReasons = this.lockReasons;
         Object other$lockReasons = other.lockReasons;
         if (this$lockReasons == null ? other$lockReasons == null : this$lockReasons.equals(other$lockReasons)) {
            Object this$availableRoles = this.availableRoles;
            Object other$availableRoles = other.availableRoles;
            if (this$availableRoles == null ? other$availableRoles == null : this$availableRoles.equals(other$availableRoles)) {
               Object this$adminProfileItems = this.adminProfileItems;
               Object other$adminProfileItems = other.adminProfileItems;
               if (this$adminProfileItems == null ? other$adminProfileItems == null : this$adminProfileItems.equals(other$adminProfileItems)) {
                  Object this$superAdminRole = this.superAdminRole;
                  Object other$superAdminRole = other.superAdminRole;
                  return this$superAdminRole == null ? other$superAdminRole == null : this$superAdminRole.equals(other$superAdminRole);
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      result = result * 59 + (this.enforceRoleCombinations ? 79 : 97);
      Object $lockReasons = this.lockReasons;
      result = result * 59 + ($lockReasons == null ? 43 : $lockReasons.hashCode());
      Object $availableRoles = this.availableRoles;
      result = result * 59 + ($availableRoles == null ? 43 : $availableRoles.hashCode());
      Object $adminProfileItems = this.adminProfileItems;
      result = result * 59 + ($adminProfileItems == null ? 43 : $adminProfileItems.hashCode());
      Object $superAdminRole = this.superAdminRole;
      return result * 59 + ($superAdminRole == null ? 43 : $superAdminRole.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "AdminDetailSettings(lockReasons="
         + this.getLockReasons()
         + ", availableRoles="
         + this.getAvailableRoles()
         + ", adminProfileItems="
         + this.getAdminProfileItems()
         + ", superAdminRole="
         + this.getSuperAdminRole()
         + ", enforceRoleCombinations="
         + this.isEnforceRoleCombinations()
         + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public AdminDetailSettings(
      List<String> lockReasons,
      List<String> availableRoles,
      List<UserProfileItemSettings> adminProfileItems,
      String superAdminRole,
      boolean enforceRoleCombinations
   ) {
      this.lockReasons = lockReasons;
      this.availableRoles = availableRoles;
      this.adminProfileItems = adminProfileItems;
      this.superAdminRole = superAdminRole;
      this.enforceRoleCombinations = enforceRoleCombinations;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public static class AdminDetailSettingsBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private List<String> lockReasons;
      @SuppressFBWarnings(justification = "generated code")
      private List<String> availableRoles;
      @SuppressFBWarnings(justification = "generated code")
      private List<UserProfileItemSettings> adminProfileItems;
      @SuppressFBWarnings(justification = "generated code")
      private String superAdminRole;
      @SuppressFBWarnings(justification = "generated code")
      private boolean enforceRoleCombinations;

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

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings.AdminDetailSettingsBuilder lockReasons(List<String> lockReasons) {
         this.lockReasons = lockReasons;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings.AdminDetailSettingsBuilder availableRoles(List<String> availableRoles) {
         this.availableRoles = availableRoles;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings.AdminDetailSettingsBuilder adminProfileItems(List<UserProfileItemSettings> adminProfileItems) {
         this.adminProfileItems = adminProfileItems;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings.AdminDetailSettingsBuilder superAdminRole(String superAdminRole) {
         this.superAdminRole = superAdminRole;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings.AdminDetailSettingsBuilder enforceRoleCombinations(boolean enforceRoleCombinations) {
         this.enforceRoleCombinations = enforceRoleCombinations;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminDetailSettings build() {
         return new AdminDetailSettings(this.lockReasons, this.availableRoles, this.adminProfileItems, this.superAdminRole, this.enforceRoleCombinations);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "AdminDetailSettings.AdminDetailSettingsBuilder(lockReasons="
            + this.lockReasons
            + ", availableRoles="
            + this.availableRoles
            + ", adminProfileItems="
            + this.adminProfileItems
            + ", superAdminRole="
            + this.superAdminRole
            + ", enforceRoleCombinations="
            + this.enforceRoleCombinations
            + ")";
      }
   }
}
