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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The list of the findings that cannot be imported. For each finding, the list provides the error.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportFindingsError {
    /// <p>The identifier of the finding that could not be updated.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The code of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub error_code: ::std::option::Option<::std::string::String>,
    /// <p>The message of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub error_message: ::std::option::Option<::std::string::String>,
}
impl ImportFindingsError {
    /// <p>The identifier of the finding that could not be updated.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The code of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn error_code(&self) -> ::std::option::Option<&str> {
        self.error_code.as_deref()
    }
    /// <p>The message of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn error_message(&self) -> ::std::option::Option<&str> {
        self.error_message.as_deref()
    }
}
impl ImportFindingsError {
    /// Creates a new builder-style object to manufacture [`ImportFindingsError`](crate::types::ImportFindingsError).
    pub fn builder() -> crate::types::builders::ImportFindingsErrorBuilder {
        crate::types::builders::ImportFindingsErrorBuilder::default()
    }
}

/// A builder for [`ImportFindingsError`](crate::types::ImportFindingsError).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImportFindingsErrorBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) error_code: ::std::option::Option<::std::string::String>,
    pub(crate) error_message: ::std::option::Option<::std::string::String>,
}
impl ImportFindingsErrorBuilder {
    /// <p>The identifier of the finding that could not be updated.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the finding that could not be updated.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The identifier of the finding that could not be updated.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The code of the error returned by the <code>BatchImportFindings</code> operation.</p>
    /// This field is required.
    pub fn error_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The code of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn set_error_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_code = input;
        self
    }
    /// <p>The code of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn get_error_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_code
    }
    /// <p>The message of the error returned by the <code>BatchImportFindings</code> operation.</p>
    /// This field is required.
    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>The message of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_message = input;
        self
    }
    /// <p>The message of the error returned by the <code>BatchImportFindings</code> operation.</p>
    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_message
    }
    /// Consumes the builder and constructs a [`ImportFindingsError`](crate::types::ImportFindingsError).
    pub fn build(self) -> crate::types::ImportFindingsError {
        crate::types::ImportFindingsError {
            id: self.id,
            error_code: self.error_code,
            error_message: self.error_message,
        }
    }
}