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}
16impl DescribeUpdateInput {
17 /// <p>The name of the Amazon EKS cluster associated with the update.</p>
18 pub fn name(&self) -> ::std::option::Option<&str> {
19 self.name.as_deref()
20 }
21 /// <p>The ID of the update to describe.</p>
22 pub fn update_id(&self) -> ::std::option::Option<&str> {
23 self.update_id.as_deref()
24 }
25 /// <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>
26 pub fn nodegroup_name(&self) -> ::std::option::Option<&str> {
27 self.nodegroup_name.as_deref()
28 }
29 /// <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>
30 pub fn addon_name(&self) -> ::std::option::Option<&str> {
31 self.addon_name.as_deref()
32 }
33}
34impl DescribeUpdateInput {
35 /// Creates a new builder-style object to manufacture [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
36 pub fn builder() -> crate::operation::describe_update::builders::DescribeUpdateInputBuilder {
37 crate::operation::describe_update::builders::DescribeUpdateInputBuilder::default()
38 }
39}
40
41/// A builder for [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DescribeUpdateInputBuilder {
45 pub(crate) name: ::std::option::Option<::std::string::String>,
46 pub(crate) update_id: ::std::option::Option<::std::string::String>,
47 pub(crate) nodegroup_name: ::std::option::Option<::std::string::String>,
48 pub(crate) addon_name: ::std::option::Option<::std::string::String>,
49}
50impl DescribeUpdateInputBuilder {
51 /// <p>The name of the Amazon EKS cluster associated with the update.</p>
52 /// This field is required.
53 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.name = ::std::option::Option::Some(input.into());
55 self
56 }
57 /// <p>The name of the Amazon EKS cluster associated with the update.</p>
58 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.name = input;
60 self
61 }
62 /// <p>The name of the Amazon EKS cluster associated with the update.</p>
63 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
64 &self.name
65 }
66 /// <p>The ID of the update to describe.</p>
67 /// This field is required.
68 pub fn update_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.update_id = ::std::option::Option::Some(input.into());
70 self
71 }
72 /// <p>The ID of the update to describe.</p>
73 pub fn set_update_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.update_id = input;
75 self
76 }
77 /// <p>The ID of the update to describe.</p>
78 pub fn get_update_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.update_id
80 }
81 /// <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>
82 pub fn nodegroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.nodegroup_name = ::std::option::Option::Some(input.into());
84 self
85 }
86 /// <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>
87 pub fn set_nodegroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.nodegroup_name = input;
89 self
90 }
91 /// <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>
92 pub fn get_nodegroup_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.nodegroup_name
94 }
95 /// <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>
96 pub fn addon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.addon_name = ::std::option::Option::Some(input.into());
98 self
99 }
100 /// <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>
101 pub fn set_addon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.addon_name = input;
103 self
104 }
105 /// <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>
106 pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
107 &self.addon_name
108 }
109 /// Consumes the builder and constructs a [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
110 pub fn build(
111 self,
112 ) -> ::std::result::Result<crate::operation::describe_update::DescribeUpdateInput, ::aws_smithy_types::error::operation::BuildError> {
113 ::std::result::Result::Ok(crate::operation::describe_update::DescribeUpdateInput {
114 name: self.name,
115 update_id: self.update_id,
116 nodegroup_name: self.nodegroup_name,
117 addon_name: self.addon_name,
118 })
119 }
120}