1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateApplicationInput {
/// <p>The unique identifier for the OpenSearch application to be updated.</p>
pub id: ::std::option::Option<::std::string::String>,
/// <p>The data sources to associate with the OpenSearch application.</p>
pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
/// <p>The configuration settings to modify for the OpenSearch application.</p>
pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
}
impl UpdateApplicationInput {
/// <p>The unique identifier for the OpenSearch application to be updated.</p>
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The data sources to associate with the OpenSearch application.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_sources.is_none()`.
pub fn data_sources(&self) -> &[crate::types::DataSource] {
self.data_sources.as_deref().unwrap_or_default()
}
/// <p>The configuration settings to modify for the OpenSearch application.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.app_configs.is_none()`.
pub fn app_configs(&self) -> &[crate::types::AppConfig] {
self.app_configs.as_deref().unwrap_or_default()
}
}
impl UpdateApplicationInput {
/// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
}
}
/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateApplicationInputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
}
impl UpdateApplicationInputBuilder {
/// <p>The unique identifier for the OpenSearch application to be updated.</p>
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the OpenSearch application to be updated.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The unique identifier for the OpenSearch application to be updated.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// Appends an item to `data_sources`.
///
/// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
///
/// <p>The data sources to associate with the OpenSearch application.</p>
pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
let mut v = self.data_sources.unwrap_or_default();
v.push(input);
self.data_sources = ::std::option::Option::Some(v);
self
}
/// <p>The data sources to associate with the OpenSearch application.</p>
pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
self.data_sources = input;
self
}
/// <p>The data sources to associate with the OpenSearch application.</p>
pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
&self.data_sources
}
/// Appends an item to `app_configs`.
///
/// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
///
/// <p>The configuration settings to modify for the OpenSearch application.</p>
pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
let mut v = self.app_configs.unwrap_or_default();
v.push(input);
self.app_configs = ::std::option::Option::Some(v);
self
}
/// <p>The configuration settings to modify for the OpenSearch application.</p>
pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
self.app_configs = input;
self
}
/// <p>The configuration settings to modify for the OpenSearch application.</p>
pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
&self.app_configs
}
/// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
id: self.id,
data_sources: self.data_sources,
app_configs: self.app_configs,
})
}
}