Skip to main content

aws_sdk_cloudfront/operation/get_realtime_log_config/
_get_realtime_log_config_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 GetRealtimeLogConfigInput {
6    /// <p>The name of the real-time log configuration to get.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>
9    pub arn: ::std::option::Option<::std::string::String>,
10}
11impl GetRealtimeLogConfigInput {
12    /// <p>The name of the real-time log configuration to get.</p>
13    pub fn name(&self) -> ::std::option::Option<&str> {
14        self.name.as_deref()
15    }
16    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>
17    pub fn arn(&self) -> ::std::option::Option<&str> {
18        self.arn.as_deref()
19    }
20}
21impl GetRealtimeLogConfigInput {
22    /// Creates a new builder-style object to manufacture [`GetRealtimeLogConfigInput`](crate::operation::get_realtime_log_config::GetRealtimeLogConfigInput).
23    pub fn builder() -> crate::operation::get_realtime_log_config::builders::GetRealtimeLogConfigInputBuilder {
24        crate::operation::get_realtime_log_config::builders::GetRealtimeLogConfigInputBuilder::default()
25    }
26}
27
28/// A builder for [`GetRealtimeLogConfigInput`](crate::operation::get_realtime_log_config::GetRealtimeLogConfigInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetRealtimeLogConfigInputBuilder {
32    pub(crate) name: ::std::option::Option<::std::string::String>,
33    pub(crate) arn: ::std::option::Option<::std::string::String>,
34}
35impl GetRealtimeLogConfigInputBuilder {
36    /// <p>The name of the real-time log configuration to get.</p>
37    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.name = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>The name of the real-time log configuration to get.</p>
42    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.name = input;
44        self
45    }
46    /// <p>The name of the real-time log configuration to get.</p>
47    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
48        &self.name
49    }
50    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>
51    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.arn = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>
56    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.arn = input;
58        self
59    }
60    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>
61    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
62        &self.arn
63    }
64    /// Consumes the builder and constructs a [`GetRealtimeLogConfigInput`](crate::operation::get_realtime_log_config::GetRealtimeLogConfigInput).
65    pub fn build(
66        self,
67    ) -> ::std::result::Result<crate::operation::get_realtime_log_config::GetRealtimeLogConfigInput, ::aws_smithy_types::error::operation::BuildError>
68    {
69        ::std::result::Result::Ok(crate::operation::get_realtime_log_config::GetRealtimeLogConfigInput {
70            name: self.name,
71            arn: self.arn,
72        })
73    }
74}