aws_sdk_applicationinsights/operation/create_log_pattern/_create_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 CreateLogPatternInput {
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 log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.</p>
13 pub pattern: ::std::option::Option<::std::string::String>,
14 /// <p>Rank of the log pattern. Must be a value between <code>1</code> and <code>1,000,000</code>. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank <code>1</code> will be the first to get matched to a log line. A pattern of rank <code>1,000,000</code> will be last to get matched. When you configure custom log patterns from the console, a <code>Low</code> severity pattern translates to a <code>750,000</code> rank. A <code>Medium</code> severity pattern translates to a <code>500,000</code> rank. And a <code>High</code> severity pattern translates to a <code>250,000</code> rank. Rank values less than <code>1</code> or greater than <code>1,000,000</code> are reserved for Amazon Web Services provided patterns.</p>
15 pub rank: ::std::option::Option<i32>,
16}
17impl CreateLogPatternInput {
18 /// <p>The name of the resource group.</p>
19 pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
20 self.resource_group_name.as_deref()
21 }
22 /// <p>The name of the log pattern set.</p>
23 pub fn pattern_set_name(&self) -> ::std::option::Option<&str> {
24 self.pattern_set_name.as_deref()
25 }
26 /// <p>The name of the log pattern.</p>
27 pub fn pattern_name(&self) -> ::std::option::Option<&str> {
28 self.pattern_name.as_deref()
29 }
30 /// <p>The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.</p>
31 pub fn pattern(&self) -> ::std::option::Option<&str> {
32 self.pattern.as_deref()
33 }
34 /// <p>Rank of the log pattern. Must be a value between <code>1</code> and <code>1,000,000</code>. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank <code>1</code> will be the first to get matched to a log line. A pattern of rank <code>1,000,000</code> will be last to get matched. When you configure custom log patterns from the console, a <code>Low</code> severity pattern translates to a <code>750,000</code> rank. A <code>Medium</code> severity pattern translates to a <code>500,000</code> rank. And a <code>High</code> severity pattern translates to a <code>250,000</code> rank. Rank values less than <code>1</code> or greater than <code>1,000,000</code> are reserved for Amazon Web Services provided patterns.</p>
35 pub fn rank(&self) -> ::std::option::Option<i32> {
36 self.rank
37 }
38}
39impl CreateLogPatternInput {
40 /// Creates a new builder-style object to manufacture [`CreateLogPatternInput`](crate::operation::create_log_pattern::CreateLogPatternInput).
41 pub fn builder() -> crate::operation::create_log_pattern::builders::CreateLogPatternInputBuilder {
42 crate::operation::create_log_pattern::builders::CreateLogPatternInputBuilder::default()
43 }
44}
45
46/// A builder for [`CreateLogPatternInput`](crate::operation::create_log_pattern::CreateLogPatternInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateLogPatternInputBuilder {
50 pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
51 pub(crate) pattern_set_name: ::std::option::Option<::std::string::String>,
52 pub(crate) pattern_name: ::std::option::Option<::std::string::String>,
53 pub(crate) pattern: ::std::option::Option<::std::string::String>,
54 pub(crate) rank: ::std::option::Option<i32>,
55}
56impl CreateLogPatternInputBuilder {
57 /// <p>The name of the resource group.</p>
58 /// This field is required.
59 pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.resource_group_name = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The name of the resource group.</p>
64 pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.resource_group_name = input;
66 self
67 }
68 /// <p>The name of the resource group.</p>
69 pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
70 &self.resource_group_name
71 }
72 /// <p>The name of the log pattern set.</p>
73 /// This field is required.
74 pub fn pattern_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.pattern_set_name = ::std::option::Option::Some(input.into());
76 self
77 }
78 /// <p>The name of the log pattern set.</p>
79 pub fn set_pattern_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.pattern_set_name = input;
81 self
82 }
83 /// <p>The name of the log pattern set.</p>
84 pub fn get_pattern_set_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.pattern_set_name
86 }
87 /// <p>The name of the log pattern.</p>
88 /// This field is required.
89 pub fn pattern_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.pattern_name = ::std::option::Option::Some(input.into());
91 self
92 }
93 /// <p>The name of the log pattern.</p>
94 pub fn set_pattern_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.pattern_name = input;
96 self
97 }
98 /// <p>The name of the log pattern.</p>
99 pub fn get_pattern_name(&self) -> &::std::option::Option<::std::string::String> {
100 &self.pattern_name
101 }
102 /// <p>The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.</p>
103 /// This field is required.
104 pub fn pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.pattern = ::std::option::Option::Some(input.into());
106 self
107 }
108 /// <p>The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.</p>
109 pub fn set_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.pattern = input;
111 self
112 }
113 /// <p>The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.</p>
114 pub fn get_pattern(&self) -> &::std::option::Option<::std::string::String> {
115 &self.pattern
116 }
117 /// <p>Rank of the log pattern. Must be a value between <code>1</code> and <code>1,000,000</code>. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank <code>1</code> will be the first to get matched to a log line. A pattern of rank <code>1,000,000</code> will be last to get matched. When you configure custom log patterns from the console, a <code>Low</code> severity pattern translates to a <code>750,000</code> rank. A <code>Medium</code> severity pattern translates to a <code>500,000</code> rank. And a <code>High</code> severity pattern translates to a <code>250,000</code> rank. Rank values less than <code>1</code> or greater than <code>1,000,000</code> are reserved for Amazon Web Services provided patterns.</p>
118 /// This field is required.
119 pub fn rank(mut self, input: i32) -> Self {
120 self.rank = ::std::option::Option::Some(input);
121 self
122 }
123 /// <p>Rank of the log pattern. Must be a value between <code>1</code> and <code>1,000,000</code>. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank <code>1</code> will be the first to get matched to a log line. A pattern of rank <code>1,000,000</code> will be last to get matched. When you configure custom log patterns from the console, a <code>Low</code> severity pattern translates to a <code>750,000</code> rank. A <code>Medium</code> severity pattern translates to a <code>500,000</code> rank. And a <code>High</code> severity pattern translates to a <code>250,000</code> rank. Rank values less than <code>1</code> or greater than <code>1,000,000</code> are reserved for Amazon Web Services provided patterns.</p>
124 pub fn set_rank(mut self, input: ::std::option::Option<i32>) -> Self {
125 self.rank = input;
126 self
127 }
128 /// <p>Rank of the log pattern. Must be a value between <code>1</code> and <code>1,000,000</code>. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank <code>1</code> will be the first to get matched to a log line. A pattern of rank <code>1,000,000</code> will be last to get matched. When you configure custom log patterns from the console, a <code>Low</code> severity pattern translates to a <code>750,000</code> rank. A <code>Medium</code> severity pattern translates to a <code>500,000</code> rank. And a <code>High</code> severity pattern translates to a <code>250,000</code> rank. Rank values less than <code>1</code> or greater than <code>1,000,000</code> are reserved for Amazon Web Services provided patterns.</p>
129 pub fn get_rank(&self) -> &::std::option::Option<i32> {
130 &self.rank
131 }
132 /// Consumes the builder and constructs a [`CreateLogPatternInput`](crate::operation::create_log_pattern::CreateLogPatternInput).
133 pub fn build(
134 self,
135 ) -> ::std::result::Result<crate::operation::create_log_pattern::CreateLogPatternInput, ::aws_smithy_types::error::operation::BuildError> {
136 ::std::result::Result::Ok(crate::operation::create_log_pattern::CreateLogPatternInput {
137 resource_group_name: self.resource_group_name,
138 pattern_set_name: self.pattern_set_name,
139 pattern_name: self.pattern_name,
140 pattern: self.pattern,
141 rank: self.rank,
142 })
143 }
144}