package com.airlock.iam.admin.infrastructure.transfer.response.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;

@JsonTypeName("plan-usage")
public final class PlanUsageData {
   @NotNull
   @Schema(description = "Name of the Plan-Usage.")
   private String name;
   @Schema(description = "Rate limit of the Plan-Usage (requests / second).")
   private Integer rateLimit;

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

   @SuppressFBWarnings(justification = "generated code")
   public Integer getRateLimit() {
      return this.rateLimit;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public void setRateLimit(Integer rateLimit) {
      this.rateLimit = rateLimit;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PlanUsageData(name=" + this.getName() + ", rateLimit=" + this.getRateLimit() + ")";
   }
}
