Skip to main content

aws_sdk_imagebuilder/types/
_lifecycle_policy_detail_action_include_resources.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies how the lifecycle policy should apply actions to selected resources.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct LifecyclePolicyDetailActionIncludeResources {
7    /// <p>Specifies whether the lifecycle action should apply to distributed AMIs.</p>
8    pub amis: bool,
9    /// <p>Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.</p>
10    pub snapshots: bool,
11    /// <p>Specifies whether the lifecycle action should apply to distributed containers.</p>
12    pub containers: bool,
13}
14impl LifecyclePolicyDetailActionIncludeResources {
15    /// <p>Specifies whether the lifecycle action should apply to distributed AMIs.</p>
16    pub fn amis(&self) -> bool {
17        self.amis
18    }
19    /// <p>Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.</p>
20    pub fn snapshots(&self) -> bool {
21        self.snapshots
22    }
23    /// <p>Specifies whether the lifecycle action should apply to distributed containers.</p>
24    pub fn containers(&self) -> bool {
25        self.containers
26    }
27}
28impl LifecyclePolicyDetailActionIncludeResources {
29    /// Creates a new builder-style object to manufacture [`LifecyclePolicyDetailActionIncludeResources`](crate::types::LifecyclePolicyDetailActionIncludeResources).
30    pub fn builder() -> crate::types::builders::LifecyclePolicyDetailActionIncludeResourcesBuilder {
31        crate::types::builders::LifecyclePolicyDetailActionIncludeResourcesBuilder::default()
32    }
33}
34
35/// A builder for [`LifecyclePolicyDetailActionIncludeResources`](crate::types::LifecyclePolicyDetailActionIncludeResources).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct LifecyclePolicyDetailActionIncludeResourcesBuilder {
39    pub(crate) amis: ::std::option::Option<bool>,
40    pub(crate) snapshots: ::std::option::Option<bool>,
41    pub(crate) containers: ::std::option::Option<bool>,
42}
43impl LifecyclePolicyDetailActionIncludeResourcesBuilder {
44    /// <p>Specifies whether the lifecycle action should apply to distributed AMIs.</p>
45    pub fn amis(mut self, input: bool) -> Self {
46        self.amis = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>Specifies whether the lifecycle action should apply to distributed AMIs.</p>
50    pub fn set_amis(mut self, input: ::std::option::Option<bool>) -> Self {
51        self.amis = input;
52        self
53    }
54    /// <p>Specifies whether the lifecycle action should apply to distributed AMIs.</p>
55    pub fn get_amis(&self) -> &::std::option::Option<bool> {
56        &self.amis
57    }
58    /// <p>Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.</p>
59    pub fn snapshots(mut self, input: bool) -> Self {
60        self.snapshots = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.</p>
64    pub fn set_snapshots(mut self, input: ::std::option::Option<bool>) -> Self {
65        self.snapshots = input;
66        self
67    }
68    /// <p>Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.</p>
69    pub fn get_snapshots(&self) -> &::std::option::Option<bool> {
70        &self.snapshots
71    }
72    /// <p>Specifies whether the lifecycle action should apply to distributed containers.</p>
73    pub fn containers(mut self, input: bool) -> Self {
74        self.containers = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Specifies whether the lifecycle action should apply to distributed containers.</p>
78    pub fn set_containers(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.containers = input;
80        self
81    }
82    /// <p>Specifies whether the lifecycle action should apply to distributed containers.</p>
83    pub fn get_containers(&self) -> &::std::option::Option<bool> {
84        &self.containers
85    }
86    /// Consumes the builder and constructs a [`LifecyclePolicyDetailActionIncludeResources`](crate::types::LifecyclePolicyDetailActionIncludeResources).
87    pub fn build(self) -> crate::types::LifecyclePolicyDetailActionIncludeResources {
88        crate::types::LifecyclePolicyDetailActionIncludeResources {
89            amis: self.amis.unwrap_or_default(),
90            snapshots: self.snapshots.unwrap_or_default(),
91            containers: self.containers.unwrap_or_default(),
92        }
93    }
94}