1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the Amazon Web Services accounts that have been granted permission to use a shared image. For more information about sharing images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/share-custom-image.html"> Share or Unshare a Custom WorkSpaces Image</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImagePermission {
    /// <p>The identifier of the Amazon Web Services account that an image has been shared with.</p>
    pub shared_account_id: ::std::option::Option<::std::string::String>,
}
impl ImagePermission {
    /// <p>The identifier of the Amazon Web Services account that an image has been shared with.</p>
    pub fn shared_account_id(&self) -> ::std::option::Option<&str> {
        self.shared_account_id.as_deref()
    }
}
impl ImagePermission {
    /// Creates a new builder-style object to manufacture [`ImagePermission`](crate::types::ImagePermission).
    pub fn builder() -> crate::types::builders::ImagePermissionBuilder {
        crate::types::builders::ImagePermissionBuilder::default()
    }
}

/// A builder for [`ImagePermission`](crate::types::ImagePermission).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ImagePermissionBuilder {
    pub(crate) shared_account_id: ::std::option::Option<::std::string::String>,
}
impl ImagePermissionBuilder {
    /// <p>The identifier of the Amazon Web Services account that an image has been shared with.</p>
    pub fn shared_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.shared_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Web Services account that an image has been shared with.</p>
    pub fn set_shared_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.shared_account_id = input;
        self
    }
    /// <p>The identifier of the Amazon Web Services account that an image has been shared with.</p>
    pub fn get_shared_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.shared_account_id
    }
    /// Consumes the builder and constructs a [`ImagePermission`](crate::types::ImagePermission).
    pub fn build(self) -> crate::types::ImagePermission {
        crate::types::ImagePermission {
            shared_account_id: self.shared_account_id,
        }
    }
}