cortexa_aws_appstream/
client.rs1use cortexa_aws_core::client::{AwsClient, AwsServiceClient};
4use cortexa_aws_core::transport::{DefaultRuntime, Runtime};
5
6#[derive(Debug)]
8#[repr(transparent)]
9pub struct AppstreamClient<R: Runtime = DefaultRuntime> {
10 client: AwsClient<R>,
11}
12
13impl<R: Runtime> Clone for AppstreamClient<R> {
14 fn clone(&self) -> Self {
15 Self {
16 client: self.client.clone(),
17 }
18 }
19}
20
21impl<R: Runtime> AppstreamClient<R> {
22 #[must_use]
24 pub const fn new(client: AwsClient<R>) -> Self {
25 Self { client }
26 }
27
28 #[must_use]
30 pub const fn client(&self) -> &AwsClient<R> {
31 &self.client
32 }
33
34 #[must_use]
36 pub fn ops(&self) -> crate::generated::GeneratedClient<R> {
37 crate::generated::GeneratedClient::new(self.client.clone())
38 }
39}
40
41impl<R: Runtime> AwsServiceClient<R> for AppstreamClient<R> {
42 const SERVICE_NAME: &'static str = "appstream";
43
44 fn from_client(client: AwsClient<R>) -> Self {
45 Self::new(client)
46 }
47
48 fn client(&self) -> &AwsClient<R> {
49 &self.client
50 }
51}