use noodles_core::Region;
use super::Format;
use crate::{
request::{self, Class},
Response,
};
pub struct Builder {
inner: request::Builder,
}
impl Builder {
pub(crate) fn new(inner: request::Builder) -> Self {
Self { inner }
}
pub fn set_format(mut self, format: Format) -> Self {
self.inner = self.inner.set_format(format.into());
self
}
pub fn set_class(mut self, class: Class) -> Self {
self.inner = self.inner.set_class(class);
self
}
pub fn add_region(mut self, region: Region) -> Self {
self.inner = self.inner.add_region(region);
self
}
pub async fn send(self) -> crate::Result<Response> {
self.inner.send().await
}
}