aws_sdk_transfer/operation/update_user/
_update_user_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateUserOutput {
7 pub server_id: ::std::string::String,
9 pub user_name: ::std::string::String,
11 _request_id: Option<String>,
12}
13impl UpdateUserOutput {
14 pub fn server_id(&self) -> &str {
16 use std::ops::Deref;
17 self.server_id.deref()
18 }
19 pub fn user_name(&self) -> &str {
21 use std::ops::Deref;
22 self.user_name.deref()
23 }
24}
25impl ::aws_types::request_id::RequestId for UpdateUserOutput {
26 fn request_id(&self) -> Option<&str> {
27 self._request_id.as_deref()
28 }
29}
30impl UpdateUserOutput {
31 pub fn builder() -> crate::operation::update_user::builders::UpdateUserOutputBuilder {
33 crate::operation::update_user::builders::UpdateUserOutputBuilder::default()
34 }
35}
36
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct UpdateUserOutputBuilder {
41 pub(crate) server_id: ::std::option::Option<::std::string::String>,
42 pub(crate) user_name: ::std::option::Option<::std::string::String>,
43 _request_id: Option<String>,
44}
45impl UpdateUserOutputBuilder {
46 pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.server_id = ::std::option::Option::Some(input.into());
50 self
51 }
52 pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54 self.server_id = input;
55 self
56 }
57 pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
59 &self.server_id
60 }
61 pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.user_name = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.user_name = input;
70 self
71 }
72 pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
74 &self.user_name
75 }
76 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
77 self._request_id = Some(request_id.into());
78 self
79 }
80
81 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
82 self._request_id = request_id;
83 self
84 }
85 pub fn build(self) -> ::std::result::Result<crate::operation::update_user::UpdateUserOutput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_user::UpdateUserOutput {
91 server_id: self.server_id.ok_or_else(|| {
92 ::aws_smithy_types::error::operation::BuildError::missing_field(
93 "server_id",
94 "server_id was not specified but it is required when building UpdateUserOutput",
95 )
96 })?,
97 user_name: self.user_name.ok_or_else(|| {
98 ::aws_smithy_types::error::operation::BuildError::missing_field(
99 "user_name",
100 "user_name was not specified but it is required when building UpdateUserOutput",
101 )
102 })?,
103 _request_id: self._request_id,
104 })
105 }
106}