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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// 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 UpdateStorageSystemInput {
    /// <p>Specifies the ARN of the on-premises storage system that you want reconfigure.</p>
    pub storage_system_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the server name and network port required to connect with your on-premises storage system's management interface.</p>
    pub server_configuration: ::std::option::Option<crate::types::DiscoveryServerConfiguration>,
    /// <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads your on-premises storage system. You can only specify one ARN.</p>
    pub agent_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Specifies a familiar name for your on-premises storage system.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.</p>
    pub cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the user name and password for accessing your on-premises storage system's management interface.</p>
    pub credentials: ::std::option::Option<crate::types::Credentials>,
}
impl UpdateStorageSystemInput {
    /// <p>Specifies the ARN of the on-premises storage system that you want reconfigure.</p>
    pub fn storage_system_arn(&self) -> ::std::option::Option<&str> {
        self.storage_system_arn.as_deref()
    }
    /// <p>Specifies the server name and network port required to connect with your on-premises storage system's management interface.</p>
    pub fn server_configuration(&self) -> ::std::option::Option<&crate::types::DiscoveryServerConfiguration> {
        self.server_configuration.as_ref()
    }
    /// <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads your on-premises storage system. You can only specify one ARN.</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 `.agent_arns.is_none()`.
    pub fn agent_arns(&self) -> &[::std::string::String] {
        self.agent_arns.as_deref().unwrap_or_default()
    }
    /// <p>Specifies a familiar name for your on-premises storage system.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.</p>
    pub fn cloud_watch_log_group_arn(&self) -> ::std::option::Option<&str> {
        self.cloud_watch_log_group_arn.as_deref()
    }
    /// <p>Specifies the user name and password for accessing your on-premises storage system's management interface.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::Credentials> {
        self.credentials.as_ref()
    }
}
impl UpdateStorageSystemInput {
    /// Creates a new builder-style object to manufacture [`UpdateStorageSystemInput`](crate::operation::update_storage_system::UpdateStorageSystemInput).
    pub fn builder() -> crate::operation::update_storage_system::builders::UpdateStorageSystemInputBuilder {
        crate::operation::update_storage_system::builders::UpdateStorageSystemInputBuilder::default()
    }
}

/// A builder for [`UpdateStorageSystemInput`](crate::operation::update_storage_system::UpdateStorageSystemInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateStorageSystemInputBuilder {
    pub(crate) storage_system_arn: ::std::option::Option<::std::string::String>,
    pub(crate) server_configuration: ::std::option::Option<crate::types::DiscoveryServerConfiguration>,
    pub(crate) agent_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
    pub(crate) credentials: ::std::option::Option<crate::types::Credentials>,
}
impl UpdateStorageSystemInputBuilder {
    /// <p>Specifies the ARN of the on-premises storage system that you want reconfigure.</p>
    /// This field is required.
    pub fn storage_system_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.storage_system_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the ARN of the on-premises storage system that you want reconfigure.</p>
    pub fn set_storage_system_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.storage_system_arn = input;
        self
    }
    /// <p>Specifies the ARN of the on-premises storage system that you want reconfigure.</p>
    pub fn get_storage_system_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.storage_system_arn
    }
    /// <p>Specifies the server name and network port required to connect with your on-premises storage system's management interface.</p>
    pub fn server_configuration(mut self, input: crate::types::DiscoveryServerConfiguration) -> Self {
        self.server_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the server name and network port required to connect with your on-premises storage system's management interface.</p>
    pub fn set_server_configuration(mut self, input: ::std::option::Option<crate::types::DiscoveryServerConfiguration>) -> Self {
        self.server_configuration = input;
        self
    }
    /// <p>Specifies the server name and network port required to connect with your on-premises storage system's management interface.</p>
    pub fn get_server_configuration(&self) -> &::std::option::Option<crate::types::DiscoveryServerConfiguration> {
        &self.server_configuration
    }
    /// Appends an item to `agent_arns`.
    ///
    /// To override the contents of this collection use [`set_agent_arns`](Self::set_agent_arns).
    ///
    /// <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads your on-premises storage system. You can only specify one ARN.</p>
    pub fn agent_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.agent_arns.unwrap_or_default();
        v.push(input.into());
        self.agent_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads your on-premises storage system. You can only specify one ARN.</p>
    pub fn set_agent_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.agent_arns = input;
        self
    }
    /// <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that connects to and reads your on-premises storage system. You can only specify one ARN.</p>
    pub fn get_agent_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.agent_arns
    }
    /// <p>Specifies a familiar name for your on-premises storage system.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies a familiar name for your on-premises storage system.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Specifies a familiar name for your on-premises storage system.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.</p>
    pub fn cloud_watch_log_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cloud_watch_log_group_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.</p>
    pub fn set_cloud_watch_log_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cloud_watch_log_group_arn = input;
        self
    }
    /// <p>Specifies the ARN of the Amazon CloudWatch log group for monitoring and logging discovery job events.</p>
    pub fn get_cloud_watch_log_group_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cloud_watch_log_group_arn
    }
    /// <p>Specifies the user name and password for accessing your on-premises storage system's management interface.</p>
    pub fn credentials(mut self, input: crate::types::Credentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the user name and password for accessing your on-premises storage system's management interface.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::Credentials>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>Specifies the user name and password for accessing your on-premises storage system's management interface.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::Credentials> {
        &self.credentials
    }
    /// Consumes the builder and constructs a [`UpdateStorageSystemInput`](crate::operation::update_storage_system::UpdateStorageSystemInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_storage_system::UpdateStorageSystemInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_storage_system::UpdateStorageSystemInput {
            storage_system_arn: self.storage_system_arn,
            server_configuration: self.server_configuration,
            agent_arns: self.agent_arns,
            name: self.name,
            cloud_watch_log_group_arn: self.cloud_watch_log_group_arn,
            credentials: self.credentials,
        })
    }
}