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
98
99
100
101
102
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchDeleteConnectionOutput {
    /// <p>A list of names of the connection definitions that were successfully deleted.</p>
    pub succeeded: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A map of the names of connections that were not successfully deleted to error details.</p>
    pub errors: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ErrorDetail>>,
    _request_id: Option<String>,
}
impl BatchDeleteConnectionOutput {
    /// <p>A list of names of the connection definitions that were successfully deleted.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.succeeded.is_none()`.
    pub fn succeeded(&self) -> &[::std::string::String] {
        self.succeeded.as_deref().unwrap_or_default()
    }
    /// <p>A map of the names of connections that were not successfully deleted to error details.</p>
    pub fn errors(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ErrorDetail>> {
        self.errors.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for BatchDeleteConnectionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchDeleteConnectionOutput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteConnectionOutput`](crate::operation::batch_delete_connection::BatchDeleteConnectionOutput).
    pub fn builder() -> crate::operation::batch_delete_connection::builders::BatchDeleteConnectionOutputBuilder {
        crate::operation::batch_delete_connection::builders::BatchDeleteConnectionOutputBuilder::default()
    }
}

/// A builder for [`BatchDeleteConnectionOutput`](crate::operation::batch_delete_connection::BatchDeleteConnectionOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BatchDeleteConnectionOutputBuilder {
    pub(crate) succeeded: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) errors: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ErrorDetail>>,
    _request_id: Option<String>,
}
impl BatchDeleteConnectionOutputBuilder {
    /// Appends an item to `succeeded`.
    ///
    /// To override the contents of this collection use [`set_succeeded`](Self::set_succeeded).
    ///
    /// <p>A list of names of the connection definitions that were successfully deleted.</p>
    pub fn succeeded(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.succeeded.unwrap_or_default();
        v.push(input.into());
        self.succeeded = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of names of the connection definitions that were successfully deleted.</p>
    pub fn set_succeeded(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.succeeded = input;
        self
    }
    /// <p>A list of names of the connection definitions that were successfully deleted.</p>
    pub fn get_succeeded(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.succeeded
    }
    /// Adds a key-value pair to `errors`.
    ///
    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
    ///
    /// <p>A map of the names of connections that were not successfully deleted to error details.</p>
    pub fn errors(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ErrorDetail) -> Self {
        let mut hash_map = self.errors.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.errors = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of the names of connections that were not successfully deleted to error details.</p>
    pub fn set_errors(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ErrorDetail>>) -> Self {
        self.errors = input;
        self
    }
    /// <p>A map of the names of connections that were not successfully deleted to error details.</p>
    pub fn get_errors(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ErrorDetail>> {
        &self.errors
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`BatchDeleteConnectionOutput`](crate::operation::batch_delete_connection::BatchDeleteConnectionOutput).
    pub fn build(self) -> crate::operation::batch_delete_connection::BatchDeleteConnectionOutput {
        crate::operation::batch_delete_connection::BatchDeleteConnectionOutput {
            succeeded: self.succeeded,
            errors: self.errors,
            _request_id: self._request_id,
        }
    }
}