package com.sun.identity.saml2.profile;

import com.sun.identity.saml2.assertion.NameID;
import java.io.Serializable;
import java.util.Objects;

public class NameIDandSPpair implements Serializable {
   private final NameID nameID;
   private final String spEntityID;

   public NameIDandSPpair(NameID nameID, String spEntityID) {
      this.nameID = Objects.requireNonNull(nameID, "nameID is null");
      this.spEntityID = Objects.requireNonNull(spEntityID, "spEntityID is null");
   }

   public String getSPEntityID() {
      return this.spEntityID;
   }

   public NameID getNameID() {
      return this.nameID;
   }

   @Override
   public String toString() {
      return this.getClass().getSimpleName() + "[nameID=" + this.nameID.getValue() + ", spEntityID=" + this.spEntityID + "]";
   }
}
