aws_sdk_ec2/types/
_bundle_task_error.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct BundleTaskError {
7 pub code: ::std::option::Option<::std::string::String>,
9 pub message: ::std::option::Option<::std::string::String>,
11}
12impl BundleTaskError {
13 pub fn code(&self) -> ::std::option::Option<&str> {
15 self.code.as_deref()
16 }
17 pub fn message(&self) -> ::std::option::Option<&str> {
19 self.message.as_deref()
20 }
21}
22impl BundleTaskError {
23 pub fn builder() -> crate::types::builders::BundleTaskErrorBuilder {
25 crate::types::builders::BundleTaskErrorBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct BundleTaskErrorBuilder {
33 pub(crate) code: ::std::option::Option<::std::string::String>,
34 pub(crate) message: ::std::option::Option<::std::string::String>,
35}
36impl BundleTaskErrorBuilder {
37 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.code = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.code = input;
45 self
46 }
47 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
49 &self.code
50 }
51 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.message = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.message = input;
59 self
60 }
61 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
63 &self.message
64 }
65 pub fn build(self) -> crate::types::BundleTaskError {
67 crate::types::BundleTaskError {
68 code: self.code,
69 message: self.message,
70 }
71 }
72}