aws_sdk_cleanrooms/types/
_batch_get_schema_error.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct BatchGetSchemaError {
7 pub name: ::std::string::String,
9 pub code: ::std::string::String,
11 pub message: ::std::string::String,
13}
14impl BatchGetSchemaError {
15 pub fn name(&self) -> &str {
17 use std::ops::Deref;
18 self.name.deref()
19 }
20 pub fn code(&self) -> &str {
22 use std::ops::Deref;
23 self.code.deref()
24 }
25 pub fn message(&self) -> &str {
27 use std::ops::Deref;
28 self.message.deref()
29 }
30}
31impl BatchGetSchemaError {
32 pub fn builder() -> crate::types::builders::BatchGetSchemaErrorBuilder {
34 crate::types::builders::BatchGetSchemaErrorBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct BatchGetSchemaErrorBuilder {
42 pub(crate) name: ::std::option::Option<::std::string::String>,
43 pub(crate) code: ::std::option::Option<::std::string::String>,
44 pub(crate) message: ::std::option::Option<::std::string::String>,
45}
46impl BatchGetSchemaErrorBuilder {
47 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.name = ::std::option::Option::Some(input.into());
51 self
52 }
53 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.name = input;
56 self
57 }
58 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
60 &self.name
61 }
62 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.code = ::std::option::Option::Some(input.into());
66 self
67 }
68 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.code = input;
71 self
72 }
73 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
75 &self.code
76 }
77 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.message = ::std::option::Option::Some(input.into());
81 self
82 }
83 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.message = input;
86 self
87 }
88 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
90 &self.message
91 }
92 pub fn build(self) -> ::std::result::Result<crate::types::BatchGetSchemaError, ::aws_smithy_types::error::operation::BuildError> {
98 ::std::result::Result::Ok(crate::types::BatchGetSchemaError {
99 name: self.name.ok_or_else(|| {
100 ::aws_smithy_types::error::operation::BuildError::missing_field(
101 "name",
102 "name was not specified but it is required when building BatchGetSchemaError",
103 )
104 })?,
105 code: self.code.ok_or_else(|| {
106 ::aws_smithy_types::error::operation::BuildError::missing_field(
107 "code",
108 "code was not specified but it is required when building BatchGetSchemaError",
109 )
110 })?,
111 message: self.message.ok_or_else(|| {
112 ::aws_smithy_types::error::operation::BuildError::missing_field(
113 "message",
114 "message was not specified but it is required when building BatchGetSchemaError",
115 )
116 })?,
117 })
118 }
119}