aws_sdk_accessanalyzer/operation/update_analyzer/
_update_analyzer_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateAnalyzerInput {
6    /// <p>The name of the analyzer to modify.</p>
7    pub analyzer_name: ::std::option::Option<::std::string::String>,
8    /// <p>Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.</p>
9    pub configuration: ::std::option::Option<crate::types::AnalyzerConfiguration>,
10}
11impl UpdateAnalyzerInput {
12    /// <p>The name of the analyzer to modify.</p>
13    pub fn analyzer_name(&self) -> ::std::option::Option<&str> {
14        self.analyzer_name.as_deref()
15    }
16    /// <p>Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.</p>
17    pub fn configuration(&self) -> ::std::option::Option<&crate::types::AnalyzerConfiguration> {
18        self.configuration.as_ref()
19    }
20}
21impl UpdateAnalyzerInput {
22    /// Creates a new builder-style object to manufacture [`UpdateAnalyzerInput`](crate::operation::update_analyzer::UpdateAnalyzerInput).
23    pub fn builder() -> crate::operation::update_analyzer::builders::UpdateAnalyzerInputBuilder {
24        crate::operation::update_analyzer::builders::UpdateAnalyzerInputBuilder::default()
25    }
26}
27
28/// A builder for [`UpdateAnalyzerInput`](crate::operation::update_analyzer::UpdateAnalyzerInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateAnalyzerInputBuilder {
32    pub(crate) analyzer_name: ::std::option::Option<::std::string::String>,
33    pub(crate) configuration: ::std::option::Option<crate::types::AnalyzerConfiguration>,
34}
35impl UpdateAnalyzerInputBuilder {
36    /// <p>The name of the analyzer to modify.</p>
37    /// This field is required.
38    pub fn analyzer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.analyzer_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the analyzer to modify.</p>
43    pub fn set_analyzer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.analyzer_name = input;
45        self
46    }
47    /// <p>The name of the analyzer to modify.</p>
48    pub fn get_analyzer_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.analyzer_name
50    }
51    /// <p>Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.</p>
52    pub fn configuration(mut self, input: crate::types::AnalyzerConfiguration) -> Self {
53        self.configuration = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.</p>
57    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::AnalyzerConfiguration>) -> Self {
58        self.configuration = input;
59        self
60    }
61    /// <p>Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.</p>
62    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::AnalyzerConfiguration> {
63        &self.configuration
64    }
65    /// Consumes the builder and constructs a [`UpdateAnalyzerInput`](crate::operation::update_analyzer::UpdateAnalyzerInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::update_analyzer::UpdateAnalyzerInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::update_analyzer::UpdateAnalyzerInput {
70            analyzer_name: self.analyzer_name,
71            configuration: self.configuration,
72        })
73    }
74}