aws_sdk_appconfig/operation/update_extension/
_update_extension_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateExtensionInput {
6 pub extension_identifier: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
12 pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
14 pub version_number: ::std::option::Option<i32>,
16}
17impl UpdateExtensionInput {
18 pub fn extension_identifier(&self) -> ::std::option::Option<&str> {
20 self.extension_identifier.as_deref()
21 }
22 pub fn description(&self) -> ::std::option::Option<&str> {
24 self.description.as_deref()
25 }
26 pub fn actions(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
28 self.actions.as_ref()
29 }
30 pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
32 self.parameters.as_ref()
33 }
34 pub fn version_number(&self) -> ::std::option::Option<i32> {
36 self.version_number
37 }
38}
39impl UpdateExtensionInput {
40 pub fn builder() -> crate::operation::update_extension::builders::UpdateExtensionInputBuilder {
42 crate::operation::update_extension::builders::UpdateExtensionInputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateExtensionInputBuilder {
50 pub(crate) extension_identifier: ::std::option::Option<::std::string::String>,
51 pub(crate) description: ::std::option::Option<::std::string::String>,
52 pub(crate) actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
53 pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
54 pub(crate) version_number: ::std::option::Option<i32>,
55}
56impl UpdateExtensionInputBuilder {
57 pub fn extension_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.extension_identifier = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_extension_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.extension_identifier = input;
66 self
67 }
68 pub fn get_extension_identifier(&self) -> &::std::option::Option<::std::string::String> {
70 &self.extension_identifier
71 }
72 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.description = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.description = input;
80 self
81 }
82 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
84 &self.description
85 }
86 pub fn actions(mut self, k: crate::types::ActionPoint, v: ::std::vec::Vec<crate::types::Action>) -> Self {
92 let mut hash_map = self.actions.unwrap_or_default();
93 hash_map.insert(k, v);
94 self.actions = ::std::option::Option::Some(hash_map);
95 self
96 }
97 pub fn set_actions(
99 mut self,
100 input: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
101 ) -> Self {
102 self.actions = input;
103 self
104 }
105 pub fn get_actions(
107 &self,
108 ) -> &::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
109 &self.actions
110 }
111 pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Parameter) -> Self {
117 let mut hash_map = self.parameters.unwrap_or_default();
118 hash_map.insert(k.into(), v);
119 self.parameters = ::std::option::Option::Some(hash_map);
120 self
121 }
122 pub fn set_parameters(
124 mut self,
125 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
126 ) -> Self {
127 self.parameters = input;
128 self
129 }
130 pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
132 &self.parameters
133 }
134 pub fn version_number(mut self, input: i32) -> Self {
136 self.version_number = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_version_number(mut self, input: ::std::option::Option<i32>) -> Self {
141 self.version_number = input;
142 self
143 }
144 pub fn get_version_number(&self) -> &::std::option::Option<i32> {
146 &self.version_number
147 }
148 pub fn build(
150 self,
151 ) -> ::std::result::Result<crate::operation::update_extension::UpdateExtensionInput, ::aws_smithy_types::error::operation::BuildError> {
152 ::std::result::Result::Ok(crate::operation::update_extension::UpdateExtensionInput {
153 extension_identifier: self.extension_identifier,
154 description: self.description,
155 actions: self.actions,
156 parameters: self.parameters,
157 version_number: self.version_number,
158 })
159 }
160}