aws_sdk_opensearch/operation/update_application/
_update_application_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateApplicationInput {
6 pub id: ::std::option::Option<::std::string::String>,
8 pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
10 pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
12}
13impl UpdateApplicationInput {
14 pub fn id(&self) -> ::std::option::Option<&str> {
16 self.id.as_deref()
17 }
18 pub fn data_sources(&self) -> &[crate::types::DataSource] {
22 self.data_sources.as_deref().unwrap_or_default()
23 }
24 pub fn app_configs(&self) -> &[crate::types::AppConfig] {
28 self.app_configs.as_deref().unwrap_or_default()
29 }
30}
31impl UpdateApplicationInput {
32 pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
34 crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct UpdateApplicationInputBuilder {
42 pub(crate) id: ::std::option::Option<::std::string::String>,
43 pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
44 pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
45}
46impl UpdateApplicationInputBuilder {
47 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.id = ::std::option::Option::Some(input.into());
51 self
52 }
53 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.id = input;
56 self
57 }
58 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
60 &self.id
61 }
62 pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
68 let mut v = self.data_sources.unwrap_or_default();
69 v.push(input);
70 self.data_sources = ::std::option::Option::Some(v);
71 self
72 }
73 pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
75 self.data_sources = input;
76 self
77 }
78 pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
80 &self.data_sources
81 }
82 pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
88 let mut v = self.app_configs.unwrap_or_default();
89 v.push(input);
90 self.app_configs = ::std::option::Option::Some(v);
91 self
92 }
93 pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
95 self.app_configs = input;
96 self
97 }
98 pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
100 &self.app_configs
101 }
102 pub fn build(
104 self,
105 ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
106 ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
107 id: self.id,
108 data_sources: self.data_sources,
109 app_configs: self.app_configs,
110 })
111 }
112}