aws_sdk_cloudtrail/operation/stop_logging/
_stop_logging_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Passes the request to CloudTrail to stop logging Amazon Web Services API calls for the specified account.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StopLoggingInput {
7    /// <p>Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.</p>
8    /// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
9    pub name: ::std::option::Option<::std::string::String>,
10}
11impl StopLoggingInput {
12    /// <p>Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.</p>
13    /// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
14    pub fn name(&self) -> ::std::option::Option<&str> {
15        self.name.as_deref()
16    }
17}
18impl StopLoggingInput {
19    /// Creates a new builder-style object to manufacture [`StopLoggingInput`](crate::operation::stop_logging::StopLoggingInput).
20    pub fn builder() -> crate::operation::stop_logging::builders::StopLoggingInputBuilder {
21        crate::operation::stop_logging::builders::StopLoggingInputBuilder::default()
22    }
23}
24
25/// A builder for [`StopLoggingInput`](crate::operation::stop_logging::StopLoggingInput).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct StopLoggingInputBuilder {
29    pub(crate) name: ::std::option::Option<::std::string::String>,
30}
31impl StopLoggingInputBuilder {
32    /// <p>Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.</p>
33    /// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
34    /// This field is required.
35    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
36        self.name = ::std::option::Option::Some(input.into());
37        self
38    }
39    /// <p>Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.</p>
40    /// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
41    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
42        self.name = input;
43        self
44    }
45    /// <p>Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.</p>
46    /// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
47    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
48        &self.name
49    }
50    /// Consumes the builder and constructs a [`StopLoggingInput`](crate::operation::stop_logging::StopLoggingInput).
51    pub fn build(self) -> ::std::result::Result<crate::operation::stop_logging::StopLoggingInput, ::aws_smithy_types::error::operation::BuildError> {
52        ::std::result::Result::Ok(crate::operation::stop_logging::StopLoggingInput { name: self.name })
53    }
54}