package com.airlock.iam.oauth2.domain.model.token;

import com.airlock.iam.oauth2.api.domain.model.OAuth2Scope;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Set;
import lombok.NonNull;

public record RefreshTokenInfo(@NonNull Set<OAuth2Scope> scopes, @NonNull LinkedTokenReference accessTokenReference) {
   @SuppressFBWarnings(justification = "generated code")
   public RefreshTokenInfo {
      if (scopes == null) {
         throw new NullPointerException("scopes is marked non-null but is null");
      }

      if (accessTokenReference == null) {
         throw new NullPointerException("accessTokenReference is marked non-null but is null");
      }
   }
}
