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

import com.airlock.iam.admin.application.service.permission.AdminappPermissions;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import jakarta.annotation.Nonnull;

public class AdminappData {
   @Nonnull
   private AdminData admin;
   @Nonnull
   private AdminappSystem system;
   @Nonnull
   private AdminappPermissions permissions;

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

   @Nonnull
   @SuppressFBWarnings(justification = "generated code")
   public AdminData getAdmin() {
      return this.admin;
   }

   @Nonnull
   @SuppressFBWarnings(justification = "generated code")
   public AdminappSystem getSystem() {
      return this.system;
   }

   @Nonnull
   @SuppressFBWarnings(justification = "generated code")
   public AdminappPermissions getPermissions() {
      return this.permissions;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAdmin(@Nonnull AdminData admin) {
      if (admin == null) {
         throw new NullPointerException("admin is marked non-null but is null");
      }

      this.admin = admin;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setSystem(@Nonnull AdminappSystem system) {
      if (system == null) {
         throw new NullPointerException("system is marked non-null but is null");
      }

      this.system = system;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setPermissions(@Nonnull AdminappPermissions permissions) {
      if (permissions == null) {
         throw new NullPointerException("permissions is marked non-null but is null");
      }

      this.permissions = permissions;
   }

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

         Object this$admin = this.admin;
         Object other$admin = other.admin;
         if (this$admin == null ? other$admin == null : this$admin.equals(other$admin)) {
            Object this$system = this.system;
            Object other$system = other.system;
            if (this$system == null ? other$system == null : this$system.equals(other$system)) {
               Object this$permissions = this.permissions;
               Object other$permissions = other.permissions;
               return this$permissions == null ? other$permissions == null : this$permissions.equals(other$permissions);
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "AdminappData(admin=" + this.getAdmin() + ", system=" + this.getSystem() + ", permissions=" + this.getPermissions() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public AdminappData(@Nonnull AdminData admin, @Nonnull AdminappSystem system, @Nonnull AdminappPermissions permissions) {
      if (admin == null) {
         throw new NullPointerException("admin is marked non-null but is null");
      }

      if (system == null) {
         throw new NullPointerException("system is marked non-null but is null");
      }

      if (permissions == null) {
         throw new NullPointerException("permissions is marked non-null but is null");
      }

      this.admin = admin;
      this.system = system;
      this.permissions = permissions;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public static class AdminappDataBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private AdminData admin;
      @SuppressFBWarnings(justification = "generated code")
      private AdminappSystem system;
      @SuppressFBWarnings(justification = "generated code")
      private AdminappPermissions permissions;

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

      @SuppressFBWarnings(justification = "generated code")
      public AdminappData.AdminappDataBuilder admin(@Nonnull AdminData admin) {
         if (admin == null) {
            throw new NullPointerException("admin is marked non-null but is null");
         }

         this.admin = admin;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminappData.AdminappDataBuilder system(@Nonnull AdminappSystem system) {
         if (system == null) {
            throw new NullPointerException("system is marked non-null but is null");
         }

         this.system = system;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminappData.AdminappDataBuilder permissions(@Nonnull AdminappPermissions permissions) {
         if (permissions == null) {
            throw new NullPointerException("permissions is marked non-null but is null");
         }

         this.permissions = permissions;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminappData build() {
         return new AdminappData(this.admin, this.system, this.permissions);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "AdminappData.AdminappDataBuilder(admin=" + this.admin + ", system=" + this.system + ", permissions=" + this.permissions + ")";
      }
   }
}
