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

import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.Set;

@JsonTypeName("system")
public class SystemData {
   public static final String SYSTEM_TYPE = "system";
   @NotNull
   @Schema(description = "The system's Java version.")
   private String javaVersion;
   @NotNull
   @Schema(description = "The system's operating system.")
   private String operatingSystem;
   @ArraySchema(arraySchema = @Schema(description = "The system's MAC addresses."))
   private Set<String> macAddresses;

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

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

   @SuppressFBWarnings(justification = "generated code")
   public Set<String> getMacAddresses() {
      return this.macAddresses;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   public void setMacAddresses(Set<String> macAddresses) {
      this.macAddresses = macAddresses;
   }

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

         Object this$javaVersion = this.javaVersion;
         Object other$javaVersion = other.javaVersion;
         if (this$javaVersion == null ? other$javaVersion == null : this$javaVersion.equals(other$javaVersion)) {
            Object this$operatingSystem = this.operatingSystem;
            Object other$operatingSystem = other.operatingSystem;
            if (this$operatingSystem == null ? other$operatingSystem == null : this$operatingSystem.equals(other$operatingSystem)) {
               Object this$macAddresses = this.macAddresses;
               Object other$macAddresses = other.macAddresses;
               return this$macAddresses == null ? other$macAddresses == null : this$macAddresses.equals(other$macAddresses);
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "SystemData(javaVersion="
         + this.getJavaVersion()
         + ", operatingSystem="
         + this.getOperatingSystem()
         + ", macAddresses="
         + this.getMacAddresses()
         + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public SystemData(String javaVersion, String operatingSystem, Set<String> macAddresses) {
      this.javaVersion = javaVersion;
      this.operatingSystem = operatingSystem;
      this.macAddresses = macAddresses;
   }

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