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

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("externalization.context")
public class ExternalizationContextData {
   public static final String EXTERNALIZATION_CONTEXT_TYPE = "externalization.context";
   @NotNull
   @Schema(description = "A value containing information that is necessary for restoring a context on the server.")
   private String context;

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

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

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

         Object this$context = this.context;
         Object other$context = other.context;
         return this$context == null ? other$context == null : this$context.equals(other$context);
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "ExternalizationContextData(context=" + this.getContext() + ")";
   }

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

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