package com.airlock.iam.authentication.infrastructure.transfer.request;

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

public final class OptionalForwardLocationAccessRequest {
   @Nullable
   @Schema(
      description = "The optional forward location to be used for identity propagation (ignored for application selection).",
      minLength = 1,
      maxLength = 100000
   )
   @Size(min = 1, max = 100000)
   private String location;

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OptionalForwardLocationAccessRequest(location=" + this.getLocation() + ")";
   }
}
