aws_sdk_eks/operation/delete_addon/
_delete_addon_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteAddonInput {
6    /// <p>The name of your cluster.</p>
7    pub cluster_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>.</p>
9    pub addon_name: ::std::option::Option<::std::string::String>,
10    /// <p>Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.</p>
11    pub preserve: ::std::option::Option<bool>,
12}
13impl DeleteAddonInput {
14    /// <p>The name of your cluster.</p>
15    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
16        self.cluster_name.as_deref()
17    }
18    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>.</p>
19    pub fn addon_name(&self) -> ::std::option::Option<&str> {
20        self.addon_name.as_deref()
21    }
22    /// <p>Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.</p>
23    pub fn preserve(&self) -> ::std::option::Option<bool> {
24        self.preserve
25    }
26}
27impl DeleteAddonInput {
28    /// Creates a new builder-style object to manufacture [`DeleteAddonInput`](crate::operation::delete_addon::DeleteAddonInput).
29    pub fn builder() -> crate::operation::delete_addon::builders::DeleteAddonInputBuilder {
30        crate::operation::delete_addon::builders::DeleteAddonInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteAddonInput`](crate::operation::delete_addon::DeleteAddonInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteAddonInputBuilder {
38    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
39    pub(crate) addon_name: ::std::option::Option<::std::string::String>,
40    pub(crate) preserve: ::std::option::Option<bool>,
41}
42impl DeleteAddonInputBuilder {
43    /// <p>The name of your cluster.</p>
44    /// This field is required.
45    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.cluster_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of your cluster.</p>
50    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.cluster_name = input;
52        self
53    }
54    /// <p>The name of your cluster.</p>
55    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.cluster_name
57    }
58    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>.</p>
59    /// This field is required.
60    pub fn addon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.addon_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>.</p>
65    pub fn set_addon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.addon_name = input;
67        self
68    }
69    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>.</p>
70    pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.addon_name
72    }
73    /// <p>Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.</p>
74    pub fn preserve(mut self, input: bool) -> Self {
75        self.preserve = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.</p>
79    pub fn set_preserve(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.preserve = input;
81        self
82    }
83    /// <p>Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.</p>
84    pub fn get_preserve(&self) -> &::std::option::Option<bool> {
85        &self.preserve
86    }
87    /// Consumes the builder and constructs a [`DeleteAddonInput`](crate::operation::delete_addon::DeleteAddonInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::delete_addon::DeleteAddonInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::delete_addon::DeleteAddonInput {
90            cluster_name: self.cluster_name,
91            addon_name: self.addon_name,
92            preserve: self.preserve,
93        })
94    }
95}