aws_sdk_datasync/operation/update_agent/
_update_agent_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateAgentInput {
7 pub agent_arn: ::std::option::Option<::std::string::String>,
9 pub name: ::std::option::Option<::std::string::String>,
11}
12impl UpdateAgentInput {
13 pub fn agent_arn(&self) -> ::std::option::Option<&str> {
15 self.agent_arn.as_deref()
16 }
17 pub fn name(&self) -> ::std::option::Option<&str> {
19 self.name.as_deref()
20 }
21}
22impl UpdateAgentInput {
23 pub fn builder() -> crate::operation::update_agent::builders::UpdateAgentInputBuilder {
25 crate::operation::update_agent::builders::UpdateAgentInputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateAgentInputBuilder {
33 pub(crate) agent_arn: ::std::option::Option<::std::string::String>,
34 pub(crate) name: ::std::option::Option<::std::string::String>,
35}
36impl UpdateAgentInputBuilder {
37 pub fn agent_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.agent_arn = ::std::option::Option::Some(input.into());
41 self
42 }
43 pub fn set_agent_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.agent_arn = input;
46 self
47 }
48 pub fn get_agent_arn(&self) -> &::std::option::Option<::std::string::String> {
50 &self.agent_arn
51 }
52 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.name = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.name = input;
60 self
61 }
62 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
64 &self.name
65 }
66 pub fn build(self) -> ::std::result::Result<crate::operation::update_agent::UpdateAgentInput, ::aws_smithy_types::error::operation::BuildError> {
68 ::std::result::Result::Ok(crate::operation::update_agent::UpdateAgentInput {
69 agent_arn: self.agent_arn,
70 name: self.name,
71 })
72 }
73}