aws_sdk_wellarchitected/operation/disassociate_lenses/
_disassociate_lenses_input.rs

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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Input to disassociate lens reviews.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateLensesInput {
    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
    pub workload_id: ::std::option::Option<::std::string::String>,
    /// <p>List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.</p>
    /// <p>Identify a lens using its <code>LensSummary$LensAlias</code>.</p>
    pub lens_aliases: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateLensesInput {
    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
    pub fn workload_id(&self) -> ::std::option::Option<&str> {
        self.workload_id.as_deref()
    }
    /// <p>List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.</p>
    /// <p>Identify a lens using its <code>LensSummary$LensAlias</code>.</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 `.lens_aliases.is_none()`.
    pub fn lens_aliases(&self) -> &[::std::string::String] {
        self.lens_aliases.as_deref().unwrap_or_default()
    }
}
impl DisassociateLensesInput {
    /// Creates a new builder-style object to manufacture [`DisassociateLensesInput`](crate::operation::disassociate_lenses::DisassociateLensesInput).
    pub fn builder() -> crate::operation::disassociate_lenses::builders::DisassociateLensesInputBuilder {
        crate::operation::disassociate_lenses::builders::DisassociateLensesInputBuilder::default()
    }
}

/// A builder for [`DisassociateLensesInput`](crate::operation::disassociate_lenses::DisassociateLensesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateLensesInputBuilder {
    pub(crate) workload_id: ::std::option::Option<::std::string::String>,
    pub(crate) lens_aliases: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateLensesInputBuilder {
    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
    /// This field is required.
    pub fn workload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workload_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
    pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workload_id = input;
        self
    }
    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
    pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.workload_id
    }
    /// Appends an item to `lens_aliases`.
    ///
    /// To override the contents of this collection use [`set_lens_aliases`](Self::set_lens_aliases).
    ///
    /// <p>List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.</p>
    /// <p>Identify a lens using its <code>LensSummary$LensAlias</code>.</p>
    pub fn lens_aliases(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.lens_aliases.unwrap_or_default();
        v.push(input.into());
        self.lens_aliases = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.</p>
    /// <p>Identify a lens using its <code>LensSummary$LensAlias</code>.</p>
    pub fn set_lens_aliases(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.lens_aliases = input;
        self
    }
    /// <p>List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.</p>
    /// <p>Identify a lens using its <code>LensSummary$LensAlias</code>.</p>
    pub fn get_lens_aliases(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.lens_aliases
    }
    /// Consumes the builder and constructs a [`DisassociateLensesInput`](crate::operation::disassociate_lenses::DisassociateLensesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::disassociate_lenses::DisassociateLensesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::disassociate_lenses::DisassociateLensesInput {
            workload_id: self.workload_id,
            lens_aliases: self.lens_aliases,
        })
    }
}