use cortexa_aws_core::client::{AwsClient, AwsServiceClient};
use cortexa_aws_core::transport::{DefaultRuntime, Runtime};
#[derive(Debug)]
#[repr(transparent)]
pub struct AppstreamClient<R: Runtime = DefaultRuntime> {
client: AwsClient<R>,
}
impl<R: Runtime> Clone for AppstreamClient<R> {
fn clone(&self) -> Self {
Self {
client: self.client.clone(),
}
}
}
impl<R: Runtime> AppstreamClient<R> {
#[must_use]
pub const fn new(client: AwsClient<R>) -> Self {
Self { client }
}
#[must_use]
pub const fn client(&self) -> &AwsClient<R> {
&self.client
}
#[must_use]
pub fn ops(&self) -> crate::generated::GeneratedClient<R> {
crate::generated::GeneratedClient::new(self.client.clone())
}
}
impl<R: Runtime> AwsServiceClient<R> for AppstreamClient<R> {
const SERVICE_NAME: &'static str = "appstream";
fn from_client(client: AwsClient<R>) -> Self {
Self::new(client)
}
fn client(&self) -> &AwsClient<R> {
&self.client
}
}