aws_sdk_applicationinsights/operation/describe_log_pattern/
_describe_log_pattern_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 DescribeLogPatternInput {
6    /// <p>The name of the resource group.</p>
7    pub resource_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the log pattern set.</p>
9    pub pattern_set_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the log pattern.</p>
11    pub pattern_name: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Web Services account ID for the resource group owner.</p>
13    pub account_id: ::std::option::Option<::std::string::String>,
14}
15impl DescribeLogPatternInput {
16    /// <p>The name of the resource group.</p>
17    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
18        self.resource_group_name.as_deref()
19    }
20    /// <p>The name of the log pattern set.</p>
21    pub fn pattern_set_name(&self) -> ::std::option::Option<&str> {
22        self.pattern_set_name.as_deref()
23    }
24    /// <p>The name of the log pattern.</p>
25    pub fn pattern_name(&self) -> ::std::option::Option<&str> {
26        self.pattern_name.as_deref()
27    }
28    /// <p>The Amazon Web Services account ID for the resource group owner.</p>
29    pub fn account_id(&self) -> ::std::option::Option<&str> {
30        self.account_id.as_deref()
31    }
32}
33impl DescribeLogPatternInput {
34    /// Creates a new builder-style object to manufacture [`DescribeLogPatternInput`](crate::operation::describe_log_pattern::DescribeLogPatternInput).
35    pub fn builder() -> crate::operation::describe_log_pattern::builders::DescribeLogPatternInputBuilder {
36        crate::operation::describe_log_pattern::builders::DescribeLogPatternInputBuilder::default()
37    }
38}
39
40/// A builder for [`DescribeLogPatternInput`](crate::operation::describe_log_pattern::DescribeLogPatternInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeLogPatternInputBuilder {
44    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
45    pub(crate) pattern_set_name: ::std::option::Option<::std::string::String>,
46    pub(crate) pattern_name: ::std::option::Option<::std::string::String>,
47    pub(crate) account_id: ::std::option::Option<::std::string::String>,
48}
49impl DescribeLogPatternInputBuilder {
50    /// <p>The name of the resource group.</p>
51    /// This field is required.
52    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.resource_group_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the resource group.</p>
57    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.resource_group_name = input;
59        self
60    }
61    /// <p>The name of the resource group.</p>
62    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.resource_group_name
64    }
65    /// <p>The name of the log pattern set.</p>
66    /// This field is required.
67    pub fn pattern_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.pattern_set_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the log pattern set.</p>
72    pub fn set_pattern_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.pattern_set_name = input;
74        self
75    }
76    /// <p>The name of the log pattern set.</p>
77    pub fn get_pattern_set_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.pattern_set_name
79    }
80    /// <p>The name of the log pattern.</p>
81    /// This field is required.
82    pub fn pattern_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.pattern_name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The name of the log pattern.</p>
87    pub fn set_pattern_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.pattern_name = input;
89        self
90    }
91    /// <p>The name of the log pattern.</p>
92    pub fn get_pattern_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.pattern_name
94    }
95    /// <p>The Amazon Web Services account ID for the resource group owner.</p>
96    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.account_id = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The Amazon Web Services account ID for the resource group owner.</p>
101    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.account_id = input;
103        self
104    }
105    /// <p>The Amazon Web Services account ID for the resource group owner.</p>
106    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
107        &self.account_id
108    }
109    /// Consumes the builder and constructs a [`DescribeLogPatternInput`](crate::operation::describe_log_pattern::DescribeLogPatternInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::describe_log_pattern::DescribeLogPatternInput, ::aws_smithy_types::error::operation::BuildError>
113    {
114        ::std::result::Result::Ok(crate::operation::describe_log_pattern::DescribeLogPatternInput {
115            resource_group_name: self.resource_group_name,
116            pattern_set_name: self.pattern_set_name,
117            pattern_name: self.pattern_name,
118            account_id: self.account_id,
119        })
120    }
121}