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 UpdateComponentInput {
6/// <p>The name of the resource group.</p>
7pub resource_group_name: ::std::option::Option<::std::string::String>,
8/// <p>The name of the component.</p>
9pub component_name: ::std::option::Option<::std::string::String>,
10/// <p>The new name of the component.</p>
11pub new_component_name: ::std::option::Option<::std::string::String>,
12/// <p>The list of resource ARNs that belong to the component.</p>
13pub resource_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14}
15impl UpdateComponentInput {
16/// <p>The name of the resource group.</p>
17pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
18self.resource_group_name.as_deref()
19 }
20/// <p>The name of the component.</p>
21pub fn component_name(&self) -> ::std::option::Option<&str> {
22self.component_name.as_deref()
23 }
24/// <p>The new name of the component.</p>
25pub fn new_component_name(&self) -> ::std::option::Option<&str> {
26self.new_component_name.as_deref()
27 }
28/// <p>The list of resource ARNs that belong to the component.</p>
29 ///
30 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_list.is_none()`.
31pub fn resource_list(&self) -> &[::std::string::String] {
32self.resource_list.as_deref().unwrap_or_default()
33 }
34}
35impl UpdateComponentInput {
36/// Creates a new builder-style object to manufacture [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
37pub fn builder() -> crate::operation::update_component::builders::UpdateComponentInputBuilder {
38crate::operation::update_component::builders::UpdateComponentInputBuilder::default()
39 }
40}
4142/// A builder for [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateComponentInputBuilder {
46pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
47pub(crate) component_name: ::std::option::Option<::std::string::String>,
48pub(crate) new_component_name: ::std::option::Option<::std::string::String>,
49pub(crate) resource_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
50}
51impl UpdateComponentInputBuilder {
52/// <p>The name of the resource group.</p>
53 /// This field is required.
54pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55self.resource_group_name = ::std::option::Option::Some(input.into());
56self
57}
58/// <p>The name of the resource group.</p>
59pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60self.resource_group_name = input;
61self
62}
63/// <p>The name of the resource group.</p>
64pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
65&self.resource_group_name
66 }
67/// <p>The name of the component.</p>
68 /// This field is required.
69pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70self.component_name = ::std::option::Option::Some(input.into());
71self
72}
73/// <p>The name of the component.</p>
74pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75self.component_name = input;
76self
77}
78/// <p>The name of the component.</p>
79pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
80&self.component_name
81 }
82/// <p>The new name of the component.</p>
83pub fn new_component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84self.new_component_name = ::std::option::Option::Some(input.into());
85self
86}
87/// <p>The new name of the component.</p>
88pub fn set_new_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89self.new_component_name = input;
90self
91}
92/// <p>The new name of the component.</p>
93pub fn get_new_component_name(&self) -> &::std::option::Option<::std::string::String> {
94&self.new_component_name
95 }
96/// Appends an item to `resource_list`.
97 ///
98 /// To override the contents of this collection use [`set_resource_list`](Self::set_resource_list).
99 ///
100 /// <p>The list of resource ARNs that belong to the component.</p>
101pub fn resource_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102let mut v = self.resource_list.unwrap_or_default();
103 v.push(input.into());
104self.resource_list = ::std::option::Option::Some(v);
105self
106}
107/// <p>The list of resource ARNs that belong to the component.</p>
108pub fn set_resource_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
109self.resource_list = input;
110self
111}
112/// <p>The list of resource ARNs that belong to the component.</p>
113pub fn get_resource_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
114&self.resource_list
115 }
116/// Consumes the builder and constructs a [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
117pub fn build(
118self,
119 ) -> ::std::result::Result<crate::operation::update_component::UpdateComponentInput, ::aws_smithy_types::error::operation::BuildError> {
120 ::std::result::Result::Ok(crate::operation::update_component::UpdateComponentInput {
121 resource_group_name: self.resource_group_name,
122 component_name: self.component_name,
123 new_component_name: self.new_component_name,
124 resource_list: self.resource_list,
125 })
126 }
127}