package com.airlock.iam.admin.infrastructure.transfer.request.techclient;

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

@JsonTypeName("tech-client")
public class PlainTechClientCreateRequest {
   @NotNull
   @Schema(
      description = "Human-readable name of the technical client. The name does not have to be unique and must be between 1 and 100 characters.",
      minLength = 1,
      maxLength = 100
   )
   @Size(min = 1, max = 100)
   private String displayName;
   @Nullable
   @Schema(description = "Description of the technical client. If present, must be between 1 and 100 characters.", minLength = 1, maxLength = 100)
   @Size(min = 1, max = 100)
   private String description;
   @Nullable
   @Schema(description = "Label of the technical client. If present, must be between 1 and 100 characters.", minLength = 1, maxLength = 100)
   @Size(min = 1, max = 100)
   private String label;

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

   @Nullable
   @SuppressFBWarnings(justification = "generated code")
   public String getDescription() {
      return this.description;
   }

   @Nullable
   @SuppressFBWarnings(justification = "generated code")
   public String getLabel() {
      return this.label;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public void setDescription(@Nullable String description) {
      this.description = description;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setLabel(@Nullable String label) {
      this.label = label;
   }

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

         Object this$displayName = this.displayName;
         Object other$displayName = other.displayName;
         if (this$displayName == null ? other$displayName == null : this$displayName.equals(other$displayName)) {
            Object this$description = this.description;
            Object other$description = other.description;
            if (this$description == null ? other$description == null : this$description.equals(other$description)) {
               Object this$label = this.label;
               Object other$label = other.label;
               return this$label == null ? other$label == null : this$label.equals(other$label);
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PlainTechClientCreateRequest(displayName="
         + this.getDisplayName()
         + ", description="
         + this.getDescription()
         + ", label="
         + this.getLabel()
         + ")";
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public PlainTechClientCreateRequest(String displayName, @Nullable String description, @Nullable String label) {
      this.displayName = displayName;
      this.description = description;
      this.label = label;
   }
}
