aws_sdk_eks/types/
_addon_version_info.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about an add-on version.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AddonVersionInfo {
7    /// <p>The version of the add-on.</p>
8    pub addon_version: ::std::option::Option<::std::string::String>,
9    /// <p>The architectures that the version supports.</p>
10    pub architecture: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// <p>Indicates the compute type of the addon version.</p>
12    pub compute_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13    /// <p>An object representing the compatibilities of a version.</p>
14    pub compatibilities: ::std::option::Option<::std::vec::Vec<crate::types::Compatibility>>,
15    /// <p>Whether the add-on requires configuration.</p>
16    pub requires_configuration: bool,
17    /// <p>Indicates if the Addon requires IAM Permissions to operate, such as networking permissions.</p>
18    pub requires_iam_permissions: bool,
19}
20impl AddonVersionInfo {
21    /// <p>The version of the add-on.</p>
22    pub fn addon_version(&self) -> ::std::option::Option<&str> {
23        self.addon_version.as_deref()
24    }
25    /// <p>The architectures that the version supports.</p>
26    ///
27    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.architecture.is_none()`.
28    pub fn architecture(&self) -> &[::std::string::String] {
29        self.architecture.as_deref().unwrap_or_default()
30    }
31    /// <p>Indicates the compute type of the addon version.</p>
32    ///
33    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.compute_types.is_none()`.
34    pub fn compute_types(&self) -> &[::std::string::String] {
35        self.compute_types.as_deref().unwrap_or_default()
36    }
37    /// <p>An object representing the compatibilities of a version.</p>
38    ///
39    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.compatibilities.is_none()`.
40    pub fn compatibilities(&self) -> &[crate::types::Compatibility] {
41        self.compatibilities.as_deref().unwrap_or_default()
42    }
43    /// <p>Whether the add-on requires configuration.</p>
44    pub fn requires_configuration(&self) -> bool {
45        self.requires_configuration
46    }
47    /// <p>Indicates if the Addon requires IAM Permissions to operate, such as networking permissions.</p>
48    pub fn requires_iam_permissions(&self) -> bool {
49        self.requires_iam_permissions
50    }
51}
52impl AddonVersionInfo {
53    /// Creates a new builder-style object to manufacture [`AddonVersionInfo`](crate::types::AddonVersionInfo).
54    pub fn builder() -> crate::types::builders::AddonVersionInfoBuilder {
55        crate::types::builders::AddonVersionInfoBuilder::default()
56    }
57}
58
59/// A builder for [`AddonVersionInfo`](crate::types::AddonVersionInfo).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct AddonVersionInfoBuilder {
63    pub(crate) addon_version: ::std::option::Option<::std::string::String>,
64    pub(crate) architecture: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
65    pub(crate) compute_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
66    pub(crate) compatibilities: ::std::option::Option<::std::vec::Vec<crate::types::Compatibility>>,
67    pub(crate) requires_configuration: ::std::option::Option<bool>,
68    pub(crate) requires_iam_permissions: ::std::option::Option<bool>,
69}
70impl AddonVersionInfoBuilder {
71    /// <p>The version of the add-on.</p>
72    pub fn addon_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.addon_version = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The version of the add-on.</p>
77    pub fn set_addon_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.addon_version = input;
79        self
80    }
81    /// <p>The version of the add-on.</p>
82    pub fn get_addon_version(&self) -> &::std::option::Option<::std::string::String> {
83        &self.addon_version
84    }
85    /// Appends an item to `architecture`.
86    ///
87    /// To override the contents of this collection use [`set_architecture`](Self::set_architecture).
88    ///
89    /// <p>The architectures that the version supports.</p>
90    pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        let mut v = self.architecture.unwrap_or_default();
92        v.push(input.into());
93        self.architecture = ::std::option::Option::Some(v);
94        self
95    }
96    /// <p>The architectures that the version supports.</p>
97    pub fn set_architecture(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
98        self.architecture = input;
99        self
100    }
101    /// <p>The architectures that the version supports.</p>
102    pub fn get_architecture(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
103        &self.architecture
104    }
105    /// Appends an item to `compute_types`.
106    ///
107    /// To override the contents of this collection use [`set_compute_types`](Self::set_compute_types).
108    ///
109    /// <p>Indicates the compute type of the addon version.</p>
110    pub fn compute_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        let mut v = self.compute_types.unwrap_or_default();
112        v.push(input.into());
113        self.compute_types = ::std::option::Option::Some(v);
114        self
115    }
116    /// <p>Indicates the compute type of the addon version.</p>
117    pub fn set_compute_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
118        self.compute_types = input;
119        self
120    }
121    /// <p>Indicates the compute type of the addon version.</p>
122    pub fn get_compute_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
123        &self.compute_types
124    }
125    /// Appends an item to `compatibilities`.
126    ///
127    /// To override the contents of this collection use [`set_compatibilities`](Self::set_compatibilities).
128    ///
129    /// <p>An object representing the compatibilities of a version.</p>
130    pub fn compatibilities(mut self, input: crate::types::Compatibility) -> Self {
131        let mut v = self.compatibilities.unwrap_or_default();
132        v.push(input);
133        self.compatibilities = ::std::option::Option::Some(v);
134        self
135    }
136    /// <p>An object representing the compatibilities of a version.</p>
137    pub fn set_compatibilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Compatibility>>) -> Self {
138        self.compatibilities = input;
139        self
140    }
141    /// <p>An object representing the compatibilities of a version.</p>
142    pub fn get_compatibilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Compatibility>> {
143        &self.compatibilities
144    }
145    /// <p>Whether the add-on requires configuration.</p>
146    pub fn requires_configuration(mut self, input: bool) -> Self {
147        self.requires_configuration = ::std::option::Option::Some(input);
148        self
149    }
150    /// <p>Whether the add-on requires configuration.</p>
151    pub fn set_requires_configuration(mut self, input: ::std::option::Option<bool>) -> Self {
152        self.requires_configuration = input;
153        self
154    }
155    /// <p>Whether the add-on requires configuration.</p>
156    pub fn get_requires_configuration(&self) -> &::std::option::Option<bool> {
157        &self.requires_configuration
158    }
159    /// <p>Indicates if the Addon requires IAM Permissions to operate, such as networking permissions.</p>
160    pub fn requires_iam_permissions(mut self, input: bool) -> Self {
161        self.requires_iam_permissions = ::std::option::Option::Some(input);
162        self
163    }
164    /// <p>Indicates if the Addon requires IAM Permissions to operate, such as networking permissions.</p>
165    pub fn set_requires_iam_permissions(mut self, input: ::std::option::Option<bool>) -> Self {
166        self.requires_iam_permissions = input;
167        self
168    }
169    /// <p>Indicates if the Addon requires IAM Permissions to operate, such as networking permissions.</p>
170    pub fn get_requires_iam_permissions(&self) -> &::std::option::Option<bool> {
171        &self.requires_iam_permissions
172    }
173    /// Consumes the builder and constructs a [`AddonVersionInfo`](crate::types::AddonVersionInfo).
174    pub fn build(self) -> crate::types::AddonVersionInfo {
175        crate::types::AddonVersionInfo {
176            addon_version: self.addon_version,
177            architecture: self.architecture,
178            compute_types: self.compute_types,
179            compatibilities: self.compatibilities,
180            requires_configuration: self.requires_configuration.unwrap_or_default(),
181            requires_iam_permissions: self.requires_iam_permissions.unwrap_or_default(),
182        }
183    }
184}