package com.octaldata.session.pulsar

import com.octaldata.domain.DeploymentConnectionConfig
import com.octaldata.domain.DeploymentId
import com.octaldata.domain.DeploymentName
import com.octaldata.session.AclOps
import com.octaldata.session.BookiesOps
import com.octaldata.session.ConsumerOps
import com.octaldata.session.DeploymentOps
import com.octaldata.session.FunctionOps
import com.octaldata.session.NamespaceOps
import com.octaldata.session.NoopConsumerOps
import com.octaldata.session.RecordOps
import com.octaldata.session.Session
import com.octaldata.session.SubscriptionOps
import com.octaldata.session.TenantOps
import com.octaldata.session.TopicOps

class PulsarSession(
   private val id: DeploymentId,
   private val name: DeploymentName,
   private val config: DeploymentConnectionConfig.Pulsar
) : Session {

   override fun consumers(): ConsumerOps = NoopConsumerOps
   override fun deployment(): DeploymentOps = PulsarDeploymentOps(id, name, config)
   override fun records(): RecordOps = PulsarRecordOps(id, name, config)
   override fun topics(): TopicOps = PulsarTopicOps(config)
   override fun acl(): AclOps = TODO()
   override fun namespaces(): NamespaceOps = PulsarNamespaceOps(config)
   override fun tenants(): TenantOps = PulsarTenantOps(config)
   override fun functions(): FunctionOps = PulsarFunctionOps(config)
   override fun subscriptions(): SubscriptionOps = PulsarSubscriptionOps(config)
   override fun bookies(): BookiesOps = PulsarBookiesOps(config)
}