aws_sdk_s3control/types/
_async_error_details.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AsyncErrorDetails {
7 pub code: ::std::option::Option<::std::string::String>,
9 pub message: ::std::option::Option<::std::string::String>,
11 pub resource: ::std::option::Option<::std::string::String>,
13 pub request_id: ::std::option::Option<::std::string::String>,
15}
16impl AsyncErrorDetails {
17 pub fn code(&self) -> ::std::option::Option<&str> {
19 self.code.as_deref()
20 }
21 pub fn message(&self) -> ::std::option::Option<&str> {
23 self.message.as_deref()
24 }
25 pub fn resource(&self) -> ::std::option::Option<&str> {
27 self.resource.as_deref()
28 }
29 pub fn request_id(&self) -> ::std::option::Option<&str> {
31 self.request_id.as_deref()
32 }
33}
34impl AsyncErrorDetails {
35 pub fn builder() -> crate::types::builders::AsyncErrorDetailsBuilder {
37 crate::types::builders::AsyncErrorDetailsBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct AsyncErrorDetailsBuilder {
45 pub(crate) code: ::std::option::Option<::std::string::String>,
46 pub(crate) message: ::std::option::Option<::std::string::String>,
47 pub(crate) resource: ::std::option::Option<::std::string::String>,
48 pub(crate) request_id: ::std::option::Option<::std::string::String>,
49}
50impl AsyncErrorDetailsBuilder {
51 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.code = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.code = input;
59 self
60 }
61 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
63 &self.code
64 }
65 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.message = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.message = input;
73 self
74 }
75 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
77 &self.message
78 }
79 pub fn resource(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.resource = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_resource(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.resource = input;
87 self
88 }
89 pub fn get_resource(&self) -> &::std::option::Option<::std::string::String> {
91 &self.resource
92 }
93 pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.request_id = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.request_id = input;
101 self
102 }
103 pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
105 &self.request_id
106 }
107 pub fn build(self) -> crate::types::AsyncErrorDetails {
109 crate::types::AsyncErrorDetails {
110 code: self.code,
111 message: self.message,
112 resource: self.resource,
113 request_id: self.request_id,
114 }
115 }
116}