use crate::client::TrellisClientError;
pub struct StateClient<'a> {
inner: &'a crate::client::TrellisClient,
}
impl<'a> StateClient<'a> {
pub fn new(inner: &'a crate::client::TrellisClient) -> Self {
Self { inner }
}
#[allow(dead_code)]
pub(crate) fn inner(&self) -> &'a crate::client::TrellisClient {
self.inner
}
pub fn rpc(&self) -> Rpc<'a> {
Rpc { _inner: self.inner }
}
pub fn event(&self) -> Event<'a> {
Event { _inner: self.inner }
}
pub fn feed(&self) -> Feed<'a> {
Feed { _inner: self.inner }
}
pub fn operation(&self) -> Operation<'a> {
Operation { _inner: self.inner }
}
}
pub struct Rpc<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Rpc<'a> {
pub fn state(&self) -> StateRpc<'a> {
StateRpc { inner: self._inner }
}
}
pub struct StateRpc<'a> {
inner: &'a crate::client::TrellisClient,
}
impl<'a> StateRpc<'a> {
pub async fn admin_delete(
&self,
input: &super::types::StateAdminDeleteRequest,
) -> Result<super::types::StateAdminDeleteResponse, TrellisClientError> {
self.inner
.call::<super::rpc::StateAdminDeleteRpc>(input)
.await
}
pub async fn admin_get(
&self,
input: &super::types::StateAdminGetRequest,
) -> Result<super::types::StateAdminGetResponse, TrellisClientError> {
self.inner.call::<super::rpc::StateAdminGetRpc>(input).await
}
pub async fn admin_list(
&self,
input: &super::types::StateAdminListRequest,
) -> Result<super::types::StateAdminListResponse, TrellisClientError> {
self.inner
.call::<super::rpc::StateAdminListRpc>(input)
.await
}
pub async fn delete(
&self,
input: &super::types::StateDeleteRequest,
) -> Result<super::types::StateDeleteResponse, TrellisClientError> {
self.inner.call::<super::rpc::StateDeleteRpc>(input).await
}
pub async fn get(
&self,
input: &super::types::StateGetRequest,
) -> Result<super::types::StateGetResponse, TrellisClientError> {
self.inner.call::<super::rpc::StateGetRpc>(input).await
}
pub async fn list(
&self,
input: &super::types::StateListRequest,
) -> Result<super::types::StateListResponse, TrellisClientError> {
self.inner.call::<super::rpc::StateListRpc>(input).await
}
pub async fn put(
&self,
input: &super::types::StatePutRequest,
) -> Result<super::types::StatePutResponse, TrellisClientError> {
self.inner.call::<super::rpc::StatePutRpc>(input).await
}
}
pub struct Event<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Event<'a> {}
pub struct Feed<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Feed<'a> {}
pub struct Operation<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Operation<'a> {}