1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Displays errors that occurred during validation of the resource policy.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ValidationErrorsEntry {
    /// <p>Checks the name of the policy.</p>
    pub check_name: ::std::option::Option<::std::string::String>,
    /// <p>Displays error messages if validation encounters problems during validation of the resource policy.</p>
    pub error_message: ::std::option::Option<::std::string::String>,
}
impl ValidationErrorsEntry {
    /// <p>Checks the name of the policy.</p>
    pub fn check_name(&self) -> ::std::option::Option<&str> {
        self.check_name.as_deref()
    }
    /// <p>Displays error messages if validation encounters problems during validation of the resource policy.</p>
    pub fn error_message(&self) -> ::std::option::Option<&str> {
        self.error_message.as_deref()
    }
}
impl ValidationErrorsEntry {
    /// Creates a new builder-style object to manufacture [`ValidationErrorsEntry`](crate::types::ValidationErrorsEntry).
    pub fn builder() -> crate::types::builders::ValidationErrorsEntryBuilder {
        crate::types::builders::ValidationErrorsEntryBuilder::default()
    }
}

/// A builder for [`ValidationErrorsEntry`](crate::types::ValidationErrorsEntry).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ValidationErrorsEntryBuilder {
    pub(crate) check_name: ::std::option::Option<::std::string::String>,
    pub(crate) error_message: ::std::option::Option<::std::string::String>,
}
impl ValidationErrorsEntryBuilder {
    /// <p>Checks the name of the policy.</p>
    pub fn check_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.check_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Checks the name of the policy.</p>
    pub fn set_check_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.check_name = input;
        self
    }
    /// <p>Checks the name of the policy.</p>
    pub fn get_check_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.check_name
    }
    /// <p>Displays error messages if validation encounters problems during validation of the resource policy.</p>
    pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Displays error messages if validation encounters problems during validation of the resource policy.</p>
    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_message = input;
        self
    }
    /// <p>Displays error messages if validation encounters problems during validation of the resource policy.</p>
    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_message
    }
    /// Consumes the builder and constructs a [`ValidationErrorsEntry`](crate::types::ValidationErrorsEntry).
    pub fn build(self) -> crate::types::ValidationErrorsEntry {
        crate::types::ValidationErrorsEntry {
            check_name: self.check_name,
            error_message: self.error_message,
        }
    }
}