package com.airlock.iam.common.domain.model.sms;

import com.airlock.iam.common.domain.model.locale.ResourceKey;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public final class SmsMessageTemplate {
   private final ResourceKey keyForMessage;
   private final SmsOriginator originator;

   public static SmsMessageTemplate smsMessageTemplate(ResourceKey key, SmsOriginator originator) {
      return new SmsMessageTemplate(key, originator);
   }

   @SuppressFBWarnings(justification = "generated code")
   public ResourceKey getKeyForMessage() {
      return this.keyForMessage;
   }

   @SuppressFBWarnings(justification = "generated code")
   public SmsOriginator getOriginator() {
      return this.originator;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "SmsMessageTemplate(keyForMessage=" + this.getKeyForMessage() + ", originator=" + this.getOriginator() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   private SmsMessageTemplate(ResourceKey keyForMessage, SmsOriginator originator) {
      this.keyForMessage = keyForMessage;
      this.originator = originator;
   }
}
