aws_sdk_eks/operation/describe_update/
_describe_update_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes an update request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeUpdateInput {
7    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The ID of the update to describe.</p>
10    pub update_id: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
12    pub nodegroup_name: ::std::option::Option<::std::string::String>,
13    /// <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>. This parameter is required if the update is an add-on update.</p>
14    pub addon_name: ::std::option::Option<::std::string::String>,
15    /// <p>The name of the capability for which you want to describe updates.</p>
16    pub capability_name: ::std::option::Option<::std::string::String>,
17}
18impl DescribeUpdateInput {
19    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
20    pub fn name(&self) -> ::std::option::Option<&str> {
21        self.name.as_deref()
22    }
23    /// <p>The ID of the update to describe.</p>
24    pub fn update_id(&self) -> ::std::option::Option<&str> {
25        self.update_id.as_deref()
26    }
27    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
28    pub fn nodegroup_name(&self) -> ::std::option::Option<&str> {
29        self.nodegroup_name.as_deref()
30    }
31    /// <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>. This parameter is required if the update is an add-on update.</p>
32    pub fn addon_name(&self) -> ::std::option::Option<&str> {
33        self.addon_name.as_deref()
34    }
35    /// <p>The name of the capability for which you want to describe updates.</p>
36    pub fn capability_name(&self) -> ::std::option::Option<&str> {
37        self.capability_name.as_deref()
38    }
39}
40impl DescribeUpdateInput {
41    /// Creates a new builder-style object to manufacture [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
42    pub fn builder() -> crate::operation::describe_update::builders::DescribeUpdateInputBuilder {
43        crate::operation::describe_update::builders::DescribeUpdateInputBuilder::default()
44    }
45}
46
47/// A builder for [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct DescribeUpdateInputBuilder {
51    pub(crate) name: ::std::option::Option<::std::string::String>,
52    pub(crate) update_id: ::std::option::Option<::std::string::String>,
53    pub(crate) nodegroup_name: ::std::option::Option<::std::string::String>,
54    pub(crate) addon_name: ::std::option::Option<::std::string::String>,
55    pub(crate) capability_name: ::std::option::Option<::std::string::String>,
56}
57impl DescribeUpdateInputBuilder {
58    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
59    /// This field is required.
60    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
65    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.name = input;
67        self
68    }
69    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
70    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.name
72    }
73    /// <p>The ID of the update to describe.</p>
74    /// This field is required.
75    pub fn update_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.update_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The ID of the update to describe.</p>
80    pub fn set_update_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.update_id = input;
82        self
83    }
84    /// <p>The ID of the update to describe.</p>
85    pub fn get_update_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.update_id
87    }
88    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
89    pub fn nodegroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.nodegroup_name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
94    pub fn set_nodegroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.nodegroup_name = input;
96        self
97    }
98    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
99    pub fn get_nodegroup_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.nodegroup_name
101    }
102    /// <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>. This parameter is required if the update is an add-on update.</p>
103    pub fn addon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.addon_name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <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>. This parameter is required if the update is an add-on update.</p>
108    pub fn set_addon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.addon_name = input;
110        self
111    }
112    /// <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>. This parameter is required if the update is an add-on update.</p>
113    pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.addon_name
115    }
116    /// <p>The name of the capability for which you want to describe updates.</p>
117    pub fn capability_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.capability_name = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The name of the capability for which you want to describe updates.</p>
122    pub fn set_capability_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.capability_name = input;
124        self
125    }
126    /// <p>The name of the capability for which you want to describe updates.</p>
127    pub fn get_capability_name(&self) -> &::std::option::Option<::std::string::String> {
128        &self.capability_name
129    }
130    /// Consumes the builder and constructs a [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
131    pub fn build(
132        self,
133    ) -> ::std::result::Result<crate::operation::describe_update::DescribeUpdateInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::describe_update::DescribeUpdateInput {
135            name: self.name,
136            update_id: self.update_id,
137            nodegroup_name: self.nodegroup_name,
138            addon_name: self.addon_name,
139            capability_name: self.capability_name,
140        })
141    }
142}