aws_sdk_accessanalyzer/operation/delete_analyzer/
_delete_analyzer_input.rs

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