
http4s-grpc.fs2.pubsub.grpc.internal.SchemaService.scala Maven / Gradle / Ivy
package fs2.pubsub.grpc.internal
import _root_.cats.syntax.all._
/** Service for doing schema-related operations.
*/
trait SchemaService[F[_]] {
/** Creates a schema.
*/
def createSchema(request: _root_.fs2.pubsub.grpc.internal.CreateSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema]
/** Gets a schema.
*/
def getSchema(request: _root_.fs2.pubsub.grpc.internal.GetSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema]
/** Lists schemas in a project.
*/
def listSchemas(request: _root_.fs2.pubsub.grpc.internal.ListSchemasRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ListSchemasResponse]
/** Lists all schema revisions for the named schema.
*/
def listSchemaRevisions(request: _root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsResponse]
/** Commits a new schema revision to an existing schema.
*/
def commitSchema(request: _root_.fs2.pubsub.grpc.internal.CommitSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema]
/** Creates a new schema revision that is a copy of the provided revision_id.
*/
def rollbackSchema(request: _root_.fs2.pubsub.grpc.internal.RollbackSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema]
/** Deletes a specific schema revision.
*/
def deleteSchemaRevision(request: _root_.fs2.pubsub.grpc.internal.DeleteSchemaRevisionRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema]
/** Deletes a schema.
*/
def deleteSchema(request: _root_.fs2.pubsub.grpc.internal.DeleteSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Empty]
/** Validates a schema.
*/
def validateSchema(request: _root_.fs2.pubsub.grpc.internal.ValidateSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ValidateSchemaResponse]
/** Validates a message against a schema.
*/
def validateMessage(request: _root_.fs2.pubsub.grpc.internal.ValidateMessageRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ValidateMessageResponse]
}
object SchemaService {
def fromClient[F[_]: _root_.cats.effect.kernel.Concurrent](client: _root_.org.http4s.client.Client[F], baseUri: _root_.org.http4s.Uri): SchemaService[F] = new _root_.fs2.pubsub.grpc.internal.SchemaService[F] {
def createSchema(request: _root_.fs2.pubsub.grpc.internal.CreateSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.CreateSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "CreateSchema")(client, baseUri)(request, ctx)
}
def getSchema(request: _root_.fs2.pubsub.grpc.internal.GetSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.GetSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "GetSchema")(client, baseUri)(request, ctx)
}
def listSchemas(request: _root_.fs2.pubsub.grpc.internal.ListSchemasRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ListSchemasResponse] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ListSchemasRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ListSchemasResponse), "google.pubsub.v1.SchemaService", "ListSchemas")(client, baseUri)(request, ctx)
}
def listSchemaRevisions(request: _root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsResponse] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ListSchemaRevisionsResponse), "google.pubsub.v1.SchemaService", "ListSchemaRevisions")(client, baseUri)(request, ctx)
}
def commitSchema(request: _root_.fs2.pubsub.grpc.internal.CommitSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.CommitSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "CommitSchema")(client, baseUri)(request, ctx)
}
def rollbackSchema(request: _root_.fs2.pubsub.grpc.internal.RollbackSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.RollbackSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "RollbackSchema")(client, baseUri)(request, ctx)
}
def deleteSchemaRevision(request: _root_.fs2.pubsub.grpc.internal.DeleteSchemaRevisionRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Schema] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.DeleteSchemaRevisionRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "DeleteSchemaRevision")(client, baseUri)(request, ctx)
}
def deleteSchema(request: _root_.fs2.pubsub.grpc.internal.DeleteSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.Empty] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.DeleteSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.Empty), "google.pubsub.v1.SchemaService", "DeleteSchema")(client, baseUri)(request, ctx)
}
def validateSchema(request: _root_.fs2.pubsub.grpc.internal.ValidateSchemaRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ValidateSchemaResponse] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ValidateSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ValidateSchemaResponse), "google.pubsub.v1.SchemaService", "ValidateSchema")(client, baseUri)(request, ctx)
}
def validateMessage(request: _root_.fs2.pubsub.grpc.internal.ValidateMessageRequest, ctx: _root_.org.http4s.Headers): F[_root_.fs2.pubsub.grpc.internal.ValidateMessageResponse] = {
_root_.org.http4s.grpc.ClientGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ValidateMessageRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(_root_.fs2.pubsub.grpc.internal.ValidateMessageResponse), "google.pubsub.v1.SchemaService", "ValidateMessage")(client, baseUri)(request, ctx)
}
}
def toRoutes[F[_]: _root_.cats.effect.kernel.Temporal](serviceImpl: _root_.fs2.pubsub.grpc.internal.SchemaService[F]): _root_.org.http4s.HttpRoutes[F] = {
_root_.org.http4s.HttpRoutes.empty[F]
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.CreateSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "CreateSchema")(serviceImpl.createSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.GetSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "GetSchema")(serviceImpl.getSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ListSchemasRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ListSchemasResponse), "google.pubsub.v1.SchemaService", "ListSchemas")(serviceImpl.listSchemas(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ListSchemaRevisionsRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ListSchemaRevisionsResponse), "google.pubsub.v1.SchemaService", "ListSchemaRevisions")(serviceImpl.listSchemaRevisions(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.CommitSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "CommitSchema")(serviceImpl.commitSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.RollbackSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "RollbackSchema")(serviceImpl.rollbackSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.DeleteSchemaRevisionRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Schema), "google.pubsub.v1.SchemaService", "DeleteSchemaRevision")(serviceImpl.deleteSchemaRevision(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.DeleteSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.Empty), "google.pubsub.v1.SchemaService", "DeleteSchema")(serviceImpl.deleteSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ValidateSchemaRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ValidateSchemaResponse), "google.pubsub.v1.SchemaService", "ValidateSchema")(serviceImpl.validateSchema(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.unaryToUnary(_root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ValidateMessageRequest), _root_.org.http4s.grpc.codecs.ScalaPb.codecForGenerated(fs2.pubsub.grpc.internal.ValidateMessageResponse), "google.pubsub.v1.SchemaService", "ValidateMessage")(serviceImpl.validateMessage(_, _)))
.combineK(_root_.org.http4s.grpc.ServerGrpc.methodNotFoundRoute("google.pubsub.v1.SchemaService"))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy