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.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

@JsonTypeName("subscription")
public final class SubscriptionCreateRequest {
   @NotNull
   @Schema(
      description = "Human-readable name of the subscription. 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;

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof SubscriptionCreateRequest other)) {
         return false;
      } else {
         Object this$displayName = this.displayName;
         Object other$displayName = other.displayName;
         return this$displayName == null ? other$displayName == null : this$displayName.equals(other$displayName);
      }
   }

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

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

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

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