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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the permissions for an image. </p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImagePermissions {
    /// <p>Indicates whether the image can be used for a fleet.</p>
    pub allow_fleet: ::std::option::Option<bool>,
    /// <p>Indicates whether the image can be used for an image builder.</p>
    pub allow_image_builder: ::std::option::Option<bool>,
}
impl ImagePermissions {
    /// <p>Indicates whether the image can be used for a fleet.</p>
    pub fn allow_fleet(&self) -> ::std::option::Option<bool> {
        self.allow_fleet
    }
    /// <p>Indicates whether the image can be used for an image builder.</p>
    pub fn allow_image_builder(&self) -> ::std::option::Option<bool> {
        self.allow_image_builder
    }
}
impl ImagePermissions {
    /// Creates a new builder-style object to manufacture [`ImagePermissions`](crate::types::ImagePermissions).
    pub fn builder() -> crate::types::builders::ImagePermissionsBuilder {
        crate::types::builders::ImagePermissionsBuilder::default()
    }
}

/// A builder for [`ImagePermissions`](crate::types::ImagePermissions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImagePermissionsBuilder {
    pub(crate) allow_fleet: ::std::option::Option<bool>,
    pub(crate) allow_image_builder: ::std::option::Option<bool>,
}
impl ImagePermissionsBuilder {
    /// <p>Indicates whether the image can be used for a fleet.</p>
    pub fn allow_fleet(mut self, input: bool) -> Self {
        self.allow_fleet = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the image can be used for a fleet.</p>
    pub fn set_allow_fleet(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_fleet = input;
        self
    }
    /// <p>Indicates whether the image can be used for a fleet.</p>
    pub fn get_allow_fleet(&self) -> &::std::option::Option<bool> {
        &self.allow_fleet
    }
    /// <p>Indicates whether the image can be used for an image builder.</p>
    pub fn allow_image_builder(mut self, input: bool) -> Self {
        self.allow_image_builder = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the image can be used for an image builder.</p>
    pub fn set_allow_image_builder(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_image_builder = input;
        self
    }
    /// <p>Indicates whether the image can be used for an image builder.</p>
    pub fn get_allow_image_builder(&self) -> &::std::option::Option<bool> {
        &self.allow_image_builder
    }
    /// Consumes the builder and constructs a [`ImagePermissions`](crate::types::ImagePermissions).
    pub fn build(self) -> crate::types::ImagePermissions {
        crate::types::ImagePermissions {
            allow_fleet: self.allow_fleet,
            allow_image_builder: self.allow_image_builder,
        }
    }
}