aws_sdk_datasync/operation/update_agent/
_update_agent_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>UpdateAgentRequest</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateAgentInput {
7    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
8    pub agent_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name that you want to use to configure the agent.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11}
12impl UpdateAgentInput {
13    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
14    pub fn agent_arn(&self) -> ::std::option::Option<&str> {
15        self.agent_arn.as_deref()
16    }
17    /// <p>The name that you want to use to configure the agent.</p>
18    pub fn name(&self) -> ::std::option::Option<&str> {
19        self.name.as_deref()
20    }
21}
22impl UpdateAgentInput {
23    /// Creates a new builder-style object to manufacture [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
24    pub fn builder() -> crate::operation::update_agent::builders::UpdateAgentInputBuilder {
25        crate::operation::update_agent::builders::UpdateAgentInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
30#[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    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
38    /// This field is required.
39    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    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
44    pub fn set_agent_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.agent_arn = input;
46        self
47    }
48    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
49    pub fn get_agent_arn(&self) -> &::std::option::Option<::std::string::String> {
50        &self.agent_arn
51    }
52    /// <p>The name that you want to use to configure the agent.</p>
53    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    /// <p>The name that you want to use to configure the agent.</p>
58    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.name = input;
60        self
61    }
62    /// <p>The name that you want to use to configure the agent.</p>
63    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.name
65    }
66    /// Consumes the builder and constructs a [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
67    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}